mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-23 11:37:08 -04:00

Qobuz client and fixture had to be imported The embedded cover is saved somewhere else now. Uses the path from the object itself to check if it gets downloaded, unsure if this is static or dynamic.
24 lines
722 B
Python
24 lines
722 B
Python
import hashlib
|
|
import os
|
|
|
|
import pytest
|
|
from util import arun
|
|
|
|
from streamrip.config import Config
|
|
from streamrip.client.qobuz import QobuzClient
|
|
|
|
|
|
@pytest.fixture(scope="session")
|
|
def qobuz_client():
|
|
config = Config.defaults()
|
|
config.session.qobuz.email_or_userid = os.environ["QOBUZ_EMAIL"]
|
|
config.session.qobuz.password_or_token = hashlib.md5(
|
|
os.environ["QOBUZ_PASSWORD"].encode("utf-8"),
|
|
).hexdigest()
|
|
if "QOBUZ_APP_ID" in os.environ and "QOBUZ_SECRETS" in os.environ:
|
|
config.session.qobuz.app_id = os.environ["QOBUZ_APP_ID"]
|
|
config.session.qobuz.secrets = os.environ["QOBUZ_SECRETS"].split(",")
|
|
client = QobuzClient(config)
|
|
arun(client.login())
|
|
|
|
return client
|