SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for XBMC (/forumdisplay.php?fid=116)
+--- Thread: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) (/showthread.php?tid=75949)
- Holdengts - 2011-04-17 04:30
I am currently getting this error message
DBM : : Deep: Wrong file version found - 4 - expected 3 at sorttv.pl line 139
How would I solve this please?
- cliffe - 2011-04-18 09:45
timgray Wrote:So any tips on how to disable the "season" subfolders?
If you want to hack at the code to remove season directories:
Line ~1062 of sorttv.pl looks something like this:
That is the part that looks for a matching season directory.
You could try replacing those lines with some code that just sets the $season variable to $show (or just uses $show instead) so that it just puts episodes in the show directory rather than a season directory.
So you could try something like:
Keep in mind that this is just a quick hack, and I haven’t tested this suggestion. A better solution would be to make this a configurable option, in case others are interested in this feature. Feel free to send me a patch!
- cliffe - 2011-04-18 09:46
Holdengts Wrote:Hi There
Please try deleting the ".cache" subdirectory in the sorttv directory.
- cliffe - 2011-04-18 09:49
freaktm Wrote:+1 on that - with that option, sorting music would be a lot easier!
Glad to hear you sorted that out.
Only episodes are moved into "Show/Season x/" directories, so it won't affect sorting of music. Check out the new feature for sorting music, described in an earlier post.
- sh0stak - 2011-04-26 17:03
Happy to see SortTV now handles extraction. I have a question about it though.
How I am running right now: finished downloads go into a /new folder where they are sorted from. I am using copy-and-leave-symlink so that files can continue to seed. This works fine for non-archived files.
For archives I had a problem where the .r## (but not .rar) were being copied/symlinked also. I added a blacklist entry for *.r(0-9)* (a separate entry for each digit), so now all the rar files remain untouched and seed just fine. The extracted video file is sorted fine and the extraction folder and symlink is left behind even though I never use it (this is fine, they just get delete once seeding is complete and take up no space).
The problem: Every time sorttv runs, it appears to re-extract the file since all the archives are still there. I cannot tell if it is actually extracting the file or not though, all that is in the extracted directory is a symlink so it looks like the actual extraction is skipped, but still displayed in the log. I know sorttv is smart enough to not re-copy files that are already sorted (dont move/copy if the destination file already exists) but does it do the same with extraction?
Here is sample log output if my point is not clear:
New version available - cliffe - 2011-04-29 16:23
This is just a minor update, changing the way that archives are handled.
As always, donations are appreciated!
sh0stak Wrote:Happy to see SortTV now handles extraction. I have a question about it though.
With this update, if the file has already been extracted (and the extracted folder is still there) then extraction is skipped. I also added those file names you mentioned to the blacklist.
- newphreak - 2011-05-05 08:13
Hi, I really miss the library update when sorting is done. How would i setup this with pre eden xbmc? i guess i should conf the new xbmc communication setting, but how does it work when you have a username and password and it's running on another box? I would appreciate some better examples in the conf for this. Other then that, great work updating and including new and good features for this script. Can't wait to see an official Add-on for this.
Looked at the script, and i guess this protocol only needs ip, and judging by my xbmc.log it is hosting at 9090. But i don't get any library updates when it has new episodes, so how could i debug this?
- newphreak - 2011-05-05 19:07
Also i would like to do a feature request, i would like to extract compressed files after sorting. So i don't mess up what I'm copying from.
Edit: i tried "extract-compressed-before-sorting=TRUE" with "sort-by=COPY", but it does not seem to unpack the content, and there is no error about it in the log, extracting is not even mentioned. I have made sure unrar is installed too. So I'm not able to see if my feature request is needed or not, as i cant get it to work.
- cliffe - 2011-05-10 16:53
newphreak Wrote:Hi, I really miss the library update when sorting is done. How would i setup this with pre eden xbmc? i guess i should conf the new xbmc communication setting, but how does it work when you have a username and password and it's running on another box? I would appreciate some better examples in the conf for this. Other then that, great work updating and including new and good features for this script. Can't wait to see an official Add-on for this.
Yesterday I updated to a newer version of xbmc on my HTPC and I have started seeing the same thing. On my dev box the library update works fine during testing, but on the HTPC it is receiving and displaying the notifications but not looking for new content.
I have both the old and new command interface setup in my SortTV configuration.
My first guess is that the interface for RPC commands has changed yet again. I don't have time to investigate this right away, but if someone else has the time to get to the bottom of this it would help a lot of users
- cliffe - 2011-05-10 17:09
newphreak Wrote:Also i would like to do a feature request, i would like to extract compressed files after sorting. So i don't mess up what I'm copying from.
If extraction is enabled and it can't find a program to do the extraction it should say so. Perhaps try creating some more .zip/.rar files and putting them in the directory you are sorting to see what happens.
- vikjon0 - 2011-05-13 17:56
I just got the daily shows working in xbmc with sorttv! You should promote this functionality a bit more e.g. in the feature list!
I manage to miss it and only found out when I tried to review the code to do it myself. (pretty tricky code btw).
It is more or less impossible to get to work in xbmc without a rename to the s99e99 format due to the limitations in thetvdb (well, or due to limititations in the scrapers)
My conf was correct to do this already, the issue was name format (did not work with liberal matching for some reason)
Best fixed by defining the shows in the conf
Perhaps you want to add these to the templete or else someone might want to copy it.
- cliffe - 2011-05-13 20:10
vikjon0 Wrote:I just got the daily shows working in xbmc with sorttv! You should promote this functionality a bit more e.g. in the feature list!
Glad you found the daily show name matching feature helpful. Credit to CoinTos for contributing the code.
If liberal matching is enabled, it basically pulls any numbers out of the filename for the season and episode numbers. Handy for filenames such as "Show Ser 1 Epi 2.avi", but I don't have it enabled on my system and havn't needed it. As you found out, it tries liberal matching before it tries dates.
Thanks for the config lines, I will add them to the next version.
Since you have already had a look at the code, remember I am always happy to receive patches, so if you can think of any other features or want to have a crack at one of the features we have discussed (movie sorting, multi-episode files, the xbmc interface), then please go for it!
- vikjon0 - 2011-05-14 13:12
Turns out the place where i procure the shows is not too bothered with the naming of daily shows. All (so far) have to be identified.
(assumimg we only download current conan)
(assuming we only down curremt Jay)
- vikjon0 - 2011-05-14 13:31
Quote:Since you have already had a look at the code,Well, so far my conclusion is that it looks tricky. I don't know perl and I never figured out regex. Not knowing a language have never stopped me from reading code before, but perhaps it is time to read up on regex.
Do you have a feature request list?
The music folder is a great addition (altough I have to pretend it says audio since I am an audiobook addict)
I think more folders would be useful.
Of course separating movies from other non-episodes would be great. Sorting the movies would be even greater.
I assume a full solution is a lot of work but one fix would be to handle it like music, if non-ep then check if video and move to video folder ("non-ep video").
An "assumed to be crap if found togther with media files" folder would also be nice.
.txt, .nfo etc is moved to this folder if found together with e.g. a tv serie
This folder can then be checked and emptied and the files will not be mixed with non episodes or non sorted material.
An alternative to the last thing would be another blacklist, instead of the existing ignore-list the new list will send matches to a another folder.
- cliffe - 2011-05-14 16:03
vikjon0 Wrote:Well, so far my conclusion is that it looks tricky. I don't know perl and I never figured out regex. Not knowing a language have never stopped me from reading code before, but perhaps it is time to read up on regex.
Not formally. Feel free to mention any ideas here. The ones I mentioned are the main outstanding ones.
vikjon0 Wrote:The music folder is a great addition (altough I have to pretend it says audio since I am an audiobook addict)
I think the best way to do movie sorting would be to look it up on the moviedb: for example, using a perl module.
If there is a match, then rename using the movie title (and year?) and move it to a movie directory. Optionally in a subdirectory for the movie.
As I mentioned in a previous post this module looks promising, but for some reason is not available in Strawberry Perl CPAN:
I haven't looked into it any further, but it would be great if someone could look into why Perl and Strawberry Perl have separate modules available via CPAN.