From 5a91def9330b4601cf1c2af8389ec53c26054f5a Mon Sep 17 00:00:00 2001 From: Alexander Yakushev Date: Mon, 21 Nov 2011 17:42:53 +0200 Subject: 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. --- awesompd.lua | 2 +- jamendo.lua | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/awesompd.lua b/awesompd.lua index 617d9cf..6183e8e 100644 --- a/awesompd.lua +++ b/awesompd.lua @@ -1,7 +1,7 @@ --------------------------------------------------------------------------- -- @author Alexander Yakushev -- @copyright 2010-2011 Alexander Yakushev --- @release v1.1.0 +-- @release v1.1.1 --------------------------------------------------------------------------- awesompd = {} 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 -- @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 -- cgit v1.2.3