Today our case is setting movie covers as thumbnails via imdb-thumbnailer script and setting aliases for updating existing thumbnails easily.Imdb-thumbnailer searches imdb website for covers based on file names.The best part of this script it works recursively.If there is no cover found on imdb, it uses default thumbnail (i never saw this since it always finds something even sometimes wrong cover).Installation:
Imdb-thumbnailer script requires GTK + 2.10.x and imagemagick package.So let's install it's dependency first :
$sudo apt-get install imagemagickNow after installation of imagemagick, you can download imdb-thumbnailer .deb package from here and install it via double clicking.(or $sudo dpkg -i /where/is/this/package/packagename.deb)
Configuration:
Now we have imdb-thumbnailer installed.But we need to set it first to get it working.If you are using nautilus, open a terminal and give this command :
$imdb-thumbnailer --set-nautilusIf you are using thunar, give this command (only one of them, not both of the commands!) :
$imdb-thumbnailer --set-thunarSetting part is done.We need to edit ~/.imdb-thumbnailer/config file and show the movie folders to the script.I am using one movie folder(/home/username/Movies) and there are several folders under that folder.So i am going to show only the big folder(/home/username/Movies) and i will write an alias to find and update all movies under the Movies folder.
Let's edit our config file first :
$gedit ~/.imdb-thumbnailer/configMine looks like this :
films_path[1]=/home/duyq/MoviesHere, you can use as many as folders you want.For example :
films_path[1]=/home/duyq/Movies
films_path[2]=/home/duyqfassd/asdasd
films_path[3]=/home/asdaaaaaa/Moviesaaaa
films_path[4]=/home/duyq/Movies4When you are done, save it.Now open your .bashrc file and add this alias at the end of the file :
$gedit ~/.bashrcalias imdb-up='find /home/USERNAME/Movies/* -type f | while read -r line ; do imdb-thumbnailer -u "$line" ; done'Do NOT forget to change /home/USERNAME/Movies/* folder.You can now update your thumbnails via $imdb-up command or you can update manually via $imdb-thumbnailer -u /home/videoblabla/videoname.avi command.
PS : You may need to restart nautilus to get the script working.To do so do a reboot or use $pkill nautilus command.


0 comments:
Post a Comment