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) |
- cliffe - 2010-11-02 Capt.Insano Wrote:OK, tried networktest.pl and this is what I got: Yeah that is strange... nicx76 Wrote:one more feature wish: That sounds like a handy straightforward feature. When I get a chance I will add that. If anyone wants to have a go at implementing it let me know. newphreak Wrote:hmm, would it be possible to change the notification sent to xbmc to only send successfull moves/symlink/copy's? as i symlink from a messy incomingdir i use place-symlink. And xbmc stutters like crazy while getting those notifications, so i would like to just get the successfull ones. Ok. I'll look into it when I get a chance. Again, let me know if anyone wants to volunteer to implement this. George Wrote:Really like your script, works amazingly well. Thanks! Great. Thanks - nitrag - 2010-11-04 Is there any reason why this wouldn't be able to be sorted? LOG: Code: 23:10:2, 3-10-2010 Series Code: [HorribleSubs] Naruto Shippuuden File: Code: [HorribleSubs] Naruto Shippuuden - 183v2 [480p] I've added this to conf because I was getting an error (below) before Added: Code: show-name-substitute:[HorribleSubs] Naruto Shippuuden-->Naruto Shippuuden was getting this error before: Code: 22:30:2, 3-10-2010 - cliffe - 2010-11-04 nitrag Wrote:Is there any reason why this wouldn't be able to be sorted? There are a few reasons for this. If your configuration has --match-files-named-showname-episodetitle:TRUE
Then SortTV will try to look it up to see if it can find an episode with the show "[HorribleSubs] Naruto Shippuuden", and an episode titled "183v2 [480p]". This is not what you want. (Currently that does not ignore things in square brackets, but perhaps it should.) Is this S01E83? I am a human and even I am finding it hard to parse this text to figure out which episode it is...You are correct to include those substitutions. However, you will also need to rename the file to a format SortTV understands. For example, "[HorribleSubs] Naruto Shippuuden s1e1.avi", or "Naruto Shippuuden - Homecoming.avi". - CoinTos - 2010-11-05 Hey cliffe, Notice a small problem with the latest version. During episode title look up it doesn't check for a tvdb ID sub so it fails on shows that require an ID number (ie, $#*! My Dad Says only works if you pass the ID to $tvdb-->GetEpisodeName()). I wrote this quick little patch to correct it on my media server, figure you can either use it or come up with a better solution. Patch Here - nitrag - 2010-11-08 cliffe Wrote:There are a few reasons for this. Thanks, seems to be working now. Have to wait until next week and make sure my shows sort. Great work! - nicx76 - 2010-11-09 nicx76 Wrote:one more feature wish: hi, is there anybody out there who wants to code a patch for this feature wish? its nearly christmas and this would be a great gift for me :-P thanks! nicx... - cliffe - 2010-11-09 nicx76 Wrote:hi, No worries. I'll do that New version available - cliffe - 2010-11-09 SortTV v1.15 New features:
If you find this script helpful then please consider making a $5 paypal donation. Click for more information: http://sourceforge.net/donate/index.php?group_id=330009 You can get the new version from: https://sourceforge.net/projects/sorttv/files/ CoinTos Wrote:Hey cliffe, Thanks. Applied. Thanks for your patience. CoinTos Wrote:Will do and thanks again for your help through this as I learn the ins and outs of perl. I, also, now have the version I need for this wednesdays launch of my dedicated media server so I can't wait to put this into production, thanks. How is the media server going? nicx76 Wrote:hi, Merry Christmas. newphreak Wrote:hmm, would it be possible to change the notification sent to xbmc to only send successfull moves/symlink/copy's? as i symlink from a messy incomingdir i use place-symlink. And xbmc stutters like crazy while getting those notifications, so i would like to just get the successfull ones. Both of these issues should be solved in the new version. Let me know how it goes. - CoinTos - 2010-11-09 cliffe Wrote:How is the media server going?Great, I made my wednesday deadline of installing the 6 1.5tb hard drives, setting up the raid 5 and starting the process of transfering over the 1.5tb of media. Thank god for a gigabit ethernet setup between the server and my main computer. Then on thurdays day after work, I activated your script, its been working great ever since minus a couple of hickups. A couple of small hickups remain: 1. In my setup I had to add 3 number (101 = s01e01) naming support after I realize it didn't support it. It is understood that first number 1-9 is season and the last two number 01-99 are episode. Code: || filename($file) =~ /(.*)(?:\.|\s)(\d)(\d{2}).*/ 2. There is currently no support for a multi ep file. ie The Closer s02e14-e15.avi or The Closer s02e14e15.avi gets renamed to just the first ep ie. The Closer s02e14.avi. This is a very mild defect for me as I use TV Rename connected over a samba mapped drive so a couple of click and all is well. If I get the time I may try and submit a patch for it unless you see a quick solution for it first. 3. Only ran into this one once so far but maybe stripping spaces off of the end of tvdb returned episode title might be a good idea. Had an episode of The Mentalist where it had The Mentalist - S03E07 - Red Hot .avi after sort because the tvdb submitter added a space on the end by mistake. But other than those, for my day to day shows the media server with this script works great, basically 100% automated now. - Malexx - 2010-11-10 A really cool feature would be to be able to put more than one path into - directory-to-sort-into - Right now i have to start to batch scripts depending on where i want to sort my files,extern or intern. This normaly doenst belong here but maybe someone can help. I tried a batch script (i have no clue of this)to launch 2 instances of SortTV to avoid starting a batch script for every Source i have. Code: explorer.exe D:\Download\Series (open my Download Window) This works if the Moved/Copyd Media Destination is "--directory-to-sort:\Download\Series --directory-to-sort-into:E:\HD Serien" If the Moved/Copyd Media Destination is in the second call of SortTV "--directory-to-sort:\Download\Series --directory-to-sort-into:Z:\" it wont work,the script will just exit without to do anything. As said before this maybe doesnt belong here but hopefully someone can gimme a hand on making this Batch File to work. Thanks in Advance ... - cliffe - 2010-11-10 Malexx Wrote:A really cool feature would be to be able to put more than one path into - directory-to-sort-into - Do you have Code: require-show-directories-already-exist:TRUE - cliffe - 2010-11-10 CoinTos Wrote:Great, I made my wednesday deadline of installing the 6 1.5tb hard drives, setting up the raid 5 and starting the process of transfering over the 1.5tb of media. Thank god for a gigabit ethernet setup between the server and my main computer. Then on thurdays day after work, I activated your script, its been working great ever since minus a couple of hickups. Just add an option for that and you’ve got a patch If you feel like doing that then please have it disabled by default and add it to the config file. If you don't feel like it I'll add it myself later. CoinTos Wrote:2. There is currently no support for a multi ep file. ie The Closer s02e14-e15.avi or The Closer s02e14e15.avi gets renamed to just the first ep ie. The Closer s02e14.avi. This is a very mild defect for me as I use TV Rename connected over a samba mapped drive so a couple of click and all is well. If I get the time I may try and submit a patch for it unless you see a quick solution for it first. Yeah, I am aware of that. The easiest way to add that feature would be to keep both in $episode (maybe just as "1-2-3") and handle it specially when renaming. Could lookup all the episode names, just the first one, or skip episode titles in this case. Either way I won't have time to do this for a while, feel free to have a go at it. CoinTos Wrote:3. Only ran into this one once so far but maybe stripping spaces off of the end of tvdb returned episode title might be a good idea. Had an episode of The Mentalist where it had The Mentalist - S03E07 - Red Hot .avi after sort because the tvdb submitter added a space on the end by mistake. That is an easy one line addition, feel free to send in a patch if you want, otherwise I will do it later. I won't be able to apply any patches you send before next week, but if you feel the urge to do some Perl hacking then go for it Thanks again for all the code you have already sent. - CoinTos - 2010-11-10 cliffe Wrote:Yeah, I am aware of that. The easiest way to add that feature would be to keep both in $episode (maybe just as "1-2-3") and handle it specially when renaming. Could lookup all the episode names, just the first one, or skip episode titles in this case. Either way I won't have time to do this for a while, feel free to have a go at it. Yeah, I figured you knew and like me it's one of those if I have time deals but if I find the time before you I will have a go at it. Besides, I wouldn't rank it as a major problem anyways. Quote:I won't be able to apply any patches you send before next week, but if you feel the urge to do some Perl hacking then go for it That's fine, I am having the same problem with free time as well at the moment. Quote:Thanks again for all the code you have already sent.No problem, just happy to help (and learn). - nicx76 - 2010-11-10 cliffe Wrote:SortTV v1.15 wow, thanks a lot! nicx... EDIT: just tested it, but its not working... if i start it with option "treat-directories:RECURSIVELY_SORT_CONTENTS" its running for hours without exeptions or renaming actions, if i use "treat-directories:IGNORE" its immedeately ending without renaming any file. so what does this parameter do that it affects the script even if i choose "directory-to-sort-into:KEEP_IN_SAME_DIRECTORIES"? my folder structure is: D:\videos\series\<series title>\<series title - episode name>.ts and i want to rename all files recursevly in D:\videos\series\ should this work? nicx... - Malexx - 2010-11-10 Quote:Do you have Yes i have this. Is this batch script otherwise correct? So if there is Code: perl sorttv.pl --directory-to-sort:D:\Download\Series --directory-to-sort-into:E:\HD Serien |