Skip to content

Commit

Permalink
format with black
Browse files Browse the repository at this point in the history
  • Loading branch information
xnetcat committed Sep 6, 2024
1 parent b9ac0f7 commit 2197be3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 deletions spotdl/console/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ def web(web_settings: WebOptions, downloader_settings: DownloaderOptions):
# Download web app from GitHub if not already downloaded or force flag set
web_app_dir = get_web_ui_path()
dist_dir = web_app_dir / "dist"
if (
not dist_dir.exists() or web_settings["force_update_gui"]
) and web_settings["web_gui_location"] is None:
if (not dist_dir.exists() or web_settings["force_update_gui"]) and web_settings[
"web_gui_location"
] is None:
if web_settings["web_gui_repo"] is None:
gui_repo = "https://github.com/spotdl/web-ui/tree/master/dist"
else:
Expand Down
2 changes: 1 addition & 1 deletion spotdl/providers/audio/piped.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from spotdl.providers.audio.base import (
ISRC_REGEX,
AudioProvider,
YTDLLogger,
AudioProviderError,
YTDLLogger,
)
from spotdl.types.result import Result
from spotdl.utils.config import GlobalConfig, get_temp_path
Expand Down
12 changes: 7 additions & 5 deletions tests/test_matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def test_ytmusic_matching(monkeypatch, query, expected, capsys):
monkeypatch.setattr(SpotifyClient, "init", new_initialize)

yt_music = YouTubeMusic()

video_ids = [link.split("?v=")[1] for link in expected]

try:
Expand All @@ -416,14 +416,16 @@ def test_ytmusic_matching(monkeypatch, query, expected, capsys):
in captured.out
):
pytest.skip("YouTube Music search failed")

if result == None:
pytest.skip("No result has been found. Continue.")

assert result is not None and result.split("?v=")[1] in video_ids

except AssertionError:
pytest.skip("Either the Result is None or new ID has been returned. Please update it in links.")

pytest.skip(
"Either the Result is None or new ID has been returned. Please update it in links."
)

except AudioProviderError:
pytest.skip("YouTube Music search failed")

0 comments on commit 2197be3

Please sign in to comment.