From 61153dd2dec7bd19b0541c431d4c70cd1ddf5e2e Mon Sep 17 00:00:00 2001 From: Cigaras Date: Mon, 6 Mar 2017 11:13:23 +0200 Subject: [PATCH] Version 2.0.2 * Case sensitivity in playlist attributes fix (#90) * Slash symbol in group title fix (#92) --- Contents/Code/__init__.py | 4 ++-- Contents/Code/m3u_parser.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Contents/Code/__init__.py b/Contents/Code/__init__.py index abf0360..bcf1f3a 100644 --- a/Contents/Code/__init__.py +++ b/Contents/Code/__init__.py @@ -12,7 +12,7 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# Version 2.0.1 +# Version 2.0.2 from m3u_parser import LoadPlaylist, PlaylistReloader from xmltv_parser import GuideReloader @@ -92,7 +92,7 @@ def MainMenu(): return ListItems(unicode(L('All'))) #################################################################################################### -@route(PREFIX + '/listitems/{group}', page = int) +@route(PREFIX + '/listitems', page = int) def ListItems(group, page = 1): if not Dict['streams']: diff --git a/Contents/Code/m3u_parser.py b/Contents/Code/m3u_parser.py index 32eb8cd..5f92f96 100644 --- a/Contents/Code/m3u_parser.py +++ b/Contents/Code/m3u_parser.py @@ -133,10 +133,10 @@ def DecodeURIComponent(uri): #################################################################################################### def GetAttribute(text, attribute, delimiter1 = '="', delimiter2 = '"', default = ''): - x = text.find(attribute) + x = text.lower().find(attribute.lower()) if x > -1: - y = text.find(delimiter1, x + len(attribute)) + len(delimiter1) - z = text.find(delimiter2, y) if delimiter2 else len(text) + y = text.lower().find(delimiter1.lower(), x + len(attribute)) + len(delimiter1) + z = text.lower().find(delimiter2.lower(), y) if delimiter2 else len(text) if z == -1: z = len(text) return unicode(text[y:z].strip())