Page 1 of 2
Movie renaming based upon imdb
Posted: December 24th, 2008, 10:39 pm
by SukkaFoo
Hi all
So I was wondering if there is a script out there which would rename downloaded movies to the proper name, possibly based upon info pulled from IMDB? I have seen something similar on NZBget before (pulls the age rating, year, etc and includes in the name of the file)
Thoughts?
Re: Movie renaming based upon imdb
Posted: December 25th, 2008, 7:26 pm
by switch
I do have python code that will fetch the proper name from imdb, I'll see if I can work it into a script next week. 0.5 will rename files based off of the nzb name with support for CD1 CD2 ect, so I could re-use that code for this purpose.
Re: Movie renaming based upon imdb
Posted: January 10th, 2009, 8:54 pm
by jl0810
Switch - do you happen to have the Python code? I would LOVE to integrate this into the fantastic scripts that others have been developing on this website (big fan of both the conversion one(s) as well as the automatic downloaders)
Renaming the movies in the last step I have left
(actually to be honest I would really want to rename, and also use atomicparsley to tag some other data as well in the file such as genre, rating etc - I know Metax does this for free, but I don't have a MAC yet)
Re: Movie renaming based upon imdb
Posted: January 11th, 2009, 11:15 am
by switch
I have the imdb searching python code, pretty basic with little error handling. The renaming code is in the 0.5 source code, and may be too hard to separate. Probably best just waiting till 0.5.
If you want to see the renaming, see GenericSorter
here.
Re: Movie renaming based upon imdb
Posted: January 11th, 2009, 1:54 pm
by Camelot
Does anyone know of any python code that can extract any meta data from imdb? I am currently using tagchimp, which often is lacking, and would prefer to use imdb as a source.
Oh, and there is a metax version for windows now:
http://www.danhinsley.com/MetaX.htm
I am a mac user, so I can't vouch for it.
Re: Movie renaming based upon imdb
Posted: January 13th, 2009, 7:47 am
by jl0810
I downloaded the MetaX windows version - and while I think it's an ok port, i agree that it's lacking by only tagging with amazon and tagchimp. Personally I don't think you need anything that fancy to tag these movies, and simple post-processing scripts that writes the tag data (not sure how to do artwork) would be perfect. I think this forum is probably the place to solve this pesky problem. I bet doublerat could do it
Re: Movie renaming based upon imdb
Posted: January 13th, 2009, 7:58 am
by switch
Camelot wrote:
Does anyone know of any python code that can extract any meta data from imdb? I am currently using tagchimp, which often is lacking, and would prefer to use imdb as a source.
Oh, and there is a metax version for windows now:
http://www.danhinsley.com/MetaX.htm
I am a mac user, so I can't vouch for it.
What sort of meta data? Plot data and such?
Download my
XBMC Plugin and check out the files in the folder imdbAPI, it can retrieve a lot of information. The original file wasn't made by me, but I did do some minor editing. I think the credits are in the readme.
Re: Movie renaming based upon imdb
Posted: January 13th, 2009, 8:19 am
by jl0810
that's good stuff there. If i took imdbclient.py and wanted to mod it to be just a simple post processing script that fired immediately after job downloads, any ideas on what that Python code would look like? At the point, I believe only have the nzb job name available (or folder name). I need then to have imdbclient.py look up the meta data, and then I think I can fight through atomicparsley to tag the file with the returned metadata
Re: Movie renaming based upon imdb
Posted: January 13th, 2009, 1:06 pm
by Camelot
switch: yea, plot, artwork.. the works really
I will take a look at the plugin!
I have some python scripts here that use a slightly modified version of atomicparsley to tag movies and tv shows based upon their path and filename:
http://github.com/ccjensen
For movies I am using tagchimp (since IMDB doesn't have an API), and thetvdb.com for the tv episodes. They do artwork too.
They are both commandline, and as far as I know I am the only one who has ever used them.
C
Re: Movie renaming based upon imdb
Posted: January 13th, 2009, 6:48 pm
by pilGrim
Hi Switch,
For the feature in 0.5 any chance that after a download the code would name the file as well as the folder to the proper movie name? I use the folder name in Meedio and need it to be the proper movie name, otherwise I have post download manual work to do.
Also any I would greatly appreciate the ability or some code share that would allow me to process existing files. All my folder names are correct but my actual .avi and .mkv files are a big mess and I would like to go in and clean up all my movie file names (1 file or CD1, CD2, along with subtitle files). Not worried about tags, just want the file names to be clean.
Many man thanks in advance
Re: Movie renaming based upon imdb
Posted: January 13th, 2009, 7:09 pm
by switch
0.5 can rename the files based on the folder name (which is based upon the nzb name), with full support for CD1/CD2 files, and renaming subs ect. You won't find any imdb fetching code in any official sabnzbd released for certain reasons.
The renaming is run before the script, so if you want imdb name checking you would have to either add it to sabnzbd code, or control the names of the nzb's that get added to sabnzbd.
Re: Movie renaming based upon imdb
Posted: January 16th, 2009, 9:44 pm
by jl0810
is it possible to control the job name from the sabnzb api in 0.4.6?
Re: Movie renaming based upon imdb
Posted: January 17th, 2009, 10:59 am
by switch
Depends on how you are adding the file.
If you are adding by newzbin id, then no.
If you are adding by url, then no.
If you are uploading the nzb using
mode=addfile then yes you can specify what the filename is.
Re: Movie renaming based upon imdb
Posted: January 17th, 2009, 11:08 am
by jl0810
thanks - yes, Im using addurl, so I guess no. I probably can switch it around to filename with a little work
Re: Movie renaming based upon imdb
Posted: January 17th, 2009, 11:15 am
by switch
Be aware addfile does not expect a path, but the contents of the nzb in a certain way. See
http://forums.sabnzbd.org/index.php?topic=998.0