Index: action.py ================================================================== --- action.py +++ action.py @@ -88,16 +88,16 @@ srv = "(%srv | %d | %s) \\b", ) # Playlist format content probing (assert type) playlist_content_map = [ - ("pls", r""" (?i)\[playlist\].*numberofentries """), - ("xspf", r""" <\?xml .* ]*> .* """), - ("html", r""" <(audio|video)\b[^>]+\bsrc\s*=\s*["']?https?:// """), + ("html", r""" (?i)<(audio|video)\b[^>]+\bsrc\s*=\s*["']?https?:// """), ("wpl", r""" <\?wpl \s+ version="1\.0" \s* \?> """), ("b4s", r""" """), # http://gonze.com/playlists/playlist-format-survey.html ("jspf", r""" ^ \s* \{ \s* "playlist": \s* \{ """), ("asf", r""" ^ \[Reference\] .*? ^Ref\d+= """), ("json", r""" "url": \s* "\w+:// """), @@ -388,13 +388,13 @@ txt += "%s\n" % http_fix_url(r["url"]) return txt # PLS def pls(self, rows): - txt = "[playlist]\n" + "numberofentries=%s\n" % len(rows) + txt = "[playlist]\n" + "NumberOfEntries=%s\n" % len(rows) for i,r in enumerate(rows): - txt += "File%s=%s\nTitle%s=%s\nLength%s=%s\n" % (i, r["url"], i, r["title"], i, -1) + txt += "File%s=%s\nTitle%s=%s\nLength%s=%s\n" % (i+1, r["url"], i+1, r["title"], i+1, -1) txt += "Version=2\n" return txt # JSON (native lists of streamtuner2) def json(self, rows):