]> gitweb.fluxo.info Git - awesompd.git/commitdiff
Replace escaped slashes with normal ones
authorAlexander Yakushev <yakushev.alex@gmail.com>
Wed, 23 Nov 2011 00:08:41 +0000 (02:08 +0200)
committerAlexander Yakushev <yakushev.alex@gmail.com>
Wed, 23 Nov 2011 00:08:41 +0000 (02:08 +0200)
Jamendo suddenly began to return all links with slashes escaped (like
this \/). Because of that mpc couldn't correctly understand the link
if passed in single quotes.

awesompd.lua

index 5997c1fb5ffb71c95540007248e08a8d2034987e..97c3722dd349e64bc0210e60f65c8370bbe8b4d9 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 '" .. string.gsub(track_table[i].stream, '\\/', '/') .. "'")
    end
    self.recreate_menu = true
    self.recreate_list = true