X-Git-Url: https://git.rvb.name/vpproxy.git/blobdiff_plain/b23938dd490983b0c8768af945576ac6037ce85b..c65fdd8ebbd745ba03e5477eb317343aace3ebba:/plugins/modules/M3uParser.py?ds=inline 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