From 08372b05d787794f034796220356198268e90844 Mon Sep 17 00:00:00 2001 From: Rose Liverman Date: Wed, 29 Sep 2021 13:34:02 -0600 Subject: [PATCH] actually use your own library silly --- search.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/search.lua b/search.lua index 549fabd..b4c4474 100755 --- a/search.lua +++ b/search.lua @@ -33,7 +33,8 @@ local funkwhale = arg[2] local results = music.random(count, nil, nil, {downloaded = true, searched = true}) local track for _,v in ipairs(results) do - track = music.data[v].names[1] + track = music.name(v) -- music.data[v].names[1] + if not track then print("Track '" .. v .. "' does not exist?") end -- shouldn't happen if urlencode then track = urlencode.encode_url(track) else