2014-01-03, 00:47
Just so you get an idea of how it should work... this is my system, processing a single movie (Zombieland), with all files in a single folder, which finds and assigns the locally stored logo and clearart images (only fanart and poster are initially assigned to the movie):
This is the movie as it initially exists in the media library - only fanart and poster artwork, both using "movie-name" prefix:
These are the files in the single movie folder - ie. what XBMC can "see" by directly browsing the folder. Note the clearlogo and clearart artwork, not using movie-name prefix, which are not present in the media library:
mklocal.py will now scan the local folder and match the artwork it finds with what is specified by the movie library, making corrections as necessary (output at the end - in this case, the addition of clearlogo and clearart - which needs to be fed into "texturecache.py set"):
This is the movie as it initially exists in the media library - only fanart and poster artwork, both using "movie-name" prefix:
Code:
milhouse@nm-linux:~$ ./texturecache.py jd movies zombieland
[
{
"art": {
"fanart": "image://nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]-fanart.jpg/",
"poster": "image://nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]-poster.jpg/"
},
"file": "nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip].mkv",
"label": "Zombieland",
"movieid": 667,
"title": "Zombieland"
}
]
These are the files in the single movie folder - ie. what XBMC can "see" by directly browsing the folder. Note the clearlogo and clearart artwork, not using movie-name prefix, which are not present in the media library:
Code:
milhouse@nm-linux:~$ ./texturecache.py directory nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland
FILE: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/clearart.png
FILE: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/logo.png
FILE: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]-fanart.jpg
FILE: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]-poster.jpg
FILE: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip].mkv
FILE: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip].nfo
mklocal.py will now scan the local folder and match the artwork it finds with what is specified by the movie library, making corrections as necessary (output at the end - in this case, the addition of clearlogo and clearart - which needs to be fed into "texturecache.py set"):
Code:
milhouse@nm-linux:~$ ./texturecache.py jd movies zombieland | tools/mklocal.py --readonly --singlefolders --local /freenas/media --prefix nfs://192.168.0.3/mnt/share/media --artwork fanart poster clearlogo clearart --output -v
Current configuration:
Local Path : /freenas/media/
Alt Local : Not specified
XBMC Path : nfs://192.168.0.3/mnt/share/media/
Read Only : Yes
Dry Run : No
Single Folder : Yes
Artwork : fanart as fanart.[png,jpg]
poster as poster.[png,jpg]
clearlogo as logo.[png,jpg]
clearart as clearart.[png,jpg]
Checking : Not Specified
##DEBUG## mediatype [movie]; mediatitle [Zombieland]
##DEBUG## mediafile is [nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip].mkv]
##DEBUG## local root name would be [/freenas/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]]
##DEBUG## artwork type [fanart] known by XBMC as [nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]-fanart.jpg]
##DEBUG## [fanart ] Found pre-existing local file: /freenas/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]-fanart.jpg
##DEBUG## [fanart ] Converting local filename to XBMC path: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]-fanart.jpg
##DEBUG## [fanart ] No library change required, keeping: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]-fanart.jpg
##DEBUG## artwork type [poster] known by XBMC as [nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]-poster.jpg]
##DEBUG## [poster ] Found pre-existing local file: /freenas/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]-poster.jpg
##DEBUG## [poster ] Converting local filename to XBMC path: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]-poster.jpg
##DEBUG## [poster ] No library change required, keeping: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/Zombieland (2009)[BDRip]-poster.jpg
##DEBUG## artwork type [clearlogo] known by XBMC as [None]
##DEBUG## [clearlogo ] Found pre-existing local file: /freenas/media/Video/MoviesHD/Zombieland/logo.png
##DEBUG## [clearlogo ] Converting local filename to XBMC path: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/logo.png
##DEBUG## [clearlogo ] Changing library value to: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/logo.png
##DEBUG## artwork type [clearart] known by XBMC as [None]
##DEBUG## [clearart ] Found pre-existing local file: /freenas/media/Video/MoviesHD/Zombieland/clearart.png
##DEBUG## [clearart ] Converting local filename to XBMC path: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/clearart.png
##DEBUG## [clearart ] Changing library value to: nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/clearart.png
[
{
"items": {
"art.clearart": "nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/clearart.png",
"art.clearlogo": "nfs://192.168.0.3/mnt/share/media/Video/MoviesHD/Zombieland/logo.png"
},
"libraryid": 667,
"type": "movie",
"title": "Zombieland"
}
]