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) |
- gardz - 2011-02-20 Nice suggestions Cliffe, I think I've implemented them properly now I'm still getting the hang of perl, and love some of the conventions you've been using throughout your code! Code: diff -u defaults/sorttv.pl sorttv.pl And for the config file: Code: # OPTIONAL - sort files which fall within these ranges. Filesizes use the MB and GB postfixes, such as Let me know what you think :-) Regexp is certainly my weakness, I'm not sure that I can implement the multiple episode fix sufficiently. I'll certainly give it a bit of a think and analyze your code further. You may end up working it out long before I do! - newphreak - 2011-02-20 I have the same "issue" as stated earlier in this thread, i guess a simple regex would be the fix for this. Some shows comes with Pt.I Pt.II Pt.III Pt.V and so on, and some comes with .Part.04 .Part.02. tagging instead of the usual S01E01. Could we include these? Runnable exe - spyvingen - 2011-02-21 Hi i would love for this app to be an exe that has built in timer and a gui for settings is that totally out of the question? One more thing that would be awsom is to intergrate scru function in it. Then this app would be the only program u need for torrent exept the torrent program itself. Sorry for my bad english //jonas - fergulator - 2011-02-23 cliffe Wrote: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. Hey Cliffe - Thanks. I love sorttv. Exactly what I was looking for. So, I was getting the same mysterious TVDB API error. Found out that it related to the source folder name I was using (was 'unsorted media') on Windows. When calling the pl, I surrounded the path with quotes; it executed fine, but I got the TVDB error. Changing the directory names to non-spaced fixed it for me. - carmenm - 2011-02-23 If i am correct looking at this script description, it does the same thing as therenamer on windows? If so it s something we really missed on windows! Any chance of a movie version? or even both at the same time.... Thanks move if extracted, otherwise copy - sh0stak - 2011-02-24 I have tried searching this thread with no luck. I just wanted to see if anyone has setup a way to sort by MOVE if you extracted a file, otherwise sort by COPY. Some of my torrents come as archives, some just a plain file. Either way I want to continue seeding them. If it is a plain file, sort by copy works great. If it is an archive, it leaves the extracted file in the original location so now I have the seeding archive, the extracted file in the "sort-from" dir, and the extracted file in the "sort-to" dir. I will look into making this change on my own when I have some time. I thought in the meantime I would check and see if this has already been covered though. thanks brand new - migeira - 2011-02-26 everyone: bear with me, i'm working on my first htpc xbmc build and all this stuff is new to me. i tried running the script using the ASpearl instead of strawberry perl and i got a ton of errors. i am just trying to figure this out, if someone could help me out with this general process i'd really appreciate it? migeira - Justcop - 2011-02-28 Obviously this is a long thread and I haven't had chance to read through all of it but I just thought I'd add an idea. Certainly the way I'd like to use it most of the fiels that aren't TV shows would be movies. Could there be a way that it checks themoviedb to see if there is a title match and then moves it into a different folder for movies. That way after the files have been processed everything that is TV goes to one place, movies to another. What is left can be moved to the unsorted folder but hopefully this won't be much at all and can be managed manually. Two quick questions on how the script works that may have been answered somewhere above. 1. How does the script cope with episodes that are still in the process of being downloaded but appear correctly named? 2. How would the script function if I set it to run very often so that a second copy may start running before the first has finished? - cliffe - 2011-02-28 oracle_sod Wrote:Just a quick note, when following the install instructions, File::Glob throws an error on the current version of Strawberry Perl as its already included... Thanks for the feedback. I believe the whitelist issue was fixed in the last release. I thought the directory naming issue had been fixed but we should look into that again. Does the DRM::Deep message go away when you run the script as administrator? I have never experienced the error message, but it could also be related to the directory names, as fergulator recently mentioned. Cheers, Cliffe. - cliffe - 2011-02-28 newphreak Wrote:I have the same "issue" as stated earlier in this thread, i guess a simple regex would be the fix for this. Some episode titles also include those phrases, also roman numerals complicates things. Could you give some filename examples? - cliffe - 2011-02-28 spyvingen Wrote:Hi i would love for this app to be an exe that has built in timer and a gui for settings is that totally out of the question? I don't mind incorporating GUI features to make the tool easier to use. A GUI probably wouldn't need a timer, it could use the scheduling tools in Linux and Windows. It's just a matter of finding the time. I doubt the GUI would be an .exe, but it could be an argument to the script, and a .cmd/.sh could be included for easy access to the GUI. Anyway, it could just be a matter of including specially formatted lines in the config file that could tell the GUI about the arguments to ask the user for. Please step forward if this sounds like a fun challenge to code. - cliffe - 2011-02-28 fergulator Wrote:Hey Cliffe - Thanks. I love sorttv. Exactly what I was looking for. So, I was getting the same mysterious TVDB API error. Found out that it related to the source folder name I was using (was 'unsorted media') on Windows. When calling the pl, I surrounded the path with quotes; it executed fine, but I got the TVDB error. Changing the directory names to non-spaced fixed it for me. Interesting, what happens if you run the script as administrator? (Since that was mentioned as also being a fix to the problem.) Thanks for sharing. It would be helpful if you could figure out which line in the script was throwing the error. - cliffe - 2011-02-28 carmenm Wrote:If i am correct looking at this script description, it does the same thing as therenamer on windows? SortTV has lots more features, and is designed to do automatic sorting. That program is mostly for renaming files without moving them (which SortTV can also do). Yes, I would like to include movie sorting (although I won't actually use that feature). In a previous post I mentioned that a Perl module is available for querying themoviedb, but that for some reason it wasn't available from Strawberry Perl's CPAN. If someone looks into this we can add the feature. - cliffe - 2011-02-28 sh0stak Wrote:I have tried searching this thread with no luck. I just wanted to see if anyone has setup a way to sort by MOVE if you extracted a file, otherwise sort by COPY. Not currently. The feature to extract was added recently and just extracts into the same directory so that the files are then sorted along with everything else. The easiest solution would probably be to create a new subdirectory for the extraction, then make sure its empty after the sort. Please feel free to implement that. - cliffe - 2011-02-28 Justcop Wrote:Obviously this is a long thread and I haven't had chance to read through all of it but I just thought I'd add an idea. Yes, as mentioned previously movie sorting will hopefully eventually be added to the script. One way to make that happen is implement it 1. That could cause problems. In your downloading program set a different directory for completed downloads, and use that as your directory to sort. 2. Good question. Probably in most cases it would be ok, although maybe not always. With the default settings if the file is being moved, then a second attempt will skip because the destination file will exist. However, if compressed files are being extracted they could be moved before extraction finishes. |