[grilo-plugins] metrolyrics: encode artist/title for correct url
- From: Victor Toso de Carvalho <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] metrolyrics: encode artist/title for correct url
- Date: Fri, 29 Apr 2016 12:31:28 +0000 (UTC)
commit 54b43dd47ac6b113a5a3ef8a5f5c87a47a882437
Author: Victor Toso <me victortoso com>
Date: Sat Apr 9 15:24:39 2016 +0200
metrolyrics: encode artist/title for correct url
https://bugzilla.gnome.org/show_bug.cgi?id=764814
src/lua-factory/sources/grl-metrolyrics.lua | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/lua-factory/sources/grl-metrolyrics.lua b/src/lua-factory/sources/grl-metrolyrics.lua
index 72f9195..ebae835 100644
--- a/src/lua-factory/sources/grl-metrolyrics.lua
+++ b/src/lua-factory/sources/grl-metrolyrics.lua
@@ -66,8 +66,10 @@ function grl_source_resolve()
-- Prepare artist and title strings to the url
artist = req.artist:gsub(METROLYRICS_INVALID_URL_CHARS, "")
artist = artist:gsub("%s+", "-")
+ artist = grl.encode(artist)
title = req.title:gsub(METROLYRICS_INVALID_URL_CHARS, "")
title = title:gsub("%s+", "-")
+ title = grl.encode(title)
url = string.format(METROLYRICS_DEFAULT_QUERY, title, artist)
grl.fetch(url, fetch_page_cb, netopts)
end
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]