]> code.delx.au - bluplayer/blobdiff - bluplayer.py
Get MakeMKV port number from a more reliable field
[bluplayer] / bluplayer.py
index ab10d992ba0e707af7e8626cd2d0aea45b1634b8..9259b83825ddc8beea21a78b0ac4f681361c4894 100755 (executable)
@@ -152,7 +152,9 @@ class MakeMkv(QObject):
                makemkvcon = MakeMkvCon(["stream", "disc:%s" % disc_number])
                for key, line in makemkvcon:
                        if key == "MSG" and line[0] == "4500":
-                               url = "http://localhost:%s/" % line[6]
+                               # Sometimes the port in field 6 is wrong
+                               port = line[5].split(":")[1]
+                               url = "http://localhost:%s/" % port
                                self.load_titles(url)
                        elif key == "MSG":
                                self.status.emit(line[3])