aboutsummaryrefslogtreecommitdiffstats
path: root/bin/fair-viewer
diff options
context:
space:
mode:
Diffstat (limited to 'bin/fair-viewer')
-rwxr-xr-xbin/fair-viewer10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/fair-viewer b/bin/fair-viewer
index e20192b..83d35e2 100755
--- a/bin/fair-viewer
+++ b/bin/fair-viewer
@@ -2829,6 +2829,16 @@ sub print_playlists {
my $url = $results->{url};
my $playlists = $results->{results} // [];
+ if (ref($playlists) eq 'HASH') {
+ if (exists $playlists->{playlists}) {
+ $playlists = $playlists->{playlists};
+ }
+ else {
+ warn "\n[!] No playlists...\n";
+ $playlists = [];
+ }
+ }
+
state $info_format = <<"FORMAT";
TITLE: %s