Lazy-import KeyEmu in SpotifyBaseInterface

This commit is contained in:
Rafael Moraes
2026-03-27 23:29:42 -03:00
parent 18dfaf553f
commit 6a275b44ff
+2 -1
View File
@@ -9,7 +9,6 @@ from .constants import URL_INFO_RE
from .enums import CoverSize, MediaRating
from .exceptions import VotifyNoCdmException, VotifyUrlParseException
from .types import DecryptionKey, PlaylistTags, SpotifyUrlInfo
from unplayplay.key_emu import KeyEmu
logger = logging.getLogger(__name__)
@@ -73,6 +72,8 @@ 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