Обработка таймаута при закрытии потока.
[vpproxy.git] / plugins / modules / M3uParser.py
index e946ec27bfa86689b4eb8f5b675986e7f2bbb39e..5bee611475d247073a6a0023d2afe938d7d8e321 100644 (file)
@@ -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