SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33) +--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116) +--- Thread: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) (/showthread.php?tid=75949) |
RE: SortTV, automatically sort new episodes into dirs and update XBMC library (Linux/Win) - cliffe - 2012-07-08 (2012-03-30, 15:06)greeneca Wrote: Hello all, Could you please provide an example of a file name that triggers this behaviour? New version of SortTV available: 1.33 - cliffe - 2012-07-08 Version 1.33 of SortTV is now available. Included in this release:
Thanks to everyone who submitted code and/or suggestions. You can get the new version here: https://sourceforge.net/projects/sorttv/files/ Enjoy! (2012-04-18, 19:31)frozenesper Wrote: I found SortTV a few weeks ago and I love it! If you don't mind, I may have some bugfixes for issues with the 1.32 release. (I don't know perl, but I have some programming experience.) Thanks, I have incorporated some of your suggestions incl. utf8 encoding into this release. (2012-06-04, 16:52)Fox Wrote: Cliffe I found a new error code, if winrar runs into a CRC it returns 768. Thanks. Both of these have been incorporated into this release. (2012-07-05, 21:06)verysoftpaper Wrote: oh, yes,, I had to alter the mask to ignore=*sample* though.. I have updated the ignore string for samples in this release. SortTV should delete empty directories. (2012-03-31, 07:17)agentxan Wrote: I was upgrading some older shows to HD versions and had a problem sorting one episode. I am assuming the problem is the / in the episode title. This has been fixed in this release. (2012-06-13, 04:32)deranjer Wrote: I have edited sorttv.pl to add the following options you can set in the sorttv.conf file: Thanks. I incorporated some of your code and suggestions into this release. RE: SortTV, automatically sort new episodes into dirs and update XBMC library (Linux/Win) - cliffe - 2012-07-09 (2012-07-08, 13:47)cliffe Wrote:(2012-06-30, 15:01)DoubleDroz Wrote: Also - I'm not sure if this has been mentioned before, but the script runs brilliantly on OS X once the CLI developer tools have been downloaded and installed. Also, I would love for a Windows user of SortTV to create a set of step by step instructions for those with less experience with such things. Would anyone like to volunteer? RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - TheOgreToe - 2012-07-15 Absolutely love the script. Quick question, and I apologize if this has been addressed already: it seems many of the movies I'm processing via SortTV are unmatched/go unprocessed due to a mismatch in release year. I can see how this would be useful in matching, say, the modern version of True Grit (2010) vs True Grit (1969). I've found that in many instances, however, the scene release / title of the file will indicate, say, 2007, and the SortTV lookup will return the actual year of 2006, off by 1. SortTV will declare this a mismatch and not process the file, when in reality it's definitely a match. Clearly I'm nitpicking an already amazing script...but it would be great if there was an ability to specify a margin of error. I'd much rather SortTV make a best-guess match and process the file, instead of not processing the file at all (please let me know if I'm missing a config option or something). Thanks again! RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - ozp1 - 2012-07-16 I register at this forum just to thanks Z. Cliffe about this wonderfull software I'm glad I have the knowledge to install and make it work from command line and config file. Its not much but I was able to do it. Using ubuntu 10.04 Some question: Movies: the file extensions were gone, is this correct? example: Born to Be Wild (2011) -- this is the actual name of the movie file. no .mkv or .mp4 I've noticed that some videos were moved with the subtitle (srt), others dont. Thanks RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - itachi46 - 2012-07-17 Great script! not a fan of perl as a language but the amount of regex and matching makes sense to use perl. anyways, I am running windows 7 64 bit and cannot install WWW::TheMovieDB::Search and this site: suggests it does not support windows anyways. http://code.activestate.com/ppm/WWW-TheMovieDB-Search/ the solution is to comment line 54 : # use WWW::TheMovieDB::Search; note that the movie aspect of this script has to be disabled for this to work. Cliffe, may i edit the script to work with utorrent better for my personal use? Essentially, utorrent has the ability to run a script after a torrent changes state. I am simply passing the state as an argument and the path of the file to be sorted. I'd be willing to help out with the tutorial for windows user as long as I am correct in saying the movie aspect of this script does not work on a windows machine with active perl due to the module not supporting windows. Is WWW::TheMovieDB::Search different to TMDB or WWW::TMDB::API? Windows also has access to IMDB api... I am quite busy at the moment but i dont mind spending a day exploring the api to see if i can replace for myself and see if it works. again thanks for the work RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - ozp1 - 2012-07-17 hello. Is there any way to prevent sorttv to take out the file extension from the videos? The problem is that when I run it, I have to remember what movies were at the original folder and then go to the respective folder (tv or movies) and then find the movie and change the file name in order to get the extension back My computer can play the files with no extension, but XBMC does not recognize them as video files and they dont show up at the movies/tv list. regards RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - itachi46 - 2012-07-17 (2012-07-17, 15:26)ozp1 Wrote: hello. Is there any way to prevent sorttv to take out the file extension from the videos?you could try changing the config file so that sorttv does not rename the file at all. RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - ozp1 - 2012-07-17 Do you mean here? Code: # ~~~~~~~~~~~~~ But if I do dhis I will loose some great function of the script. I wonder if this rename feature always remove the file extension or not? RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - itachi46 - 2012-07-18 (2012-07-17, 18:36)ozp1 Wrote: Do you mean here? yeh, what OS are you using? i am on windows and it does not remove my extension RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - ozp1 - 2012-07-18 I am using ubuntu 12.04. I am not sure but looks like when there is a .SRT file at the same folder and with the same filename as the movie, then the movie loose its file extension. Sometimes the SRT are left behind at the old folder, sometimes dont. Sometimes the SRT are moved at the new folder (with no file extension) and the movie is left behind feature request: when the script finds a movie with "3D' at the file name, then write the new file name with "3dbd" so it will be recognized as a 3D movie RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - cliffe - 2012-07-18 (2012-07-15, 06:02)TheOgreToe Wrote: Absolutely love the script. Quick question, and I apologize if this has been addressed already: it seems many of the movies I'm processing via SortTV are unmatched/go unprocessed due to a mismatch in release year. I can see how this would be useful in matching, say, the modern version of True Grit (2010) vs True Grit (1969). I've found that in many instances, however, the scene release / title of the file will indicate, say, 2007, and the SortTV lookup will return the actual year of 2006, off by 1. Thanks for the suggestion. I will try to include such a feature in a future release. (2012-07-16, 06:48)ozp1 Wrote: I register at this forum just to thanks Z. Cliffe about this wonderfull software Strange. I haven't seen that. And this comment indicates not everyone on Windows does... (2012-07-18, 05:26)itachi46 Wrote: [...snip...] i am on windows and it does not remove my extension (2012-07-17, 14:42)itachi46 Wrote: Great script! not a fan of perl as a language but the amount of regex and matching makes sense to use perl. Thanks for offering to help with a tutorial. It should be possible to tell utorrent to call "perl sorttv.pl --file-to-sort=..." Edit: feel free to add an option for passing the state through and have it, for example, not do anything unless the state is "completed" (or whatever). See if you can make that as general as possible. Perhaps have the actual state text be something configured. For example, --only-sort-if-statetext-is=complete --statetext=$utorrentstate Or something more elegant I think that WWW::TheMovieDB::Search should work with Windows... Please try "cpan", "force install WWW::TheMovieDB::Search", if there are any problems installing its dependencies, then try forcing those. Let us know how you go. (2012-07-18, 05:29)ozp1 Wrote: I am using ubuntu 12.04. Ok, I'll have to have a look at that, I don't know why that would happen. Subtitles with easily identifiable names should get sorted into the same directory as the video file, and they should both retain extensions. It may help to understand the problem if you run the SortTV testing script now included. Does XBMC recognise "3dbd"? (If not, what is it used for?) Edit: looks like it does. I am happy to add that feature later. And remember everyone, if you want to try your hand at adding features please feel free! Thanks everyone! RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - ozp1 - 2012-07-19 Hello cliffe! I ran the test script. It went ok until this point below and then I think it hanged. I had to "ctrl+c" to keep it going until the end. Code: 20:49:7, 18-6-2012 The results: All tests complete: 71 tests passed 6 tests failed the test.log is here http://pastebin.com/QBPBuFtt Regards RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - itachi46 - 2012-07-19 Hey Cliffe, I've swapped over to Strawberry Perl rather than active perl (they have issues with getting cpan working on a windows 64-bit) and the only drama i had was the module File::Glob had to be replaced with File::Glob:Windows there were a few others but Windows made the most sense to me and it seems to be working... So the tutorial is literally this. Install Strawberry Perl from here : http://strawberryperl.com/ Open up command line and type this: cpan File::Copy::Recursive File::Glob::Windows LWP::Simple TVDB::API Getopt::Long Switch WWW::TheMovieDB::Search XML::Simple and to run the script: Perl SortTv.pl or simply double click on the script edit: @ozp1 I just tested your problem with the downloading season image on ubuntu (this feature is disabled on windows) and i am confident in saying that it is a bug in TVDB::API specifically $tvdb->getSeasonBanner and $tvdb->getSeasonBannerWide . They are not returning from their call. I have tried getSeasonBanners which returns an array of banner names but to no avail. if you don't mind letting xbmc parse for the season banners, then find these two lines in sorttv.pl Code: my $banner = $tvdb->getSeasonBanner($fetchname, $season); and replace them with Code: my $banner ="";# $tvdb->getSeasonBanner($fetchname, $season); This will stop sorttv.pl from trying to download the season banners but it will not "freeze" anymore RE: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - itachi46 - 2012-07-19 Hey again Cliffe, I've finished implementing the states... i called them --run-state and --current-state i have also updated the help message. I know i said i will be using this for personal use but if you think others may want to use this feature then simply ask and i'll give you the source (bear in mind this is my first time developing on perl so its probably not the prettiest of code). |