From 158008415f9e81c3d9cd9b21209f4834a286f2c2 Mon Sep 17 00:00:00 2001 From: angelblue05 Date: Tue, 3 Nov 2015 02:27:59 -0600 Subject: [PATCH] Prevent invalid paths Strm file scenario --- resources/lib/WriteKodiVideoDB.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/resources/lib/WriteKodiVideoDB.py b/resources/lib/WriteKodiVideoDB.py index 9e4ce91d..967aef30 100644 --- a/resources/lib/WriteKodiVideoDB.py +++ b/resources/lib/WriteKodiVideoDB.py @@ -156,6 +156,9 @@ class WriteKodiVideoDB(): elif "/" in playurl: filename = playurl.rsplit("/",1)[-1] path = playurl.replace(filename, "") + else: + self.logMsg("Invalid path: %s" % playurl, 1) + return else: # Set plugin path and media flags using real filename try: if not "plugin://" in playurl: @@ -326,6 +329,9 @@ class WriteKodiVideoDB(): elif "/" in playurl: filename = playurl.rsplit("/",1)[-1] path = playurl.replace(filename, "") + else: + self.logMsg("Invalid path: %s" % playurl, 1) + return else: # Set plugin path and media flags using real filename try: if not "plugin://" in playurl: @@ -620,6 +626,9 @@ class WriteKodiVideoDB(): elif "/" in playurl: filename = playurl.rsplit("/",1)[-1] path = playurl.replace(filename, "") + else: + self.logMsg("Invalid path: %s" % playurl, 1) + return else: # Set plugin path and media flags - real filename with extension realfile = "" realpath = ""