2 releases
0.1.1 | Nov 24, 2024 |
---|---|
0.1.0 | Nov 24, 2024 |
#7 in #lyrics
257 downloads per month
14KB
113 lines
tlyrics
Fetch synced lyrics (with timestamps) from LRCLib using the LRC format.
Search
To search for a track, you can use search()
:
let results = search("slow dancing in the dark").await?;
println!("{:#?}", results);
let song = results[0];
println!("Name: {}", song.track_name);
println!("By: {}", song.artist_name);
println!("Album: {}", song.album_name);
println!("Duration: {}", song.duration);
// Synced lyrics
if let Some(lyrics) = song.synced_lyrics {
println!("{:#?}", lyrics.pieces());
}
By ID
To get a track by its ID, you can use get_by_id()
:
let song = get_by_id(song_id).await?;
// ... logic
Dependencies
~6–19MB
~254K SLoC