diff --git a/votify/interface/audio.py b/votify/interface/audio.py index fe70ee2..a5b5cb3 100644 --- a/votify/interface/audio.py +++ b/votify/interface/audio.py @@ -2,6 +2,7 @@ import asyncio import logging from pywidevine.license_protocol_pb2 import WidevinePsshData +from unplayplay.consts import EMULATOR_SIZES, PLAYPLAY_TOKEN from ..api.enums import SessionType from ..api.proto.audio_files_extension_pb2 import AudioFilesExtensionResponse @@ -22,12 +23,6 @@ from .exceptions import ( ) from .types import DecryptionKey, StreamInfo, StreamInfoAv -try: - from unplayplay.consts import EMULATOR_SIZES, PLAYPLAY_TOKEN -except ImportError: - EMULATOR_SIZES = None - PLAYPLAY_TOKEN = None - logger = logging.getLogger(__name__) diff --git a/votify/interface/base.py b/votify/interface/base.py index 21c8141..e7cd286 100644 --- a/votify/interface/base.py +++ b/votify/interface/base.py @@ -3,6 +3,7 @@ import logging from async_lru import alru_cache from pywidevine import PSSH, Cdm, Device +from unplayplay.key_emu import KeyEmu from ..api import SpotifyApi from .constants import URL_INFO_RE @@ -72,8 +73,6 @@ class SpotifyBaseInterface: def _initialize_key_emu(self) -> None: if self.spotify_dll_path: - from unplayplay.key_emu import KeyEmu - self.key_emu = KeyEmu(self.spotify_dll_path) else: self.key_emu = None