diff --git a/Custom.pm b/Custom.pm index 708a9b2..395a8ea 100644 --- a/Custom.pm +++ b/Custom.pm @@ -469,6 +469,7 @@ sub _userQuery { # very lenghty (Perl hash key order is undetermined). $cacheKey = join(':', map { $_ . $params->{$_} } sort grep { $_ !~ /^_/ } keys %$params ); $cacheKey .= join(':', map { $_ . $content->{$_} } sort keys %$content) if $content && %$content; + $cacheKey .= ':' . $self->userId if $self->userId; $cacheKey = md5_hex($cacheKey); } diff --git a/Plugin.pm b/Plugin.pm index df33baf..356c61e 100644 --- a/Plugin.pm +++ b/Plugin.pm @@ -284,7 +284,7 @@ sub handleFeed { },{ name => cstring($client, 'PLUGIN_DEEZER_FLOW'), image => 'plugins/Deezer/html/flow.png', - play => 'deezer://user/' . $userId . '/flow.dzr', + play => 'deezer://user.flow', type => 'outline', items => [{ name => cstring($client, 'PLUGIN_DEEZER_FLOW'), @@ -311,13 +311,14 @@ sub handleFeed { type => 'link', url => sub { my ($client, $cb) = @_; - my $flow = !$prefs->get($userId . ':flow'); - $prefs->set($userId . ':flow', $flow); + my $currentUserId = getAPIHandler($client)->userId; + my $flow = !$prefs->get($currentUserId . ':flow'); + $prefs->set($currentUserId . ':flow', $flow); $cb->({ items => [{ type => 'text', name => cstring($client, $flow ? 'PLUGIN_DEEZER_FLOW_DISCOVERY' : 'PLUGIN_DEEZER_FLOW_DEFAULT'), }] }); - }, + }, }, ], },{