aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--main.py2
2 files changed, 6 insertions, 2 deletions
diff --git a/README.md b/README.md
index 2bfb0b1..19b2c66 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,9 @@ The script does the following:
- Re-encodes files with block size higher than 4096 via `flac` CLI
- Rename FLAC file to `TRACK_NAME - ARTIST.flac`
- Resize album art to 500x500px
+- Normalize all audio to -14 LUFS
- Download LRC file
+ - A delay of 0.3 sec is hardcoded to avoid rate limit, this is a hard limit across all threads (if running multithreaded)
# External Dependencies
You need the FLAC command line tool to be accessible globally, meaning it must be able to run anywhere on your machine. Using the official tool was the most consistent way of fixing the block-size issue cross-platform.
@@ -20,5 +22,7 @@ https://xiph.org/flac/download.html
```bash
uv sync
-uv run main.py <base_dir> [--nolrc]
+uv run main.py <base_dir> [--nolrc] [-n num_threads]
```
+
+Example: `uv run main.py <DIR_WITH_MUSIC>`
diff --git a/main.py b/main.py
index a031dd7..cb3eaae 100644
--- a/main.py
+++ b/main.py
@@ -192,7 +192,7 @@ def process_file(fp: Path, nolrc: bool) -> str:
log(f" Fetching LRC for: {title} - {artist}")
with _lyrics_semaphore:
lrc = syncedlyrics.search(f"{title} {artist}", providers=["Lrclib", "Megalobiz", "NetEase"])
- time.sleep(0.5)
+ time.sleep(0.3)
with open(lrc_path, "w", encoding="utf-8") as f:
f.write(lrc if lrc else "")
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage