File tree 3 files changed +11
-8
lines changed
3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 8
8
9
9
from mopidy import backend
10
10
from pykka import ThreadingActor
11
- from tidalapi import Config , Quality , Session
11
+ from tidalapi import Config , Session
12
12
from tidalapi import __version__ as tidalapi_ver
13
13
14
14
from mopidy_tidal import Extension
@@ -132,7 +132,7 @@ def _login(self):
132
132
if not self .login_server_port :
133
133
# A. Default login, user must find login URL in Mopidy log
134
134
logger .info ("Creating new session (OAuth)..." )
135
- self ._active_session .login_oauth_simple (function = logger .info )
135
+ self ._active_session .login_oauth_simple (fn_print = logger .info )
136
136
else :
137
137
# B. Interactive login, user must perform login using web auth
138
138
logger .info (
@@ -186,9 +186,9 @@ def _web_auth_callback(self, url_redirect: str):
186
186
if self .pkce_enabled :
187
187
try :
188
188
# Query for auth tokens
189
- json : dict [
190
- str , Union [ str , int ]
191
- ] = self . _active_session . pkce_get_auth_token ( url_redirect )
189
+ json : dict [str , Union [ str , int ]] = (
190
+ self . _active_session . pkce_get_auth_token ( url_redirect )
191
+ )
192
192
# Parse and set tokens.
193
193
self ._active_session .process_auth_token (json , is_pkce_token = True )
194
194
self ._logged_in = True
Original file line number Diff line number Diff line change @@ -77,9 +77,11 @@ def _calculate_added_and_removed_playlist_ids(
77
77
2 , thread_name_prefix = "mopidy-tidal-playlists-refresh-"
78
78
) as pool :
79
79
pool_res = pool .map (
80
- lambda func : get_items (func )
81
- if func == session .user .favorites .playlists
82
- else func (),
80
+ lambda func : (
81
+ get_items (func )
82
+ if func == session .user .favorites .playlists
83
+ else func ()
84
+ ),
83
85
[
84
86
session .user .favorites .playlists ,
85
87
session .user .playlists ,
Original file line number Diff line number Diff line change 1
1
"""Test context, which is used to manage config."""
2
+
2
3
import pytest
3
4
4
5
from mopidy_tidal import context
You can’t perform that action at this time.
0 commit comments