Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extrafanart and extrathumbs to library. #86

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions default.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,8 @@ def _batch_download(self, image_list):
global download_counter
global download_succes
global reportdata
extrathumbscount = 1
extrafanartcount = 1
image_list_total = len(image_list)
if not image_list_total == 0:
failcount = 0
Expand All @@ -612,8 +614,14 @@ def _batch_download(self, image_list):
if startup['mode'] in ['customgui','gui'] or not self.fileops._exists(item['localfilename']):
self.fileops._downloadfile(item)
item['url'] = item['localfilename'].replace('\\','\\\\')
if item['art_type'] in ['extrathumbs', 'extrafanart']:
self.fileops._downloadfile(item)
if item['art_type'] == 'extrathumbs':
extrathumbs = item['art_type'] + '%i' % (extrathumbscount)
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": { "movieid": %i, "art": { "%s": "%s" }}, "id": 1 }' %(item['dbid'], extrathumbs, item['url']))
extrathumbscount +=1
if item['art_type'] == 'extrafanart':
extrafanart = item['art_type'] + '%i' % (extrafanartcount)
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": { "movieid": %i, "art": { "%s": "%s" }}, "id": 1 }' %(item['dbid'], extrafanart, item['url']))
extrafanartcount +=1
elif item['mediatype'] == 'movie':
xbmc.executeJSONRPC('{"jsonrpc": "2.0", "method": "VideoLibrary.SetMovieDetails", "params": { "movieid": %i, "art": { "%s": "%s" }}, "id": 1 }' %(item['dbid'], item['art_type'], item['url']))
elif item['mediatype'] == 'tvshow':
Expand Down