From aa60baeb9797e669433eaded382005f3a13b2ecb Mon Sep 17 00:00:00 2001 From: tomkat83 Date: Sat, 25 Jun 2016 17:21:47 +0200 Subject: [PATCH] Let the user pick between several streams - And don't just pick the first one --- resources/language/English/strings.xml | 1 + resources/language/German/strings.xml | 2 +- resources/lib/PlexAPI.py | 17 ++++++++++++++++- resources/settings.xml | 1 + 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/resources/language/English/strings.xml b/resources/language/English/strings.xml index 3aa6cd7f..8713312d 100644 --- a/resources/language/English/strings.xml +++ b/resources/language/English/strings.xml @@ -304,6 +304,7 @@ Complete Re-Sync necessary Download additional art from FanArtTV (slower!) Download movie set/collection art from FanArtTV + Don't ask to pick a certain stream/quality diff --git a/resources/language/German/strings.xml b/resources/language/German/strings.xml index e4c74bd3..9dee7c20 100644 --- a/resources/language/German/strings.xml +++ b/resources/language/German/strings.xml @@ -30,7 +30,7 @@ Komplette Neusynchronisierung nötig Zusätzliche Bilder von FanArtTV herunterladen (langsamer!) FanArtTV Film-Sets/Collections Bilder herunterladen - + Nicht fragen, welcher Stream/Qualität gespielt wird Verbindung Netzwerk diff --git a/resources/lib/PlexAPI.py b/resources/lib/PlexAPI.py index 36731b4c..590b9ba5 100644 --- a/resources/lib/PlexAPI.py +++ b/resources/lib/PlexAPI.py @@ -2214,7 +2214,22 @@ class API(): xargs = clientinfo.ClientInfo().getXArgsDeviceInfo() # For DirectPlay, path/key of PART is needed if action == "DirectStream": - path = self.item[0][self.part].attrib['key'] + if len(self.item) > 1 and utils.settings('bestQuality') == 'false': + # Several streams/files available. + dialoglist = [] + for entry in self.item: + dialoglist.append( + "%sp %s - %s (%s)" + % (entry.attrib.get('videoResolution', 'unknown'), + entry.attrib.get('videoCodec', 'unknown'), + entry.attrib.get('audioProfile', 'unknown'), + entry.attrib.get('audioCodec', 'unknown')) + ) + media = xbmcgui.Dialog().select('Select stream', dialoglist) + else: + media = 0 + + path = self.item[media][self.part].attrib['key'] url = self.server + path # e.g. Trailers already feature an '?'! if '?' in url: diff --git a/resources/settings.xml b/resources/settings.xml index 25e77309..c68b881b 100644 --- a/resources/settings.xml +++ b/resources/settings.xml @@ -82,6 +82,7 @@ +