diff options
author | Artturin <Artturin@artturin.com> | 2024-07-01 15:34:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-01 15:34:00 +0300 |
commit | dcffdd1040ec14a003bb053e6df7e4e298d1de59 (patch) | |
tree | 6455f5429812e5e61f1d76203792550351a95613 /pkgs/tools/audio | |
parent | 3914b7b7ec5ac331f01075270884a8627335a2e9 (diff) | |
parent | d9142feddd9910581331a29f1e6553dd5a4aeec4 (diff) |
Merge pull request #323322 from kashw2/spotdl
spotdl: added patch for `syncedlyrics.utils` build failure
Diffstat (limited to 'pkgs/tools/audio')
-rw-r--r-- | pkgs/tools/audio/spotdl/default.nix | 3 | ||||
-rw-r--r-- | pkgs/tools/audio/spotdl/is_lrc_valid-failure.patch | 65 |
2 files changed, 68 insertions, 0 deletions
diff --git a/pkgs/tools/audio/spotdl/default.nix b/pkgs/tools/audio/spotdl/default.nix index 3e252f2313b4b..68235ab3d469e 100644 --- a/pkgs/tools/audio/spotdl/default.nix +++ b/pkgs/tools/audio/spotdl/default.nix @@ -22,6 +22,9 @@ python3.pkgs.buildPythonApplication rec { 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 diff --git a/pkgs/tools/audio/spotdl/is_lrc_valid-failure.patch b/pkgs/tools/audio/spotdl/is_lrc_valid-failure.patch new file mode 100644 index 0000000000000..e419bca125d2a --- /dev/null +++ b/pkgs/tools/audio/spotdl/is_lrc_valid-failure.patch @@ -0,0 +1,65 @@ +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) |