Skip to content

Fixed some bugs and added an option as not to overwhelm lrclib repo - #2

Open
hex-ronin wants to merge 5 commits into
javaarchive:mainfrom
hex-ronin:fix/lrclib-bad-request
Open

hex-ronin wants to merge 5 commits into
javaarchive:mainfrom
hex-ronin:fix/lrclib-bad-request

Conversation

@hex-ronin

Copy link
Copy Markdown
  • Fixed issues with encoding of special characters causes lrclib to return 400.
  • Fixed comma separated is not actually comma separated
  • Added a --delay option so not to overwhelm the lrclib repo when there are many lrc requests
  • Fixed handling of nullable fields in lrclib API response

- Replace audiotags with lofty so audio duration is read in seconds rather than ID3v2 TLEN milliseconds
- Parse comma-separated --ignore values with clap value_delimiter
- Guard /api/get against empty track_name/artist_name and out-of-range duration (1..=3600s), allowing --search fallback
- Filter search candidates for non-empty syncedLyrics even when duration is absent
- Include HTTP response body in lrclib API error messages
Adds -d/--delay <ms> (default 500ms, per lrclib.net request throttling guidance) to sleep between consecutive HTTP requests and avoid 429 Too Many Requests responses. Pass --delay 0 to disable.
- Use url parameter in LrcLibClient::new
- Remove unused config parameter from write_lrc_for_file
- Rename LrclibItem fields to snake_case with serde camelCase
LRCLIB TrackResponse can return null for duration, trackName, artistName, and albumName (and uses i64 for id). Make those fields Option in LrclibItem and handle missing durations cleanly when sorting/filtering search candidates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant