From 95dc955f6dacf0cae5636430367f39f4ecab564e Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Wed, 1 Apr 2015 21:32:25 +0200 Subject: [PATCH] fix for transcoding --- resources/lib/PlayUtils.py | 3 +-- resources/lib/WriteKodiDB.py | 8 ++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/resources/lib/PlayUtils.py b/resources/lib/PlayUtils.py index facae3b4..8deff44b 100644 --- a/resources/lib/PlayUtils.py +++ b/resources/lib/PlayUtils.py @@ -76,9 +76,8 @@ class PlayUtils(): # Works out if we are direct playing or not def isDirectPlay(self, result): - return False if (self.fileExists(result) or (result.get("LocationType") == "FileSystem" and self.isNetworkQualitySufficient(result) == True and self.isLocalPath(result) == False)): - return False + return True else: return False diff --git a/resources/lib/WriteKodiDB.py b/resources/lib/WriteKodiDB.py index 4a70e09b..d8b5193f 100644 --- a/resources/lib/WriteKodiDB.py +++ b/resources/lib/WriteKodiDB.py @@ -1125,7 +1125,11 @@ class WriteKodiDB(): utils.logMsg("MB3 Sync","new filename -->" + newFileName) ######### PROCESS TV SHOW ############ - if fileType == "tvshow" and not newFileName.startswith("http"): + if fileType == "tvshow": + + if newFileName.startswith("http"): + newFileName = "plugin://plugin.video.emby/" + #for tvshows we only store the path in DB cursor.execute("SELECT idPath as pathid FROM tvshowlinkpath WHERE idShow = ?",(id,)) result = cursor.fetchone() @@ -1138,7 +1142,7 @@ class WriteKodiDB(): if newFileName.startswith("http"): #transcoding or play from stream path = "plugin://plugin.video.emby/" - filename = "?id=" + mbId + '&mode=play' + filename = "plugin://plugin.video.emby/?id=" + mbId + "&mode=play" else: # direct play