aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Yakushev <yakushev.alex@gmail.com>2011-11-21 18:45:25 +0200
committerAlexander Yakushev <yakushev.alex@gmail.com>2011-11-21 18:45:25 +0200
commit71d5cbaf520369f07708d99f920f11d54e8838d3 (patch)
tree1e7f80407acde59e7dfa399f998f401a7d3771dd
parent5a91def9330b4601cf1c2af8389ec53c26054f5a (diff)
downloadawesompd-71d5cbaf520369f07708d99f920f11d54e8838d3.tar.gz
awesompd-71d5cbaf520369f07708d99f920f11d54e8838d3.tar.bz2
Temporary adapt to Ogg streaming from radionomy
This will be finished when Jamendo API migrates to radionomy completely
-rw-r--r--awesompd.lua2
-rw-r--r--jamendo.lua7
2 files changed, 5 insertions, 4 deletions
diff --git a/awesompd.lua b/awesompd.lua
index 6183e8e..5997c1f 100644
--- a/awesompd.lua
+++ b/awesompd.lua
@@ -729,7 +729,7 @@ end
function awesompd:add_jamendo_tracks(track_table)
for i = 1,table.getn(track_table) do
- self:command("add " .. track_table[i].stream)
+ self:command("add '" .. track_table[i].stream .. "'")
end
self.recreate_menu = true
self.recreate_list = true
diff --git a/jamendo.lua b/jamendo.lua
index 953adf6..5a01975 100644
--- a/jamendo.lua
+++ b/jamendo.lua
@@ -86,6 +86,7 @@ local search_template = { fields = { "id", "name" },
params = { order = ORDER_RELEVANCE,
n = 1}}
+-- DEPRECATED. Will be removed in the next major release.
-- Returns default stream number for MP3 format. Requests API for it
-- not more often than every hour.
local function get_default_mp3_stream()
@@ -111,11 +112,11 @@ function get_id_from_link(link)
return id
end
--- Returns link to music stream for the given track ID. Uses MP3
+-- Returns link to music stream for the given track ID. Uses Ogg
-- format and the default stream for it.
local function get_link_by_id(id)
- return string.format("http://stream%s.jamendo.com/stream/%s/mp31/",
- get_default_mp3_stream(), id)
+ -- This function is subject to change in the future.
+ return string.format("http://jamstore.radionomy.net/?trackid=%s&format=ogg2", id)
end
-- -- Returns the album id for given music stream.