mirror of
https://github.com/glomatico/votify.git
synced 2026-09-24 18:12:23 +02:00
Remove optional Librespot import fallback
This commit is contained in:
+1
-10
@@ -26,13 +26,9 @@ from .constants import (
|
||||
WIDEVINE_LICENSE_API_URL,
|
||||
)
|
||||
from .exceptions import VotifyRequestException
|
||||
from .librespot import Librespot
|
||||
from .totp import Totp
|
||||
|
||||
try:
|
||||
from .librespot import Librespot
|
||||
except ImportError:
|
||||
Librespot = None
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -165,11 +161,6 @@ class SpotifyApi:
|
||||
|
||||
def _initialize_librespot(self) -> None:
|
||||
if not self.skip_librespot:
|
||||
if not Librespot:
|
||||
raise ImportError(
|
||||
"Librespot is not available. Make sure to install the 'librespot' extra."
|
||||
)
|
||||
|
||||
self.librespot = Librespot(access_token=self._access_token)
|
||||
else:
|
||||
self.librespot = None
|
||||
|
||||
Reference in New Issue
Block a user