[grilo-plugins] radiofrance: Don't break when run behind a portal
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo-plugins] radiofrance: Don't break when run behind a portal
- Date: Sun, 6 Apr 2014 15:39:50 +0000 (UTC)
commit 37677190945947dfa6b7f445ca96c01e66e74430
Author: Bastien Nocera <hadess hadess net>
Date: Mon Mar 31 09:32:45 2014 +0200
radiofrance: Don't break when run behind a portal
[lua-library] grl-lua-library.c:351: calling source callback function fail (radiofrance_fetch_cb)
'/home/hadess/Projects/gnome-install/share/grilo-plugins/grl-lua-factory/grl-radiofrance.lua:87: attempt to
index local 'items' (a nil value)'
https://bugzilla.gnome.org/show_bug.cgi?id=727569
src/lua-factory/sources/grl-radiofrance.lua | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/lua-factory/sources/grl-radiofrance.lua b/src/lua-factory/sources/grl-radiofrance.lua
index 1776f98..090001e 100644
--- a/src/lua-factory/sources/grl-radiofrance.lua
+++ b/src/lua-factory/sources/grl-radiofrance.lua
@@ -84,6 +84,11 @@ function parse_playlist(playlist, francebleu)
end
local items = playlist:match('Flux = {.-' .. match1_prefix .. ' : {(.*)}.-}')
+ if not items then
+ grl.callback()
+ return false
+ end
+
for item in items:gmatch(match2) do
local media = create_media(item, francebleu)
if media then
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]