Allow direct paths for Plex photos

This commit is contained in:
tomkat83 2016-06-19 16:12:56 +02:00
parent 8ebb867f78
commit 133741b567

View file

@ -2327,11 +2327,15 @@ class API():
else: else:
listItem.setLabel(title) listItem.setLabel(title)
listItem.setProperty('IsPlayable', 'true') listItem.setProperty('IsPlayable', 'true')
# Always use HTTP, not direct paths if utils.settings('useDirectPaths') == '0':
# Kodi has problems accessing photos directly # Addon paths
path = '%s%s' % (utils.window('pms_server'), path = self.addPlexCredentialsToUrl(
self.item[0][0].attrib['key']) '%s%s' % (utils.window('pms_server'),
path = utils.tryEncode(self.addPlexCredentialsToUrl(path)) self.item[0][0].attrib['key']))
else:
# Native direct paths
path = self.validatePlayurl(self.getFilePath(), 'photo')
path = utils.tryEncode(path)
metadata = { metadata = {
'date': self.GetKodiPremierDate(), 'date': self.GetKodiPremierDate(),
'picturepath': path, 'picturepath': path,