From 99b5eceb1f3c293c4f2fddade481df6d664accd1 Mon Sep 17 00:00:00 2001 From: Toni Gundogdu Date: Sun, 19 May 2013 19:37:34 +0300 Subject: [PATCH] media/soundcloud.lua: Improve path patterns Exclude, specifically, any URLs that have the typical properties of a soundcloud playlist URL. Remove the path pattern intented for embedded media URLs: The `Soundcloud.normalize' should handle this already. Signed-off-by: Toni Gundogdu --- share/media/soundcloud.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/media/soundcloud.lua b/share/media/soundcloud.lua index 11a9ec4..acc42a2 100644 --- a/share/media/soundcloud.lua +++ b/share/media/soundcloud.lua @@ -60,8 +60,10 @@ function Soundcloud.can_parse_url(qargs) if t and t.scheme and t.scheme:lower():match('^http?$') and t.host and t.host:lower():match('soundcloud%.com$') and t.path and ( - t.path:lower():match('^/.+/.+$') - or t.path:lower():match('/player%.swf$') + -- Not a playlist URL. + not t.path:lower():match('^/.-/sets/[%w-_]+/$') + -- But has the following path properties. + and t.path:lower():match('^/.+/.+$') ) then return true -- 2.11.4.GIT