Use identical add-on paths for On Deck and browsing folders

This commit is contained in:
Croneter 2018-03-27 07:47:58 +02:00
parent 2f99ac8282
commit bfd4415fa1

View file

@ -562,8 +562,11 @@ def getOnDeck(viewid, mediatype, tagname, limit):
if directpaths: if directpaths:
url = api.file_path() url = api.file_path()
else: else:
url = ('plugin://%s.tvshows/?plex_id=%s&plex_type=%s&mode=play' url = ('plugin://%s.tvshows/?plex_id=%s&plex_type=%s&mode=play&filename=%s'
% (v.ADDON_ID, api.plex_id(), api.plex_type())) % (v.ADDON_ID,
api.plex_id(),
api.plex_type(),
api.file_path(force_first_media=True)))
xbmcplugin.addDirectoryItem( xbmcplugin.addDirectoryItem(
handle=HANDLE, handle=HANDLE,
url=url, url=url,
@ -831,8 +834,11 @@ def __build_item(xml_element):
elif api.plex_type() == v.PLEX_TYPE_PHOTO: elif api.plex_type() == v.PLEX_TYPE_PHOTO:
url = api.get_picture_path() url = api.get_picture_path()
else: else:
url = 'plugin://%s/?plex_id=%s&plex_type=%s&mode=play' \ url = 'plugin://%s/?plex_id=%s&plex_type=%s&mode=play&filename=%s' \
% (v.ADDON_TYPE[api.plex_type()], api.plex_id(), api.plex_type()) % (v.ADDON_TYPE[api.plex_type()],
api.plex_id(),
api.plex_type(),
api.file_path(force_first_media=True))
xbmcplugin.addDirectoryItem(handle=HANDLE, xbmcplugin.addDirectoryItem(handle=HANDLE,
url=url, url=url,
listitem=listitem) listitem=listitem)