ServiceName: use rsplit for stream services
authorTaapat <taapat@gmail.com>
Mon, 23 Feb 2015 18:46:41 +0000 (20:46 +0200)
committerlittlesat <littlesat99@yahoo.com>
Wed, 25 Feb 2015 14:09:13 +0000 (15:09 +0100)
If we use livestreamer, the server address is the last in http address list

lib/python/Components/Converter/ServiceName.py

index 5598c16..c1c770b 100644 (file)
@@ -83,7 +83,7 @@ class ServiceName(Converter, object):
                        else:
                                result = info.getInfoString(iServiceInformation.sServiceref)
                        if "%3a//" in result:
-                               return result.split("%3a//")[1].split("/")[0]
+                               return result.rsplit("%3a//", 1)[1].split("/")[0]
                        return ""
 
        text = property(getText)