| Crates.io | tlyrics |
| lib.rs | tlyrics |
| version | 0.1.1 |
| created_at | 2024-11-24 15:28:43.724823+00 |
| updated_at | 2024-11-24 15:45:06.393001+00 |
| description | Fetch synced lyrics (with timestamps) using the LRC format. |
| homepage | |
| repository | https://github.com/AWeirdDev/tlyrics |
| max_upload_size | |
| id | 1459331 |
| size | 47,332 |
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());
}
To get a track by its ID, you can use get_by_id():
let song = get_by_id(song_id).await?;
// ... logic