[grilo-plugins] metrolyrics: fix initial check up
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] metrolyrics: fix initial check up
- Date: Wed, 19 Mar 2014 11:33:03 +0000 (UTC)
commit c62b5524663ea5bccb4a0032ff0ee58bd971648c
Author: Victor Toso <me victortoso com>
Date: Wed Mar 19 02:05:30 2014 -0300
metrolyrics: fix initial check up
Artist and Title must be non empty strings.
Return after callback.
https://bugzilla.gnome.org/show_bug.cgi?id=726677
src/lua-factory/sources/grl-metrolyrics.lua | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/lua-factory/sources/grl-metrolyrics.lua b/src/lua-factory/sources/grl-metrolyrics.lua
index 473bf05..f61d15a 100644
--- a/src/lua-factory/sources/grl-metrolyrics.lua
+++ b/src/lua-factory/sources/grl-metrolyrics.lua
@@ -55,8 +55,10 @@ function grl_source_resolve()
local artist, title
req = grl.get_media_keys()
- if not req or not req.artist or not req.title then
+ if not req or not req.artist or not req.title
+ or #req.artist == 0 or #req.title == 0 then
grl.callback()
+ return
end
-- Prepare artist and title strings to the url
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]