AutoRenamer (IMDB)

Come up with a useful post-processing script? Share it here!
Post Reply
f1nd
Newbie
Newbie
Posts: 6
Joined: November 8th, 2010, 3:25 pm

AutoRenamer (IMDB)

Post by f1nd »

I write a user script, for now only for Movies.

Attention:
- Movies must decompressed in seperat folder

How it works
- the script move all files (like nfo,sfv,avi) to extract folder
- the script parse (needed) nfo
- the script get the IMDB Title and Year by nfos imdb link
- the script rename Folder and File like "Haven (2010)" and "Haven (2010).avi"
- if more than two avis, renamed to "Haven (2010) CD1.avi" "Haven (2010) CD2.avi"

u can test it with
python.exe imdbParser.py "C:\MovieFolder"

Future Updates:
- hardlinks to Genre Folders
Last edited by f1nd on November 8th, 2010, 3:56 pm, edited 1 time in total.
f1nd
Newbie
Newbie
Posts: 6
Joined: November 8th, 2010, 3:25 pm

Re: AutoRenamer (IMDB)

Post by f1nd »

DupPost
kdlklm
Newbie
Newbie
Posts: 5
Joined: November 17th, 2010, 12:16 pm

Re: AutoRenamer (IMDB)

Post by kdlklm »

I get a syntax error on line 35
f1nd
Newbie
Newbie
Posts: 6
Joined: November 8th, 2010, 3:25 pm

Re: AutoRenamer (IMDB)

Post by f1nd »

can u private message me, what are u download ?
maybe i can fix it.

remember: the nfo file must be inside the movie folder
ursli
Newbie
Newbie
Posts: 6
Joined: January 16th, 2011, 9:32 pm

Re: AutoRenamer (IMDB)

Post by ursli »

Is it possible that this script broke recently? Getting this error for every movie

Code: Select all

WARNING:root:Unable to get html content after 5 attempts...
Traceback (most recent call last):
  File "Z:\nzb\Movies\imdbParser.py", line 317, in <module>
    fileh.renameAvi()
  File "Z:\nzb\Movies\imdbParser.py", line 123, in renameAvi
    shutil.move(aviList[0], file_template.substitute(title=self.movie.title,year
=self.movie.year)+"."+fileExt)
  File "C:\Python26\lib\shutil.py", line 264, in move
    copy2(src, real_dst)
  File "C:\Python26\lib\shutil.py", line 99, in copy2
    copyfile(src, dst)
  File "C:\Python26\lib\shutil.py", line 53, in copyfile
    fdst = open(dst, 'wb')
IOError: [Errno 2] No such file or directory: 'N/A (N/A).mkv'
It worked earlier this year, and I can't remember changing anything.
f1nd
Newbie
Newbie
Posts: 6
Joined: November 8th, 2010, 3:25 pm

Re: AutoRenamer (IMDB)

Post by f1nd »

hi ursli, can u post @ pastebin.com the imbdparser.py script.
i cant found the latest version, maybe i can fix it.

PS: i never mind, that anybody use this script.
ursli
Newbie
Newbie
Posts: 6
Joined: January 16th, 2011, 9:32 pm

Re: AutoRenamer (IMDB)

Post by ursli »

Hi, thanks for looking at it and sorry that I'm a little late.

http://pastebin.com/cTENiNUj

Greetings
Post Reply