#timestamp #lyrics #lrc #api-bindings #lyrics-timestamps

tlyrics

Fetch synced lyrics (with timestamps) using the LRC format

2 releases

0.1.1 Nov 24, 2024
0.1.0 Nov 24, 2024

#7 in #lyrics

Download history 208/week @ 2024-11-22 38/week @ 2024-11-29 11/week @ 2024-12-06

257 downloads per month

MIT license

14KB
113 lines

tlyrics

Fetch synced lyrics (with timestamps) from LRCLib using the LRC format.

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

AWeirdDev

Dependencies

~6–19MB
~254K SLoC