Don't load from file if path starts with http(s)://

This commit is contained in:
Ridan Vandenbergh 2021-05-12 02:48:34 +02:00
parent 896d30430c
commit e23c1efe4e

View File

@ -569,7 +569,8 @@ class SyncplayClient(object):
return False
def openFile(self, filePath, resetPosition=False, fromUser=False):
if fromUser and filePath.endswith(".txt") or filePath.endswith(".m3u") or filePath.endswith(".m3u8"):
if not (filePath.startswith("http://") or filePath.startswith("https://"))\
and ((fromUser and filePath.endswith(".txt")) or filePath.endswith(".m3u") or filePath.endswith(".m3u8")):
self.playlist.loadPlaylistFromFile(filePath, resetPosition)
return