Skip to content

Commit

Permalink
Don't fail on undefined cache lookup.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelherger committed May 22, 2024
1 parent 3f8b73d commit 5694038
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions InfoMenu.pm
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,11 @@ sub menuAction {
# if we are re-drilling, no need to search, just get our anchor/root
if ( defined $itemId ) {
my ($key) = $itemId =~ /([^\.]+)/;
my $cached = ${$rootFeeds{$key}};
main::INFOLOG && $log->is_info && $log->info("re-drilling using cache key: $key");
Slim::Control::XMLBrowser::cliQuery('tidal_action', $cached, $request);
return;
if (my $cached = ${$rootFeeds{$key} || \''}) {
main::INFOLOG && $log->is_info && $log->info("re-drilling using cache key: $key");
Slim::Control::XMLBrowser::cliQuery('tidal_action', $cached, $request);
return;
}
}

my $entity = $request->getRequest(1);
Expand Down Expand Up @@ -289,10 +290,11 @@ sub menuBrowse {
# if we are descending, no need to search, just get our root
if ( defined $itemId ) {
my ($key) = $itemId =~ /([^\.]+)/;
my $cached = ${$rootFeeds{$key}};
main::INFOLOG && $log->is_info && $log->info("re-drilling using cache key: $key");
Slim::Control::XMLBrowser::cliQuery('tidal_browse', $cached, $request);
return;
if (my $cached = ${$rootFeeds{$key} || \''}) {
main::INFOLOG && $log->is_info && $log->info("re-drilling using cache key: $key");
Slim::Control::XMLBrowser::cliQuery('tidal_browse', $cached, $request);
return;
}
}

# this key will prefix each action's hierarchy that JSON will sent us which
Expand Down
2 changes: 1 addition & 1 deletion install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<description>PLUGIN_TIDAL_DESC</description>
<creator>philippe_44, Michael Herger</creator>
<id>16da8158-263f-4347-8125-184372ea5610</id>
<version>1.4.6</version>
<version>1.4.7</version>
<module>Plugins::TIDAL::Plugin</module>
<importmodule>Plugins::TIDAL::Importer</importmodule>
<optionsURL>plugins/TIDAL/settings.html</optionsURL>
Expand Down

0 comments on commit 5694038

Please sign in to comment.