From fd65e8ecaa1a7c5f11b9a50bc165083a87e2c725 Mon Sep 17 00:00:00 2001 From: Roman Bazalevsky Date: Mon, 2 Nov 2015 14:59:52 +0300 Subject: [PATCH] =?utf8?q?=D0=A1=D0=B4=D0=B5=D0=BB=D0=B0=D0=BD=D0=B0=20?= =?utf8?q?=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=BD=D0=B0=D1=8F=20?= =?utf8?q?=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BA=D0=B0=20"=D0=BD?= =?utf8?q?=D0=B5=D0=B0=D0=BA=D0=BA=D1=83=D1=80=D0=B0=D1=82=D0=BD=D1=8B?= =?utf8?q?=D1=85"=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2=20=D1=81=20=D0=BF?= =?utf8?q?=D1=80=D0=BE=D0=BF=D1=83=D1=89=D0=B5=D0=BD=D0=BD=D1=8B=D0=BC?= =?utf8?q?=D0=B8=20=D0=BA=D0=B0=D0=B2=D1=8B=D1=87=D0=BA=D0=B0=D0=BC=D0=B8?= =?utf8?q?=20=D0=B2=D0=BE=D0=BA=D1=80=D1=83=D0=B3=20=D0=BD=D0=B5=D0=BE?= =?utf8?q?=D0=B1=D1=8F=D0=B7=D0=B0=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B?= =?utf8?q?=D1=85=20=D1=82=D0=B5=D0=B3=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- plugins/modules/M3uParser.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 -- 2.34.1