2013-01-13, 16:20
Here s a script i wrote, i d be happy if other peoples were using it, giving me feedback and maybe fix some corner cases
Yes, the best would be to re-code it, and integrate this into xbmc.
To me, for somone running linux, that s the fastest way to prepare his movie collection to be used by xbmc
For the best effect, run an imdb based scrapper after running this script.
Maybe try the script by runing it with a test movie folder with only 2 movies inside
download http://www.2shared.com/file/VPIMWeUl/getnfotar.html
start script.sh
if it s your first run change firstrun=y in clean_names.sh then run the script and get a coffee"
afterward set firstrun=n in clean_names.sh and validate google searches"
this will make the script run in automated mode and will avoid any prompt
then you will confirm the other movies not found at first run
What the script does :
Get the imdb url
1 This script will take all movies at the root of the specified folder and put each one in it s own folder
2 It will look for an already existing movie.nfo
3 Else it will look for an already existing imdb url inside an already existing .nfo file
If it finds one, then it will create a movie.nfo file with the imdb url found inside
4 Else it will sugest an imdb movie from a google search
If you answer y, it will then create a movie.nfo file with the imdb url
Get the movie poster
1 If a folder.jpg exist it will skip the movie
2 Else If the largest picture has a poster aspect ratio it will be used as folder.jpg
3 Else If a movie.nfo file is found it will use its imdb url to get the poster
4 If a poster was found it will be used as folder icon in gnome and kde
Rename the folder
If at any point an imdb url was found and the script could find the movie name, then it will rename the movie folder
Yes, the best would be to re-code it, and integrate this into xbmc.
To me, for somone running linux, that s the fastest way to prepare his movie collection to be used by xbmc
For the best effect, run an imdb based scrapper after running this script.
Maybe try the script by runing it with a test movie folder with only 2 movies inside
download http://www.2shared.com/file/VPIMWeUl/getnfotar.html
start script.sh
if it s your first run change firstrun=y in clean_names.sh then run the script and get a coffee"
afterward set firstrun=n in clean_names.sh and validate google searches"
this will make the script run in automated mode and will avoid any prompt
then you will confirm the other movies not found at first run
What the script does :
Get the imdb url
1 This script will take all movies at the root of the specified folder and put each one in it s own folder
2 It will look for an already existing movie.nfo
3 Else it will look for an already existing imdb url inside an already existing .nfo file
If it finds one, then it will create a movie.nfo file with the imdb url found inside
4 Else it will sugest an imdb movie from a google search
If you answer y, it will then create a movie.nfo file with the imdb url
Get the movie poster
1 If a folder.jpg exist it will skip the movie
2 Else If the largest picture has a poster aspect ratio it will be used as folder.jpg
3 Else If a movie.nfo file is found it will use its imdb url to get the poster
4 If a poster was found it will be used as folder icon in gnome and kde
Rename the folder
If at any point an imdb url was found and the script could find the movie name, then it will rename the movie folder