An open API service indexing awesome lists of open source software.

https://github.com/aweirddev/tlyrics

Fetch synced lyrics (with timestamps) using the LRC format.
https://github.com/aweirddev/tlyrics

lyrics lyrics-fetcher lyrics-timestamp synced-lyrics timestamp

Last synced: 8 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# tlyrics
Fetch synced lyrics (with timestamps) from [LRCLib](https://lrclib.net) using the LRC format.

- **📦 Crate**: [crates.io/crates/tlyrics](https://crates.io/crates/tlyrics)
- **📖 Docs**: [docs.rs/tlyrics/latest](https://docs.rs/tlyrics/latest)


## Search
To search for a track, you can use `search()`:

```rust
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()`:

```rust
let song = get_by_id(song_id).await?;

// ... logic
```

***

[AWeirdDev](https://github.com/AWeirdDev)