66 lines
2.2 KiB
Diff
66 lines
2.2 KiB
Diff
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)
|