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) |
- CoinTos - 2010-10-24 Quote:Could you explain how the naming for these works (is it just that it contains those words? proper/repack), as I have come across these but never given it much thought. As implemented, if it contains "proper" or "repack" it overwrites existing files with the same resulting sorted name. You are only going to see these once in a while unless there is a release war, that is when you see Real Proper, etc. But most of the time at least with the rss feed I deal with I only see the occational proper or repack trump their original release listing. Quote:That is fixed now in v1.10, and seems to sort fine. Can't seem to get details from thetvdb for that particular show, but for now that doesn't seem to be a big deal. So with show-name-substitute:Shit My Dad Says-->$#*! My Dad Says it sorts for you? For me it still fails with the same error. Here is my diff file just incase it is my little mod's fault. Diff File - Malexx - 2010-10-25 Just tried the script the first time and running into following Problem. I have some Tv recordings which are titled in german. When i run the script i get this error: Sorting D:\Download\Series/ into Z:\/ INFO: trying to move Malcolm Mittendrin season 7 episode 1 INFO: found a matching show: Z:\/Malcolm Mittendrin INFO: found a matching season: Z:\/Malcolm Mittendrin/Season 7 INFO: Fetching episode title for Malcolm Mittendrin Season 7 Episode 1. ←[33mWarning: TBDB::API: No series id found for: Malcolm Mittendrin WARN: Could not get episode title for Malcolm Mittendrin Season 7 Episode 1. "Malcolm mittendrin" is in English "Malcolm in the Middle" So do all my Shows have to be labeled in English to get this to work? I looked into TVDB for this Show and its labeld in German there like this: Showtitle:Malcolm mittendrin Languageeutsch ID:7383 What is causing the problem here,can anybody gimme some help on this?Really like to use this script .... Modules are loaded ok CPAN: CPAN::SQLite loaded ok (v0.199) Database was generated on Sun, 24 Oct 2010 23:29:41 GMT CPAN: Module::CoreList loaded ok (v2.36) File::Copy::Recursive is up to date (0.38). File::Glob is up to date (1.07). LWP::Simple is up to date (5.835). TVDB::API is up to date (0.33). thanks for any help!!! Edit: Found a littlr workaround but its not really satisfying. What i did was add this to config file: show-name-substitute:Malcolm mittendrin-->Malcolm in the middle and now i get this : Sorting D:\Download\Series/ into Z:\/ INFO: trying to move Malcolm mittendrin season 7 episode 1 INFO: found a matching show: Z:\/Malcolm mittendrin INFO: found a matching season: Z:\/Malcolm mittendrin/Season 7 INFO: Fetching episode title for Malcolm in the middle Season 7 Episode 1. COPY: sorting D:\Download\Series/Malcolm mittendrin.7x01.Burning Man.sdtv. avi to Z:\/Malcolm mittendrin/Season 7/Malcolm in the middle.7x01.Burning Man.av My Problem is now thatall my Shows are labeled in English. Would it be possible that this script support multiple Languages? - cliffe - 2010-10-25 CoinTos Wrote:You are only going to see these once in a while unless there is a release war, that is when you see Real Proper, etc. But most of the time at least with the rss feed I deal with I only see the occational proper or repack trump their original release listing. Yeah it should work... Try it without your modifications. Here is what I get with force-windows-compatible-filenames:TRUE and show-name-substitute:Shit My Dad Says-->$#*! My Dad Says (Create test files...) Code: cliffe@linux-beco:~/sorttv> touch '/home/cliffe/Files/Downloads/Unsorted/$#*! My Dad Says s1e1.avi' Code: cliffe@linux-beco:~/sorttv> perl sorttv.pl Code: cliffe@linux-beco:~/sorttv> ls -R /home/cliffe/Files/Media/TV/ After you have checked that v1.10 works you can try adding capitalisation to titles. Do this where directories are created, and where episodes are being renamed. If that works, please send me a patch. Then try adding the renaming thing. At first glance, your substitution code looks ok. - cliffe - 2010-10-25 v1.11: New feature: --lookup-language:[en|...] Set language for thetvdb lookups, this effects episode titles etc
Valid values include: it, zh, es, hu, nl, pl, sl, da, de, el, he, sv, eng, fi, no, fr, ru, cs, en, ja, hr, tr, ko, pt If not specified, en (English) This should work with any of the languages supported by the thetvdb.com Malexx Wrote:Would it be possible that this script support multiple Languages? I don't know whether that includes German. I searched on thetvdb.com for "Malcolm mittendrin" and it was found as Dutch. You may want to have it scheduled to try German, then Dutch, then English. Good luck. Update: I see you mentioned that it is available in German on thetvdb.com, so hopefully it should work... Not sure which abbreviation is for German though. - Targettio - 2010-10-25 cliffe Wrote:v1.10: OK I will have a go at de-bugging it tonight and let you know how I get on. - CoinTos - 2010-10-25 Quote:Yeah it should work... Humm... I tried a clean 1.11 and I still get the error about the file already existing in the log, as I got in 1.10 with my mods. Code: INFO: making show directory: /raid/Media/TV_Shows/$#-! My Dad Says Code: root@lucy:/home/deluge/unsorted/tv_shows# ls -l /raid/Media/TV_Shows/\$#-\!\ My\ Dad\ Says/ This is the only show it does it for. If you leave it without the name sub to $#*! it sorts fine. After work today I will have to see if it something flakey in debian causing this, it's weird since it works fine on your system. - Targettio - 2010-10-25 Using 1.11 modified as shown in the paste bin file http://pastebin.com/02dajX3R Quote:Got thorough the declirationsSortTV So I guess it is around Quote:my $TVDBAPIKEY = "FDDBDB916D936956"; - CoinTos - 2010-10-25 Ok, so now that I have work over with I now have solution for my problem with Shit My Dads Says. If I have a folder called Shit My Dad Says, it will sort $##! My Dad Says - S01E05.avi, no problem even with my mod. It doesn't like the folder being called $#-! or $##! or $#*! which for me is fine, I can always look into it at a later date. Here my patch: It adds the Text::Capitalize library, using the capitalize_title function it will format the show title properly even if the release group didn't. It will only change the show title as long as you do not have a name-subsitution otherwise the name-sub overrides it. Patch Here Text::Capitalize CPAN Doc - Malexx - 2010-10-26 cliffe Wrote:v1.11: Thank you very much,its working like a charm. You do a great Job with this script and your support is superb !!! Do you think somehow,someday there willl be a way for faster copy or move with TVDB lookups? If i move now files to my Western Digital over USB it transfer files with about 300-400kb. Anyway ,thx again ... - cliffe - 2010-10-26 Malexx Wrote:Thank you very much,its working like a charm. Thanks. I am glad that works for you The lookups do slow down the sort, so if you want a really fast sort, the easy solution is to not include the episode title in renaming, and don't download images. One of the reasons it slows it down is because it all happens in one thread; that is, only one thing happens at once. It would certainly be possible to include multiple threads to allow it to download images in one thread and do the renaming and sorting in another thread. Separating the episode title lookups into a separate thread from the sorting is a bit more complicated, but could be done (where the sorting would have to wait on the lookups, but could happen concurrently). These improvements are not high on my priorities at the moment, unless someone wanted to have a go at implementing it. New version available - cliffe - 2010-10-26 A new version of SortTV is now available. Version 1.12 now capitalises show names, and should provide a work around for the earlier reported problem. Thanks Targettio and CoinTos. If you are updating you may need to install another module. Run: Code: sudo cpan Text::Capitalize You can get the new version from: https://sourceforge.net/projects/sorttv/files/ Targettio Wrote:Using 1.11 modified as shown in the paste bin file Thanks. I restructured it so that if you disable the tvdb features it should work for you, to avoid the mysterious problem you have with the tvdb api module. If you get this error message: Code: DBM: Deep : Cannot sysopen file '/.tvdb' : Permission denied Code: fetch-images:FALSE Code: fetch-images:FALSE CoinTos Wrote:Ok, so now that I have work over with I now have solution for my problem with Shit My Dads Says. If I have a folder called Shit My Dad Says, it will sort $##! My Dad Says - S01E05.avi, no problem even with my mod. It doesn't like the folder being called $#-! or $##! or $#*! which for me is fine, I can always look into it at a later date. Ok. Glad you found a work around; create a directory named the title to substitute. CoinTos Wrote:Here my patch: Thanks. I made some changes: I added capitalisation for show directories created during directory sorts, and added preserve caps, so, for example, CSI doesn't become Csi. - Targettio - 2010-10-26 I currently have the renaming and image downloading set to FALSE (all I want to do is move the tv shows to the right folder), so maybe that has something to do with it? Either I will check the new version tonight. I will try with renaming/images on and off and let you know. - CoinTos - 2010-10-26 cliffe Wrote:Thanks. I made some changes: I added capitalisation for show directories created during directory sorts, and added preserve caps, so, for example, CSI doesn't become Csi. Yeah, I thought about that too and had that in my first mod, the only problem with that is if a filename is in all caps it will ignore them and if CSI is all lower case it will only fix the C without name sub over riding it. - cliffe - 2010-10-26 CoinTos Wrote:Yeah, I thought about that too and had that in my first mod, the only problem with that is if a filename is in all caps it will ignore them and if CSI is all lower case it will only fix the C without name sub over riding it. Good point. Thanks. v1.13 fixes that by being case insensitive for substitutions. That is, "CSI" or "csi" would be substituted by "CSI: Crime Scene Investigation" Due to this line in the config file: show-name-substitute:CSI-->CSI: Crime Scene Investigation Cheers. - nicx76 - 2010-10-26 hi, this tool sound great. one question: is it possible to scape episode and season numbers by episode and show name from thetvdb.com? that would be THE toll i am looking for weeks now nicx... |