2013-10-21, 13:06
A brief note on the mklocal.py tool, which is basically a quick method to populate your media source with original quality artwork (unlike Export Library, which uses potentially image quality compromised artwork from the texture cache).
Example usage:
where /freenas/media is the OS mount point for your media, such that XBMC media source nfs://192.168.0.3/mnt/share/media is mapped to /freenas/media and vice versa.
The above example would process each of your movies for the specified artwork types - fanart, poster, clearlogo and clearart - and, if the artwork file doesn't already exist, and the library url is remote (ie. http://), the artwork item will be downloaded from the source web site and written to the --local folder alongside the corresponding movie file.
Artwork will be named by appending the artwork type to the movie file name, eg. "/freenas/media/Video/MoviesHD/Classics/12 Angry Men (1957)[BDRip]-poster.jpg" will be mapped to "nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Classics/12 Angry Men (1957)[BDRip]-poster.jpg".
Once you have written the artwork to your media folders, update your media library to use the new local urls with the following call:
Also works for tvshows. Add "--season" to also download season artwork, although note there are no JSON methods to modify season artwork so these cannot be set automatically (fixed in recent Gotham nightly, requires JSON API v6.12.0+). Add "--episode" to also download episode thumbs, which can be set automatically.
You can of course test this by not writing to your media folder:
as this will download the remote artwork to TestFolder, and should replicate your existing movie directory structure. Once you are comfortable all is working OK, specify the correct --local folder for your media library. Of course no changes will be applied to your media library until you run the changes through "./texturecache.py set".
Example usage:
Code:
./texturecache.py jd movies | ./mklocal.py --local /freenas/media --prefix nfs://192.168.0.3/mnt/share/media --artwork fanart poster clearlogo clearart --output fixup.dat
where /freenas/media is the OS mount point for your media, such that XBMC media source nfs://192.168.0.3/mnt/share/media is mapped to /freenas/media and vice versa.
The above example would process each of your movies for the specified artwork types - fanart, poster, clearlogo and clearart - and, if the artwork file doesn't already exist, and the library url is remote (ie. http://), the artwork item will be downloaded from the source web site and written to the --local folder alongside the corresponding movie file.
Artwork will be named by appending the artwork type to the movie file name, eg. "/freenas/media/Video/MoviesHD/Classics/12 Angry Men (1957)[BDRip]-poster.jpg" will be mapped to "nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Classics/12 Angry Men (1957)[BDRip]-poster.jpg".
Once you have written the artwork to your media folders, update your media library to use the new local urls with the following call:
Code:
cat fixup.dat | ./texturecache.py set
Also works for tvshows. Add "--season" to also download season artwork, although note there are no JSON methods to modify season artwork so these cannot be set automatically (fixed in recent Gotham nightly, requires JSON API v6.12.0+). Add "--episode" to also download episode thumbs, which can be set automatically.
You can of course test this by not writing to your media folder:
Code:
./texturecache.py jd movies | ./mklocal.py --local /freenas/media/TestFolder --prefix nfs://192.168.0.3/mnt/share/media --artwork fanart poster clearlogo clearart --output fixup.dat