Robert Schütz 2024-08-25 13:26:45 -07:00
parent 691792358c
commit 935008fd75
2 changed files with 2 additions and 72 deletions

View File

@ -6,25 +6,21 @@
python3.pkgs.buildPythonApplication rec {
pname = "spotdl";
version = "4.2.5";
version = "4.2.6";
pyproject = true;
src = fetchFromGitHub {
owner = "spotDL";
repo = "spotify-downloader";
rev = "refs/tags/v${version}";
hash = "sha256-vxMhFs2mLbVQndlC2UpeDP+M4pwU9Y4cZHbZ8y3vWbI=";
hash = "sha256-OhZXxGkcO/dlYth9xUnpd/IbyvsbjMzwqQ9lPSvnFSs=";
};
build-system = with python3.pkgs; [ poetry-core ];
pythonRelaxDeps = true;
# Remove when https://github.com/spotDL/spotify-downloader/issues/2119 is fixed
patches = [ ./is_lrc_valid-failure.patch ];
dependencies = with python3.pkgs; [
bandcamp-api
beautifulsoup4
fastapi
mutagen
@ -36,7 +32,6 @@ python3.pkgs.buildPythonApplication rec {
rapidfuzz
requests
rich
setuptools
soundcloud-v2
spotipy
syncedlyrics

View File

@ -1,65 +0,0 @@
From 0c1357470450d98b3b7fe5444ac460ba9ee04425 Mon Sep 17 00:00:00 2001
From: Jeremy Cutler <jerz4lunch@users.noreply.github.com>
Date: Mon, 17 Jun 2024 02:19:33 -0700
Subject: [PATCH 1/2] Update lrc.py for updated function in python-syncedlyrics
See syncedlyrics commit: [here](https://github.com/moehmeni/syncedlyrics/commit/64d3f9de3d17bec69cbc3b3b5acd1ab847fde4b2)
---
spotdl/utils/lrc.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/spotdl/utils/lrc.py b/spotdl/utils/lrc.py
index 726fefbee..e59490b53 100644
--- a/spotdl/utils/lrc.py
+++ b/spotdl/utils/lrc.py
@@ -7,7 +7,7 @@
from pathlib import Path
from syncedlyrics import search as syncedlyrics_search
-from syncedlyrics.utils import is_lrc_valid, save_lrc_file
+from syncedlyrics.utils import has_translation, save_lrc_file
from spotdl.types.song import Song
@@ -25,7 +25,7 @@ def generate_lrc(song: Song, output_file: Path):
- output_file: Path to the output file
"""
- if song.lyrics and is_lrc_valid(song.lyrics):
+ if song.lyrics and has_translation(song.lyrics):
lrc_data = song.lyrics
else:
try:
From bfa9456049132e64b5c83655bdeae7c9dcd1b532 Mon Sep 17 00:00:00 2001
From: Jeremy Cutler <jerz4lunch@users.noreply.github.com>
Date: Wed, 26 Jun 2024 18:06:59 -0700
Subject: [PATCH 2/2] Update lrc.py
Seems to have fixed the update of syncedlyrics to 1.0.0
---
spotdl/utils/lrc.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/spotdl/utils/lrc.py b/spotdl/utils/lrc.py
index e59490b53..cf7478214 100644
--- a/spotdl/utils/lrc.py
+++ b/spotdl/utils/lrc.py
@@ -7,7 +7,7 @@
from pathlib import Path
from syncedlyrics import search as syncedlyrics_search
-from syncedlyrics.utils import has_translation, save_lrc_file
+from syncedlyrics.utils import has_translation, Lyrics
from spotdl.types.song import Song
@@ -34,7 +34,7 @@ def generate_lrc(song: Song, output_file: Path):
lrc_data = None
if lrc_data:
- save_lrc_file(str(output_file.with_suffix(".lrc")), lrc_data)
+ Lyrics.save_lrc_file(str(output_file.with_suffix(".lrc")), lrc_data)
logger.debug("Saved lrc file for %s", song.display_name)
else:
logger.debug("No lrc file found for %s", song.display_name)