XBMC Community Forum
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 Kodi (/forumdisplay.php?fid=116)
+--- Thread: SortTV: Sort TV episodes, movies, and music into directories for xbmc (Linux/Win/Mac) (/showthread.php?tid=75949)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44


- mybrain87 - 2011-10-29 22:16

I'm really liking this script a lot.
But one thing would make it perfect for me.

Is there a way to have multiple sort-to-directories?

I have multiple drives which each have a TV Show folder and i'd like the script to check them all for a specific show and move it there.


- vikjon0 - 2011-10-30 09:43

Quote:Would it be possible to get an option to have the script check for any .part files in the folder and not extract until there are none?
OR have the torrent client move the files to the sort folder when complete.


- vikjon0 - 2011-10-30 09:44

Quote:I have multiple drives which each have a TV Show folder and i'd like the script to check them all for a specific show and move it there.
You need to add a database to keep track of locations. I am guessing that is out of scope. Take a look at sickbeard, it does that.


- mybrain87 - 2011-10-31 12:20

vikjon0 Wrote:You need to add a database to keep track of locations. I am guessing that is out of scope. Take a look at sickbeard, it does that.

symlinking them into one directory seems to do the trick too and is probably alot faster and simpler than creating a database


- cliffe - 2011-10-31 15:30

mybrain87 Wrote:I'm really liking this script a lot.
But one thing would make it perfect for me.

Is there a way to have multiple sort-to-directories?

I have multiple drives which each have a TV Show folder and i'd like the script to check them all for a specific show and move it there.

As previously discussed:
cliffe Wrote:To clarify, SortTV only sorts into one directory at a time, but it is easy to script it to sort into multiple directories. That is achieved by telling it to sort into your destination directories one at a time: tell it to sort to your "A" directory, then run it again telling it to sort into your "B" directory, etc.

You need to tell it to only sort episodes into the directory if the show directory already exists (eg "A Show 1", which you have manually created). See the post I linked to to see how.

How to do this seems to be a common question, so I might add a feature to SortTV later, to make it easier.
cliffe Wrote:please see this post, which is related. Basically you could manually create the show directory in the high level directory you want it to be in, and tell SortTV to only sort files if the corresponding show directory already exists.

I hope this helps.


- cliffe - 2011-10-31 15:35

vikjon0 Wrote:OR have the torrent client move the files to the sort folder when complete.

Just set your torrent client to move to a directory once downloads are complete. Nearly all download programs have that feature. Then if you want to keep seeding you can choose to copy or link instead of move. If you "leave symlinks behind" there is another option to remove the ones left previously. If you poke around in the config file you can hopefully find everything you need.


Almost working... - spazlon - 2011-11-06 06:14

I just have one last issue. I can't extract rar files for some reason.

C:\Users\Ryan>PERL c:\strawberry\sorttv\sorttv.pl
SortTV
~~~~~~
Sorting:
From D:/New Downloads/New Shows/
TV episodes into D:/New Downloads/TV Shows/
10:6:8, 6-10-2011
WARN: could not create directory: /D:/New Downloads/New Shows/An.Idiot.Abroad.S0
2E07.HDTV.XviD-TLA/an.idiot.abroad.s02e07.hdtv.xvid-tla.rar (extracted by SortTV
) (Invalid argument), extracting to D:/New Downloads/New Shows/An.Idiot.Abroad.S
02E07.HDTV.XviD-TLA/
'rar' is not recognized as an internal or external command,
operable program or batch file.
RAR: extracting D:/New Downloads/New Shows/An.Idiot.Abroad.S02E07.HDTV.XviD-TLA/
an.idiot.abroad.s02e07.hdtv.xvid-tla.rar into D:/New Downloads/New Shows/An.Idio
t.Abroad.S02E07.HDTV.XviD-TLA/
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r00
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r01
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r02
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r03
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r04
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r05
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r06
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r07
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r08
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r09
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r10
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r11
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r12
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r13
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r14
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r15
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r16
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r17
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.rar

I have WinRAR installed as my default RAR client. Should I use something else?


- cliffe - 2011-11-06 08:27

spazlon Wrote:I just have one last issue. I can't extract rar files for some reason.

C:\Users\Ryan>PERL c:\strawberry\sorttv\sorttv.pl
SortTV
~~~~~~
Sorting:
From D:/New Downloads/New Shows/
TV episodes into D:/New Downloads/TV Shows/
10:6:8, 6-10-2011
WARN: could not create directory: /D:/New Downloads/New Shows/An.Idiot.Abroad.S0
2E07.HDTV.XviD-TLA/an.idiot.abroad.s02e07.hdtv.xvid-tla.rar (extracted by SortTV
) (Invalid argument), extracting to D:/New Downloads/New Shows/An.Idiot.Abroad.S
02E07.HDTV.XviD-TLA/
'rar' is not recognized as an internal or external command,
operable program or batch file.
RAR: extracting D:/New Downloads/New Shows/An.Idiot.Abroad.S02E07.HDTV.XviD-TLA/
an.idiot.abroad.s02e07.hdtv.xvid-tla.rar into D:/New Downloads/New Shows/An.Idio
t.Abroad.S02E07.HDTV.XviD-TLA/
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r00
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r01
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r02
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r03
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r04
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r05
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r06
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r07
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r08
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r09
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r10
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r11
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r12
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r13
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r14
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r15
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r16
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.r17
SKIP: Matches ignore list: an.idiot.abroad.s02e07.hdtv.xvid-tla.rar

