diff --git a/resources/lib/PlayUtils.py b/resources/lib/PlayUtils.py index b5f102cd..04f163e8 100644 --- a/resources/lib/PlayUtils.py +++ b/resources/lib/PlayUtils.py @@ -311,7 +311,7 @@ class PlayUtils(): path = result[u'Path'] # Verify the device has access to the direct path - if os.path.exists(path): + if os.path.exists(path.encode('utf-8')): return True elif ":\\" not in path: # Give benefit of the doubt for nfs protocol diff --git a/resources/lib/PlaybackUtils.py b/resources/lib/PlaybackUtils.py index 59aa8642..0d25fa71 100644 --- a/resources/lib/PlaybackUtils.py +++ b/resources/lib/PlaybackUtils.py @@ -48,6 +48,18 @@ class PlaybackUtils(): except: return + # For split movies + if u'PartCount' in result: + partcount = result[u'PartCount'] + # Get additional parts/playurl + url = "{server}/mediabrowser/Videos/%s/AdditionalParts" % id + parts = self.downloadUtils.downloadUrl(url) + partsId = [id] + for part in parts[u'Items']: + partId = part[u'Id'] + partsId.append(partId) + self.PLAYAllItems(partsId, startPositionTicks=None) + userData = result['UserData'] resume_result = 0 seekTime = 0 diff --git a/resources/lib/WebSocketClient.py b/resources/lib/WebSocketClient.py index 5ea9a3fb..e5065f14 100644 --- a/resources/lib/WebSocketClient.py +++ b/resources/lib/WebSocketClient.py @@ -179,6 +179,19 @@ class WebSocketThread(threading.Thread): self.remove_items(itemsRemoved) self.update_items(itemsToUpdate) + elif messageType == "GeneralCommand": + + if data.get("Name") == "DisplayMessage": + message = data.get("Arguments") + header = message[u'Header'] + text = message[u'Text'] + xbmcgui.Dialog().notification(header, text) + + elif data.get("Name") == "SendString": + message = data.get("Arguments") + string = message[u'String'] + xbmcgui.Dialog().notification("Emby server", string) + def remove_items(self, itemsRemoved): #Process video library