feat: export to a .txt file instead of .lrc when --plain
This commit is contained in:
+5
-2
@@ -297,7 +297,10 @@ def get_audio_path(audio_url: str, ensure_exists: bool = False) -> Optional[Path
|
||||
|
||||
|
||||
def get_sidecar_path(
|
||||
audio_url: str, ensure_audio_exists: bool = False, ensure_exists: bool = False
|
||||
audio_url: str,
|
||||
ensure_audio_exists: bool = False,
|
||||
ensure_exists: bool = False,
|
||||
extension: str = ".lrc",
|
||||
) -> Optional[Path]:
|
||||
"""Given a file:// URL, return the corresponding .lrc sidecar path.
|
||||
|
||||
@@ -307,7 +310,7 @@ def get_sidecar_path(
|
||||
audio_path = get_audio_path(audio_url, ensure_exists=ensure_audio_exists)
|
||||
if not audio_path:
|
||||
return None
|
||||
lrc_path = audio_path.with_suffix(".lrc")
|
||||
lrc_path = audio_path.with_suffix(extension)
|
||||
if ensure_exists and not lrc_path.exists():
|
||||
return None
|
||||
return lrc_path
|
||||
|
||||
Reference in New Issue
Block a user