TV & Movie Script (Linux)
TV & Movie Script (Linux)
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 ::)
-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 ::)
Last edited by rascalli on January 28th, 2008, 12:31 pm, edited 1 time in total.
Re: TV & Movie Script (Linux)
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)
@ 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
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)
This isn't working for me.
The SAB log shows the script being called, but nothing happens.
(Using ubuntu 7.10)
The SAB log shows the script being called, but nothing happens.
(Using ubuntu 7.10)
Re: TV & Movie Script (Linux)
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 )
* 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)
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!
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)
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
By the way , this only works for newzbin downloads.
And you need to set it that newzbin uses categories
Last edited by rascalli on January 28th, 2008, 2:21 pm, edited 1 time in total.
Re: TV & Movie Script (Linux)
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 ...
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 ...
Last edited by rascalli on February 4th, 2008, 2:43 pm, edited 1 time in total.
Re: TV & Movie Script (Linux)
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 ...
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)
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.
Script still didn't do anything.
Re: TV & Movie Script (Linux)
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
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
Last edited by rascalli on February 2nd, 2008, 1:12 pm, edited 1 time in total.
Re: TV & Movie Script (Linux)
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.
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)
very strange , than unfortunately I am out of idea's
Re: TV & Movie Script (Linux)
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
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
Last edited by trax on February 4th, 2008, 2:19 pm, edited 1 time in total.
Re: TV & Movie Script (Linux)
A restart of sabnzbd+ after changes can also be helpfull