Hide recent media on now page if requests fail

This commit is contained in:
2024-05-24 20:30:42 +10:00
parent f4bbeea825
commit b894fe93fa
3 changed files with 22 additions and 18 deletions

View File

@@ -7,7 +7,6 @@ module Main
include Deps["queries.posts.recently_played"]
expose :recently_played_music do |recently_played_result|
# raise recently_played_result["data"].inspect
JSON.parse(recently_played_result)["data"].reject { |a| a["type"] != "albums" }.map do |album|
{
artist: album["attributes"]["artistName"],