I have WinRAR installed as my default RAR client. Should I use something else?

That first directory creation warning message looks to be specific to Windows, but shouldn't stop the extraction from working.

Is the extraction succeeding? If the extraction is failing, I suggest you install 7zip. Please let us know if installing 7zip resolves everything.


- spazlon - 2011-11-06 10:25

cliffe Wrote:That first directory creation warning message looks to be specific to Windows, but shouldn't stop the extraction from working.

Is the extraction succeeding? If the extraction is failing, I suggest you install 7zip. Please let us know if installing 7zip resolves everything.

The extraction fails. I uninstalled WinRAR and installed 7Zip.

Same errors.


- spazlon - 2011-11-06 10:30

I have another weird issue as well.

All the artwork downloaded is corrupted. The files are there but I can't open them.

None of these are huge deals, I am going to donate tonight anyway. Right now I am using SCRU to automatically unrar and I use metabrowser to download the artwork. It would just be nice to have it all in one program.

Thanks for the help!


- cliffe - 2011-11-06 11:54

spazlon Wrote:I have another weird issue as well.

All the artwork downloaded is corrupted. The files are there but I can't open them.

None of these are huge deals, I am going to donate tonight anyway. Right now I am using SCRU to automatically unrar and I use metabrowser to download the artwork. It would just be nice to have it all in one program.

Thanks for the help!

Yeah, that is a known bug on Windows in one of the modules SortTV uses. As a result tv show images don't download correctly on Windows (it works on Linux though). Movie images should download correctly.

I am glad you have everything working, and hopefully SortTV can provide as much automagic as possible. Thanks, all donations are really appreciated.


- cliffe - 2011-11-06 12:01

spazlon Wrote:The extraction fails. I uninstalled WinRAR and installed 7Zip.

Same errors.

Ahh, ok, looks like a problem with the way I coded the error checking, not having been tested much on Windows.

If you would like to help this get fixed, could you please edit sorttv.pl and add this:

Code:
my $test = system("rar e -o$over '$arfile' '$dest'");
print "Return code: $test\n";

at line 1105 (just before "if(num_found_in_list(system("rar e -o$over '$arfile' '$dest'"), @errors) eq "FALSE") {")

And then tell me what that prints out next time you run it.


- Novanod - 2011-11-14 21:00

Greetings... i may be coming off stupid or some where in that area. but this has gone right over my head...
please verify and answer... in order for sorttv to work i have to have perl installed... 'Did that'
copied sorttv folder to users/name/sorttv
followed README file and ran 'cpan File::Copy::Recursive File::Glob LWP::Simple TVDB::API Getopt::Long Switch WWW::TheMovieDB::Search XML::Simple' in windows start command line box...
it installed the command lines i expect in order to run the sorttv app, took about 4 minutes

now editing the sorttv config file...
my new downloads are on my e:/downloads/new
and i would like the sorted files to be placed on the same drive e:/tvseries
would i change the config file to read as such...
"directory-to-sort=e:/downloads/new"
"tv-directory=e:/tvseries"

which i did, and double clicked on sorttv.pl and a dos box opened and closed and nothing... in the dos box i glimsed a error of "can't locate www/themoviedb/search.pm..............at sorttv.pl line 49..................begin failed"

what am i doing wrong? do i not have everything installed correctly or the tv episodes in the wrong place (they all together) is the config file line wrong...

could someone go through a step by step installation on getting this working... thank you and i appreciate the effort in other peoples work to make my life simpler with a tool like this... how much time i have spent renaming and sorting...

running windows 7 32bit - latest SortTV1.31 and ActivePerl-5.14.2.1402-MSWin32-x86-295342 as of todays date...

EDIT---- I placed a # sign on line 49 in the sorttv.pl file to ignore searching themovieDB...(i am more interested in my tv series than movies... it now scans and renames and places the episodes in the correct areas - BUT the images are all corrupt as spazlon stated above... hope this is sorted in the near future


- spazlon - 2011-11-15 06:47

cliffe Wrote:Ahh, ok, looks like a problem with the way I coded the error checking, not having been tested much on Windows.

If you would like to help this get fixed, could you please edit sorttv.pl and add this:

Code:
my $test = system("rar e -o$over '$arfile' '$dest'");
print "Return code: $test\n";

at line 1105 (just before "if(num_found_in_list(system("rar e -o$over '$arfile' '$dest'"), @errors) eq "FALSE") {")

And then tell me what that prints out next time you run it.

I just saw this message. I will add it today and get back to you.

Thanks for the help.


- spazlon - 2011-11-15 06:56

Novanod Wrote:running windows 7 32bit - latest SortTV1.31 and ActivePerl-5.14.2.1402-MSWin32-x86-295342 as of todays date...

Cliffe will be able to answer better, but ActivePerl might be the problem. I tried other Perl versions and had problems as well. You may want to try Strawberry Perl.

As far as the artwork goes, not sure what to tell you. There are several programs out there that will download the artwork. I have used themetabrowser in the past and it worked well. http://themetabrowser.com/

Let me know if you find a better alternative.