Page 1 of 2

TV & Movie Script (Linux)

Posted: January 22nd, 2008, 1:43 pm
by rascalli
The script I use does the following  : (Many thanks to :popcornarsonist  ;) )


-Given a root Movie directory , it moves makes a new folder, using the Newzbin "nice" name , moves the .avi (after joining if needed) and the nfo to this folder and than removes the original folder in your "complete" directory.

-If you have a two cd movie, if joins the two using mencoder (you need to install this yourself) and then renames and moves it. If the avi was successfully moved, it removes the original folder in your "complete" directory.

-Given a root TV directory, it renames the episode to "Show Name - 1x01 - Episode Title.avi" and moves it to "Root TV Directory/Show Name/Season 1/Show Name - 1x01 - Episode Title.avi". If the avi was successfully moved, it removes the original folder in your "complete" directory.


For script : http://pastebin.com/f20152ed3

Script is for Linux.
Tested & Using on : Ubuntu 6.06.1 LTS (Server)
Only usable with newzbin set to categories

To Do  to get it working :

* Replace : WHERE_TO_SAVE_MOVIE_FILES to your storage folder for Movies

* Replace : WHERE_TO_SAVE_TV_FILES to your storage folder for Tv-shows

* Set it to : -x


Enjoy   ::)

Re: TV & Movie Script (Linux)

Posted: January 22nd, 2008, 8:02 pm
by Dan
I would kill to see a windows version of this script. It does exactly what I want to do but I have no spare box to run linux on to take advantage of it.

Re: TV & Movie Script (Linux)

Posted: January 23rd, 2008, 2:08 am
by rascalli
@ Dan, have a look here : http://forums.sabnzbd.org/index.php?topic=67.0

Spare PC is not that expensive , you can get a nice one for like 50 euro max.
For linux it does not need to be that powerfull

Re: TV & Movie Script (Linux)

Posted: January 27th, 2008, 4:50 pm
by chokomon
This isn't working for me.

The SAB log shows the script being called, but nothing happens.

(Using ubuntu 7.10)

Re: TV & Movie Script (Linux)

Posted: January 28th, 2008, 12:08 am
by rascalli
did you do the following :

* Replace : WHERE_TO_SAVE_MOVIE_FILES to your storage folder for Movies

* Replace : WHERE_TO_SAVE_TV_FILES to your storage folder for Tv-shows

* Set it to : -x

Also these folders need to be make by you , and set so that sabnzbd can write in it.
If it's called , what does the script log say ? (it's in /var/log/sab_proc.log )

Re: TV & Movie Script (Linux)

Posted: January 28th, 2008, 7:47 am
by chokomon
Yep, did the replacing and the -x

I looked in /var/log and didn't see a sab_proc.log file

Folders are already made -- what exactly do I need to do to "set so that sabnzbd can write in it"?

Thanks!

Re: TV & Movie Script (Linux)

Posted: January 28th, 2008, 12:31 pm
by rascalli
make sure the file is set to 777

By the way , this only works for newzbin downloads.
And you need to set it that newzbin uses categories

Re: TV & Movie Script (Linux)

Posted: February 2nd, 2008, 11:27 am
by chokomon
Did all that and still not working.  No sab_proc file is created in /var/log

The sabnzbd log shows the script being run, though:

2008-02-02 11:16:52,645::INFO::[assembler] Running external script /home/User/SABnzbd-0.3.0/downloadscript.sh /home/User/Downloads/Newsgroups/alt.binaries.tv/TV/All/name_tv_show.nzb
2008-02-02 11:16:52,646::INFO::[newsunpack] Spawning external command ['/usr/bin/nice', '/home/User/SABnzbd-0.3.0/downloadscript.sh', '/home/User/Downloads/Newsgroups/alt.binaries.tv/TV/All/name_tv_show.nzb', 'msgid_28782XXX name_tv_show.nzb', 'name_tv_show.nzb', '2878xxx']



Rascalli edit : Edited out the name of the TV-show ...

Re: TV & Movie Script (Linux)

Posted: February 2nd, 2008, 11:53 am
by rascalli
I hope I know found the problem.

You download into : Newsgroups/alt.binaries.tv/TV
Looks like you sort by newsgroup also.

I only sort by category.

So when root download folder is : Newsgroups, mine is like this : Newsgroups/TV

I hope this is it ...

Re: TV & Movie Script (Linux)

Posted: February 2nd, 2008, 12:25 pm
by chokomon
OK - I set SAB to only create root category.  It now puts the file in Newsgroups/TV/All/[program name]

Script still didn't do anything.

Re: TV & Movie Script (Linux)

Posted: February 2nd, 2008, 1:03 pm
by rascalli
It should go into : Newsgroups/TV

where does that all come from ?


What is your complete folder ?
And where is your TV root directory that the script should write to ?
In my set-up I don't have them as the same folders .. so maybe that is the problem.

Otherwise I have no idea , as this is not my script .. so no idea hwere it goes wrong than, as I have it working on more pc's , all running Debian/Ubuntu

Re: TV & Movie Script (Linux)

Posted: February 2nd, 2008, 9:14 pm
by chokomon
No idea where the "All" folder is coming from.

The only two switches I see that apply are:

Create group Folders:
Place downloads into group folders.
No Yes

(currently set to NO)

Create Category Folders:
Place downloads into newzbin.com category folders.
No Root Root+Sub

(currently set to ROOT)

My complete folder is different from the TV root directory the script should write to.

Re: TV & Movie Script (Linux)

Posted: February 3rd, 2008, 1:00 am
by rascalli
very strange , than unfortunately I am out of idea's

Re: TV & Movie Script (Linux)

Posted: February 4th, 2008, 2:16 pm
by trax
While trying to make sure windows version worked I had to manually call the process and the parameter
python aftersab.py "Directory"
I'd try running the folder name like:
from terminal
PostProc.sh "/home/newsgroups/tv/Path to run script on"
of course you will use your actual CaSe SenSiTiVe path.
This way you should see what is happening.
once you resolve the problem(s) then see if you can get it automated again.
You also said TV/ALL, sounds like it was using Root+Sub" not just Root.
That would happen if you switched it after the report was already added.
Try again on a new post.

Good luck

Re: TV & Movie Script (Linux)

Posted: February 4th, 2008, 2:40 pm
by rascalli
A restart of sabnzbd+ after changes can also be helpfull