aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Yakushev <yakushev.alex@gmail.com>2012-01-04 14:29:23 +0200
committerAlexander Yakushev <yakushev.alex@gmail.com>2012-01-04 14:29:23 +0200
commitb03ada4a0d3a71a51af0f68082e53df07d4c72bf (patch)
tree86ae12cd065f10ac11722aa9a132142037207834
parent38ef613ed079378dad80084ac330c6f1acefcd20 (diff)
downloadawesompd-b03ada4a0d3a71a51af0f68082e53df07d4c72bf.tar.gz
awesompd-b03ada4a0d3a71a51af0f68082e53df07d4c72bf.tar.bz2
Remove escaped slashes from song and artist names
Since Jamendo started for some reason escaping slashes with backslashes in their API output (so slashes become like this \/) one bug was already fixed, and now this cosmetic change is commited.
-rw-r--r--jamendo.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/jamendo.lua b/jamendo.lua
index 4e2ca30..0f30b13 100644
--- a/jamendo.lua
+++ b/jamendo.lua
@@ -164,6 +164,11 @@ function return_track_table(request_table)
end
_, _, parse_table[i].artist_link_name =
string.find(parse_table[i].artist_url, "\\/artist\\/(.+)")
+ -- Remove Jamendo escape slashes
+ parse_table[i].artist_name =
+ string.gsub(parse_table[i].artist_name, "\\/", "/")
+ parse_table[i].name = string.gsub(parse_table[i].name, "\\/", "/")
+
parse_table[i].display_name =
parse_table[i].artist_name .. " - " .. parse_table[i].name
-- Do Jamendo a favor, extract album_id for the track yourself