mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
Force lowercase protocol for plugin playback
For direct path
This commit is contained in:
parent
cf31fbba45
commit
04c74cb92d
2 changed files with 8 additions and 5 deletions
|
@ -390,12 +390,10 @@ class API(object):
|
||||||
filepath = filepath.replace("\\\\", "smb://")
|
filepath = filepath.replace("\\\\", "smb://")
|
||||||
filepath = filepath.replace("\\", "/")
|
filepath = filepath.replace("\\", "/")
|
||||||
|
|
||||||
if self.item.get('VideoType'):
|
if 'VideoType' in self.item:
|
||||||
videotype = self.item['VideoType']
|
if self.item['VideoType'] == "Dvd":
|
||||||
# Specific format modification
|
|
||||||
if 'Dvd'in videotype:
|
|
||||||
filepath = "%s/VIDEO_TS/VIDEO_TS.IFO" % filepath
|
filepath = "%s/VIDEO_TS/VIDEO_TS.IFO" % filepath
|
||||||
elif 'BluRay' in videotype:
|
elif self.item['VideoType'] == "BluRay":
|
||||||
filepath = "%s/BDMV/index.bdmv" % filepath
|
filepath = "%s/BDMV/index.bdmv" % filepath
|
||||||
|
|
||||||
if "\\" in filepath:
|
if "\\" in filepath:
|
||||||
|
|
|
@ -202,6 +202,11 @@ class PlayUtils():
|
||||||
path = path.replace('\\\\', "smb://")
|
path = path.replace('\\\\', "smb://")
|
||||||
path = path.replace('\\', "/")
|
path = path.replace('\\', "/")
|
||||||
|
|
||||||
|
if "://" in path:
|
||||||
|
# Protocol needs to be lowercase, otherwise weird things happen.
|
||||||
|
protocol = path.split('://')[0]
|
||||||
|
path = path.replace(protocol, protocol.lower())
|
||||||
|
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def get_http_path(self, source, transcode=False):
|
def get_http_path(self, source, transcode=False):
|
||||||
|
|
Loading…
Reference in a new issue