Allow .m3u/.m3u8 files to be played from network (#419)

This commit is contained in:
Ridan Vandenbergh 2021-10-18 21:10:35 +02:00 committed by GitHub
parent 2bf3931f59
commit bbcef5d82c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -589,7 +589,8 @@ class SyncplayClient(object):
return trustable and trusted
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