[grilo-plugins/wip/jfelder/fix-theaudiodb: 3/3] theaudiobd: Fix thumbnail retrieval



commit 3d5f594178e117c98414288285ab9c7a9730e073
Author: Jean Felder <jfelder src gnome org>
Date:   Sun Sep 2 11:43:01 2018 +0200

    theaudiobd: Fix thumbnail retrieval
    
    json.album is a list of results. Get the thumbnails from the first
    result.

 src/lua-factory/sources/grl-theaudiodb-cover.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/lua-factory/sources/grl-theaudiodb-cover.lua 
b/src/lua-factory/sources/grl-theaudiodb-cover.lua
index 559b9b9..85b5a3f 100644
--- a/src/lua-factory/sources/grl-theaudiodb-cover.lua
+++ b/src/lua-factory/sources/grl-theaudiodb-cover.lua
@@ -100,7 +100,7 @@ function fetch_cb(result)
   local media = {}
   local thumb = {}
   for _, val in ipairs(covers_fields) do
-    thumb[#thumb + 1] = json.album[val] or nil
+    thumb[#thumb + 1] = json.album[1][val] or nil
   end
 
   media.thumbnail = thumb


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]