diff options
author | Alexander Yakushev <yakushev.alex@gmail.com> | 2012-03-26 16:04:10 +0300 |
---|---|---|
committer | Alexander Yakushev <yakushev.alex@gmail.com> | 2012-03-26 16:06:54 +0300 |
commit | f2eae5c0bb61aea39dbc623500bc29afbbb17a8d (patch) | |
tree | 626e7c37d8966121830864d1ce5fd7ba1d89674c | |
parent | de72a92036e8f5b6f73c04ea3f85dfd0e4e0ca89 (diff) | |
download | awesompd-f2eae5c0bb61aea39dbc623500bc29afbbb17a8d.tar.gz awesompd-f2eae5c0bb61aea39dbc623500bc29afbbb17a8d.tar.bz2 |
Adapt to new Jamendo links
-rw-r--r-- | jamendo.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/jamendo.lua b/jamendo.lua index f8848b4..9e31fc4 100644 --- a/jamendo.lua +++ b/jamendo.lua @@ -107,18 +107,15 @@ end -- Returns the track ID from the given link to Jamendo stream. If the -- 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 + local _, _, id = string.find(link,"storage.newjamendo.com/%?trackid=(%d+)") return id end --- Returns link to music stream for the given track ID. Uses Ogg +-- Returns link to music stream for the given track ID. Uses MP3 -- format and the default stream for it. local function get_link_by_id(id) -- This function is subject to change in the future. - return string.format("http://jamstore.radionomy.net/?trackid=%s&format=ogg2", id) + return string.format("http://storage.newjamendo.com/%?trackid=%s&format=mp31&u=0", id) end -- -- Returns the album id for given music stream. |