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 XBMC (/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


- tazdk - 2011-09-08 14:36

hi love you script
is ther any way to force the first letter to be uppercase?


- cliffe - 2011-09-11 04:20

Headcase_Fargon Wrote:Sorry if this has been answered before, but what's the best way to go about updating SortTV? Can I simply replace sorttv.pl with the one in the zip and leave everything else as is?

I'd prefer to not have to redo my sorttv.conf if it's not necessary.

SortTV should be compatible with configs from previous versions, except that newer features may not be configured.

As I have posted before:

cliffe Wrote:For keeping your config across updates:
  • You can put all your changes in a secondary config, then you would only need to update the new config with one line at the end pointing to your config;
  • You can just replace the config file with your old one, but new features will just run with their default settings; or,
  • You could just use arguments to configure it when starting SortTV (for example, in your crontab).



- cliffe - 2011-09-11 04:22

Capt.Insano Wrote:FIXED!!

Must have been an updating config issue or a permissions issue, completely removed sortTV, started again and now working again!!

Sorry about that Cliffe!!

Gfei Wrote:Latest update is pretty sweet, I've been looking for a movie sorting option under linux for a while now. One thing i noticed, the script seems to simply remove "-" without putting a space in it's place like it does with periods. This causes misspellings in the movie names so the movie title can't be found in MovieDB.

These issues should now be fixed for the next release. Thanks for letting me know.

Since there have been quite a few downloads and few issues reported, I have set 1.31 as the default download for SortTV. I am interested in hearing from some Windows users to confirm that they could install the CPAN module, and that the movie sort feature is working.


- cliffe - 2011-09-11 04:24

tazdk Wrote:hi love you script
is ther any way to force the first letter to be uppercase?

The capitalisation for TV shows and movies is based on the titles as they appear in thetvdb or tmdb online databases.


- butcherbird - 2011-09-11 08:14

I love this script. Unfortunately it's hanging for me on linux all of a sudden. Even the old versions back to 1.27 that I still had on the box are not completing so it's something environmental. Now.. I'm not sure what is going on. I've narrowed it down to this if condition:

if(move_episode($pureshowname, $showname, $series, $episode, $year, $file) eq $REDO_FILE) {
out('std','test line 474',"\n");
redo FILE;
}
If I comment that out it completes fine though it doesn't actually sort anything.

I think its looping or something but its not doing the 'redo FILE' that I can tell because my 'test line 474' line I dropped in the script isn't showing up in std output... I'm not a perl guy, pasting in those little debug std outs to narrow down the condition is about the extent of my abilities... Anyone ran into it just hanging like this?

http://pastebin.com/S30YnpmE


- cliffe - 2011-09-11 09:46

butcherbird Wrote:I love this script. Unfortunately it's hanging for me on linux all of a sudden. Even the old versions back to 1.27 that I still had on the box are not completing so it's something environmental. Now.. I'm not sure what is going on. I've narrowed it down to this if condition:

if(move_episode($pureshowname, $showname, $series, $episode, $year, $file) eq $REDO_FILE) {
out('std','test line 474',"\n");
redo FILE;
}
If I comment that out it completes fine though it doesn't actually sort anything.

I think its looping or something but its not doing the 'redo FILE' that I can tell because my 'test line 474' line I dropped in the script isn't showing up in std output... I'm not a perl guy, pasting in those little debug std outs to narrow down the condition is about the extent of my abilities... Anyone ran into it just hanging like this?

http://pastebin.com/S30YnpmE

Hmmm. It is likely something inside the move_episode function. It would be great if you could try your debug line approach inside that function, and see how far it gets.


- Nexxo - 2011-09-11 15:10

Hi, I'm trying to get SortTV to work, but I keep getting the same error so wondering if you can shed some light on it.

I'm running Ubuntu 11.04 Server.

Whenever I run sorttv, this is the output I get.

Code:
Sorting:
    From /var/downloads/Linked/Tosh.0.S01.MiXED.XVID-BTN/
    TV episodes into /opt/tvsort/current/test/
22:29:14, 11-8-2011
INFO: trying to move Tosh 0 season 1 episode 1

mismatched tag at line 6, column 2, byte 160 at /usr/lib/perl5/XML/Parser.pm line 187

Any ideas?

Cheers,
Dave


- megacrypto - 2011-09-13 21:26

been away for a long time, just re-done my new server with ubuntu 11.04 and when running the following to test:
Code:
/home/mylin/sorttv/sorttv.pl

i get the following:
Code:
Can't locate WWW/TheMovieDB/Search.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at /home/mylin/sorttv/sorttv.pl line 49.
BEGIN failed--compilation aborted at /home/mylin/sorttv/sorttv.pl line 49.

any ideas?

thanks ... and great script

Fixed: I had to do the following:
Code:
sudo cpan WWW::TheMovieDB::Search



- Nexxo - 2011-09-16 12:10

Nexxo Wrote:Hi, I'm trying to get SortTV to work, but I keep getting the same error so wondering if you can shed some light on it.

I'm running Ubuntu 11.04 Server.

Whenever I run sorttv, this is the output I get.

Code:
Sorting:
    From /var/downloads/Linked/Tosh.0.S01.MiXED.XVID-BTN/
    TV episodes into /opt/tvsort/current/test/
22:29:14, 11-8-2011
INFO: trying to move Tosh 0 season 1 episode 1

mismatched tag at line 6, column 2, byte 160 at /usr/lib/perl5/XML/Parser.pm line 187

Any ideas?

Cheers,
Dave

I don't know what I did, but I messed around in CPAN / perl. Installing and uninstalling things and it now working.

It does give me this error message now
Code:
could not find ParserDetails.ini in /usr/local/lib/perl5/site_perl/5.15.2/XML/SAX
But I can live with that. Awesome script Big Grin


- mcduff - 2011-09-19 06:34

I'm having a slight issue with this excellent script. I set it up, loaded all the required modules etc and ran. The images from tvdb are all corrupt. The movie ones were fine however the tv episode ones were all bad. I used activestate perl but tested again on another box with strawberry perl and got exactly the same result. I'm sort of expecting that something is wrong at the tvdb side however since nobody else is commenting I'm now wondering if I've done something wrong. Any thoughts?

thanks
Mcduff


- cliffe - 2011-09-19 12:31

mcduff Wrote:I'm having a slight issue with this excellent script. I set it up, loaded all the required modules etc and ran. The images from tvdb are all corrupt. The movie ones were fine however the tv episode ones were all bad. I used activestate perl but tested again on another box with strawberry perl and got exactly the same result. I'm sort of expecting that something is wrong at the tvdb side however since nobody else is commenting I'm now wondering if I've done something wrong. Any thoughts?

thanks
Mcduff

Unfortunately this is a known limitation of the TVDB module on Windows. I believe the reason for this is that the module does not switch to binary mode before writing the file. If you want, you could remind the author of that great Perl module (search "Perl CPAN TVDB"). I recommend you disable downloading TV images.


- mcduff - 2011-09-19 23:53

cliffe Wrote:Unfortunately this is a known limitation of the TVDB module on Windows. I believe the reason for this is that the module does not switch to binary mode before writing the file. If you want, you could remind the author of that great Perl module (search "Perl CPAN TVDB"). I recommend you disable downloading TV images.

Great thanks cliff. I guess I can stop sinking time into it now I know it's not not a problem at my end.

cheers


- Pablohoney - 2011-09-25 02:41

Hey Cliffe,
I've been real busy lately and I'm hoping I'll be able to help personally to give me a chance to learn some perl. (too bad you didn't choose python, but anyway) I just tested your 1.31 update with a handful of files below and I just want to show you what I got out of it. I'm sorry I didn't respond earlier when you asked for examples.

