mirror of
https://github.com/glomatico/votify.git
synced 2026-09-16 22:22:20 +02:00
Move unplayplay imports to top-level
This commit is contained in:
@@ -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__)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user