Allow direct paths for Plex photos
This commit is contained in:
parent
8ebb867f78
commit
133741b567
1 changed files with 9 additions and 5 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue