X-Git-Url: https://git.rvb.name/vpproxy.git/blobdiff_plain/b23938dd490983b0c8768af945576ac6037ce85b..fd65e8ecaa1a7c5f11b9a50bc165083a87e2c725:/plugins/modules/M3uParser.py diff --git a/plugins/modules/M3uParser.py b/plugins/modules/M3uParser.py index e946ec2..5bee611 100644 --- a/plugins/modules/M3uParser.py +++ b/plugins/modules/M3uParser.py @@ -51,8 +51,15 @@ def parseM3U(infile): attrstr=attrstr.strip() key,tail=attrstr.split('=',1) - tail=tail[1:] - value,attrstr=tail.split('"',1) + if tail[0]=='\"': + tail=tail[1:] + value,attrstr=tail.split('"',1) + else: + try: + value,attrstr=tail.split(' ',1) + except ValueError: + value=tail + attrstr='' attrstr=attrstr.strip() attrs[key]=value