mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-24 20:14:42 -04:00
Make file names shorter in metadata module (#519)
* Rename files in metadata module * Fix tests
This commit is contained in:
parent
d1b5bd2958
commit
7b59e623ff
12 changed files with 43 additions and 22 deletions
|
@ -1,24 +1,32 @@
|
|||
import os
|
||||
import shutil
|
||||
|
||||
import pytest
|
||||
from util import arun
|
||||
|
||||
import streamrip.db as db
|
||||
from streamrip.client.downloadable import Downloadable
|
||||
from streamrip.client.qobuz import QobuzClient
|
||||
from streamrip.media.track import PendingSingle, Track
|
||||
import streamrip.db as db
|
||||
from fixtures.clients import qobuz_client
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
"QOBUZ_EMAIL" not in os.environ, reason="Qobuz credentials not found in env."
|
||||
)
|
||||
def test_pending_resolve(qobuz_client: QobuzClient):
|
||||
qobuz_client.config.session.downloads.folder = "./tests"
|
||||
p = PendingSingle("19512574", qobuz_client, qobuz_client.config, db.Database(db.Dummy(), db.Dummy()))
|
||||
p = PendingSingle(
|
||||
"19512574",
|
||||
qobuz_client,
|
||||
qobuz_client.config,
|
||||
db.Database(db.Dummy(), db.Dummy()),
|
||||
)
|
||||
t = arun(p.resolve())
|
||||
dir = "tests/tests/Fleetwood Mac - Rumours (1977) [FLAC] [24B-96kHz]"
|
||||
assert os.path.isdir(dir)
|
||||
assert os.path.isfile(os.path.join(dir, "cover.jpg"))
|
||||
#embedded_cover_path aka t.cover_path is
|
||||
#./tests/./tests/Fleetwood Mac - Rumours (1977) [FLAC] [24B-96kHz]/
|
||||
# embedded_cover_path aka t.cover_path is
|
||||
# ./tests/./tests/Fleetwood Mac - Rumours (1977) [FLAC] [24B-96kHz]/
|
||||
# __artwork/cover-9202762427033526105.jpg
|
||||
assert os.path.isfile(t.cover_path)
|
||||
assert isinstance(t, Track)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue