Get device code for authentication
All checks were successful
release / release-plugins (push) Successful in 25s
All checks were successful
release / release-plugins (push) Successful in 25s
This commit is contained in:
@@ -7,6 +7,7 @@ use Slim::Utils::Log;
|
||||
use Slim::Utils::Prefs;
|
||||
|
||||
my $log = logger('plugin.youtubemusic');
|
||||
my $cache = Slim::Utils::Cache->new();
|
||||
|
||||
sub name {
|
||||
return 'PLUGIN_YOUTUBEMUSIC';
|
||||
@@ -27,6 +28,11 @@ sub handler {
|
||||
preferences('plugin.youtubemusic')->set('testPref', $params->{'pref_testPref'});
|
||||
}
|
||||
|
||||
Plugins::YouTubeMusic::OAuth2::getDeviceCode if $params->{get_device_code};
|
||||
|
||||
$params->{user_code} = $cache->get('yt:user_code');
|
||||
$params->{verification_url} = $cache->get('yt:verification_url');
|
||||
|
||||
return $class->SUPER::handler($client, $params);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user