Quote:AVIATOR xvidDVDrip.avi
Indiana Jones And The Last Crusade.avi
Indiana Jones and the Temple of Doom.avi
Logan's Run [XviD][DVDRip][1976].avi
Moon.2009.DVDRip.XviD-LAP.avi
Pirates of the Caribbean On Stranger Tides XViD - IMAGiNE.avi
Pixar Classic - 01 - Toy Story.avi
Silence of the Lambs.avi
Willy Wonka and the Chocolate Factory (DivX).avi

Quote:Indiana Jones and the Last Crusade
The Silence of the Lambs
Moon 2009
Willy Wonka & the Chocolate Factory
The Aviator

I find the "Indiana Jones and the Temple of Doom.avi" the most curious.

I also have a feature request that I hope to maybe implement myself someday. I'd like to be able to pick a preferred format and/or quality to keep in case there are multiple.

Great work Cliffe!


- sheka - 2011-09-25 12:41

cliffe Wrote:Hmmm. It is likely something inside the move_episode function. It would be great if you could try your debug line approach inside that function, and see how far it gets.

butcherbird Wrote:I love this script. Unfortunately it's hanging for me on linux all of a sudden. Even the old versions back to 1.27 that I still had on the box are not completing so it's something environmental. Now.. I'm not sure what is going on. I've narrowed it down to this if condition:

if(move_episode($pureshowname, $showname, $series, $episode, $year, $file) eq $REDO_FILE) {
out('std','test line 474',"\n");
redo FILE;
}
If I comment that out it completes fine though it doesn't actually sort anything.

I think its looping or something but its not doing the 'redo FILE' that I can tell because my 'test line 474' line I dropped in the script isn't showing up in std output... I'm not a perl guy, pasting in those little debug std outs to narrow down the condition is about the extent of my abilities... Anyone ran into it just hanging like this?

http://pastebin.com/S30YnpmE


I have the same issue = Ubuntu Server - Perl version 5.8.8

I get the message

MOVE EPISODE: sorting x/x/x/x --to--> x/x/x/x/x

but it just hangs and doesn't returns....

strange things is that it actually moves the file


- cliffe - 2011-09-25 16:53

Pablohoney Wrote:Hey Cliffe,
I've been real busy lately and I'm hoping I'll be able to help personally to give me a chance to learn some perl. (too bad you didn't choose python, but anyway) I just tested your 1.31 update with a handful of files below and I just want to show you what I got out of it. I'm sorry I didn't respond earlier when you asked for examples.





I find the "Indiana Jones and the Temple of Doom.avi" the most curious.

I also have a feature request that I hope to maybe implement myself someday. I'd like to be able to pick a preferred format and/or quality to keep in case there are multiple.

Great work Cliffe!

Thanks for the feedback. SortTV sorts nearly every filename PMed to me when I added the feature. I'll update SortTV to try to get those ones you mentioned right for the next version.

I look forward to receiving some code from you soon. Don't worry, you will learn to love Perl. I suggest you start by looking for a CPAN Perl module that can give you the information you need (for example, video resolution), and check the module is available on Linux and Windows.

Thanks again.