From a6ebdc4dab177af3a34085de0967a26144b6437e Mon Sep 17 00:00:00 2001 From: lucifer Date: Mon, 12 Jan 2026 14:37:21 -0500 Subject: [PATCH] checking for valid data --- album-songs.lua | 3 +-- albums.lua | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/album-songs.lua b/album-songs.lua index 5fb68bb..7f26a10 100644 --- a/album-songs.lua +++ b/album-songs.lua @@ -40,8 +40,7 @@ local res, code, response_headers, status, json_response, data = ampacheHttp.mak }) -- Check if the request was successful -if code == 200 then - +if code == 200 and data ~= nil then -- if the -j option is passed, just print the json file if is_json_output == true then print(json_response) diff --git a/albums.lua b/albums.lua index cead4b7..75e8c24 100644 --- a/albums.lua +++ b/albums.lua @@ -40,7 +40,7 @@ local res, code, response_headers, status, json_response, data = filterValue = filter_value }) -if code == 200 then +if code == 200 and data ~= nil then -- if the -j option is passed, just print the json file if is_json_output == true then print(json_response)