aboutsummaryrefslogtreecommitdiff
path: root/jamendo.lua
diff options
context:
space:
mode:
authorAlexander Yakushev <yakushev.alex@gmail.com>2011-11-21 17:42:53 +0200
committerAlexander Yakushev <yakushev.alex@gmail.com>2011-11-21 17:42:53 +0200
commit5a91def9330b4601cf1c2af8389ec53c26054f5a (patch)
tree751dcfafd8518d86010e3ca559cc347901dd6e49 /jamendo.lua
parent544479fa37beaf77a4fb7eeb905be1dd3bacdd3b (diff)
downloadawesompd-5a91def9330b4601cf1c2af8389ec53c26054f5a.tar.gz
awesompd-5a91def9330b4601cf1c2af8389ec53c26054f5a.tar.bz2
Recognize jamstore.radiohomy.net links
Streams to jamstore.radiohomy.net are new and were not supported yet. Awesompd couldn't recognize them as Jamendo streams and replace them with normal track names.
Diffstat (limited to 'jamendo.lua')
-rw-r--r--jamendo.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/jamendo.lua b/jamendo.lua
index 26d4815..953adf6 100644
--- a/jamendo.lua
+++ b/jamendo.lua
@@ -1,7 +1,7 @@
---------------------------------------------------------------------------
-- @author Alexander Yakushev <yakushev.alex@gmail.com>
-- @copyright 2011 Alexander Yakushev
--- @release v1.1.0
+-- @release v1.1.1
---------------------------------------------------------------------------
-- Grab environment
@@ -105,6 +105,9 @@ end
-- given text is not the Jamendo stream returns nil.
function get_id_from_link(link)
local _, _, id = string.find(link,"jamendo.com/stream/(%d+)")
+ if not id then -- Handle streams from jamstore.radionomy.net
+ _, _, id = string.find(link,"jamstore.radionomy.net/%?trackid=(%d+)")
+ end
return id
end
@@ -427,7 +430,7 @@ end
-- Checks if track_name is actually a link to Jamendo stream. If true
-- returns the file with album cover for the track.
function try_get_cover(track_name)
- local id = get_id_from_link(track_name, true)
+ local id = get_id_from_link(track_name)
if id then
return get_album_cover(id)
end