Merge pull request #62 from graybush/filePathsv17

Updates project structure to Kodi v17
This commit is contained in:
mcarlton00 2019-09-03 21:49:06 -04:00 committed by GitHub
commit a4cf84dd5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 24 additions and 15 deletions

View File

@ -39,8 +39,8 @@
#44 Remove code caching, fixing Kodi 18 Music syncing for existing installs.
</news>
<assets>
<icon>icon.png</icon>
<fanart>fanart.png</fanart>
<icon>resources/icon.png</icon>
<fanart>resources/fanart.png</fanart>
</assets>
</extension>
</addon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -209,10 +209,12 @@ def directory(label, path, folder=True, artwork=None, fanart=None, context=None)
def dir_listitem(label, path, artwork=None, fanart=None):
''' Gets the icon paths for default node listings
'''
li = xbmcgui.ListItem(label, path=path)
li.setThumbnailImage(artwork or "special://home/addons/plugin.video.jellyfin/icon.png")
li.setArt({"fanart": fanart or "special://home/addons/plugin.video.jellyfin/fanart.png"})
li.setArt({"landscape": artwork or fanart or "special://home/addons/plugin.video.jellyfin/fanart.png"})
li.setThumbnailImage(artwork or "special://home/addons/plugin.video.jellyfin/resources/icon.png")
li.setArt({"fanart": fanart or "special://home/addons/plugin.video.jellyfin/resources/fanart.png"})
li.setArt({"landscape": artwork or fanart or "special://home/addons/plugin.video.jellyfin/resources/fanart.png"})
return li

View File

@ -140,7 +140,7 @@ def dialog(dialog_type, *args, **kwargs):
if "icon" in kwargs:
kwargs['icon'] = kwargs['icon'].replace("{jellyfin}",
"special://home/addons/plugin.video.jellyfin/icon.png")
"special://home/addons/plugin.video.jellyfin/resources/icon.png")
if "heading" in kwargs:
kwargs['heading'] = kwargs['heading'].replace("{jellyfin}", _('addon_name'))

View File

@ -313,7 +313,6 @@ class Monitor(xbmc.Monitor):
"Mute,Unmute,SetVolume,"
"Play,Playstate,PlayNext,PlayMediaSource"
),
'IconUrl': "https://raw.githubusercontent.com/jellyfin/jellyfin-kodi/master/kodi_icon.png",
})
session = server['api'].get_device(self.device_id)

View File

@ -311,10 +311,16 @@ class Actions(object):
obj['Artwork']['Thumb'] = obj['Artwork']['Thumb'] or ""
if not intro and not obj['Type'] == 'Trailer':
obj['Artwork']['Primary'] = obj['Artwork']['Primary'] or "special://home/addons/plugin.video.jellyfin/icon.png"
obj['Artwork']['Primary'] = obj['Artwork']['Primary'] \
or "special://home/addons/plugin.video.jellyfin/resources/icon.png"
else:
obj['Artwork']['Primary'] = obj['Artwork']['Primary'] or obj['Artwork']['Thumb'] or (obj['Artwork']['Backdrop'][0] if len(obj['Artwork']['Backdrop']) else "special://home/addons/plugin.video.jellyfin/fanart.png")
obj['Artwork']['Primary'] += "&KodiTrailer=true" if obj['Type'] == 'Trailer' else "&KodiCinemaMode=true"
obj['Artwork']['Primary'] = obj['Artwork']['Primary'] \
or obj['Artwork']['Thumb'] \
or (obj['Artwork']['Backdrop'][0] \
if len(obj['Artwork']['Backdrop']) \
else "special://home/addons/plugin.video.jellyfin/resources/fanart.png")
obj['Artwork']['Primary'] += "&KodiTrailer=true" \
if obj['Type'] == 'Trailer' else "&KodiCinemaMode=true"
obj['Artwork']['Backdrop'] = [obj['Artwork']['Primary']]
self.set_artwork(obj['Artwork'], listitem, obj['Type'])
@ -471,10 +477,12 @@ class Actions(object):
obj['Runtime'] = round(float((obj['Runtime'] or 0) / 10000000.0), 6)
obj['PlayCount'] = API.get_playcount(obj['Played'], obj['PlayCount']) or 0
obj['Overlay'] = 7 if obj['Played'] else 6
obj['Artwork']['Primary'] = obj['Artwork']['Primary'] or "special://home/addons/plugin.video.jellyfin/icon.png"
obj['Artwork']['Thumb'] = obj['Artwork']['Thumb'] or "special://home/addons/plugin.video.jellyfin/fanart.png"
obj['Artwork']['Backdrop'] = obj['Artwork']['Backdrop'] or ["special://home/addons/plugin.video.jellyfin/fanart.png"]
obj['Artwork']['Primary'] = obj['Artwork']['Primary'] \
or "special://home/addons/plugin.video.jellyfin/resources/icon.png"
obj['Artwork']['Thumb'] = obj['Artwork']['Thumb'] \
or "special://home/addons/plugin.video.jellyfin/resources/fanart.png"
obj['Artwork']['Backdrop'] = obj['Artwork']['Backdrop'] \
or ["special://home/addons/plugin.video.jellyfin/resources/fanart.png"]
metadata = {
'title': obj['Title'],

View File

@ -363,7 +363,7 @@ class Views(object):
else:
element = etree.Element('node', {'order': str(index), 'type': "folder"})
etree.SubElement(element, 'icon').text = "special://home/addons/plugin.video.jellyfin/icon.png"
etree.SubElement(element, 'icon').text = "special://home/addons/plugin.video.jellyfin/resources/icon.png"
return element