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. #44 Remove code caching, fixing Kodi 18 Music syncing for existing installs.
</news> </news>
<assets> <assets>
<icon>icon.png</icon> <icon>resources/icon.png</icon>
<fanart>fanart.png</fanart> <fanart>resources/fanart.png</fanart>
</assets> </assets>
</extension> </extension>
</addon> </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): def dir_listitem(label, path, artwork=None, fanart=None):
''' Gets the icon paths for default node listings
'''
li = xbmcgui.ListItem(label, path=path) li = xbmcgui.ListItem(label, path=path)
li.setThumbnailImage(artwork or "special://home/addons/plugin.video.jellyfin/icon.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/fanart.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/fanart.png"}) li.setArt({"landscape": artwork or fanart or "special://home/addons/plugin.video.jellyfin/resources/fanart.png"})
return li return li

View file

@ -140,7 +140,7 @@ def dialog(dialog_type, *args, **kwargs):
if "icon" in kwargs: if "icon" in kwargs:
kwargs['icon'] = kwargs['icon'].replace("{jellyfin}", 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: if "heading" in kwargs:
kwargs['heading'] = kwargs['heading'].replace("{jellyfin}", _('addon_name')) kwargs['heading'] = kwargs['heading'].replace("{jellyfin}", _('addon_name'))

View file

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

View file

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

View file

@ -363,7 +363,7 @@ class Views(object):
else: else:
element = etree.Element('node', {'order': str(index), 'type': "folder"}) 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 return element