]> gitweb.fluxo.info Git - awesompd.git/commitdiff
Temporary adapt to Ogg streaming from radionomy
authorAlexander Yakushev <yakushev.alex@gmail.com>
Mon, 21 Nov 2011 16:45:25 +0000 (18:45 +0200)
committerAlexander Yakushev <yakushev.alex@gmail.com>
Mon, 21 Nov 2011 16:45:25 +0000 (18:45 +0200)
This will be finished when Jamendo API migrates to radionomy completely

awesompd.lua
jamendo.lua

index 6183e8ef26bb6888d9cdd360c2757d936d8f551f..5997c1fb5ffb71c95540007248e08a8d2034987e 100644 (file)
@@ -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
index 953adf6b5f698a9a86cc58e245547bde7407f2af..5a019751e9e0678264ab1108964c16610bc7ad8a 100644 (file)
@@ -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.