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.
- Host: GitHub
- URL: https://github.com/aweirddev/tlyrics
- Owner: AWeirdDev
- Created: 2024-11-24T15:44:05.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-11-24T15:49:21.000Z (11 months ago)
- Last Synced: 2025-01-25T12:33:44.084Z (9 months ago)
- Topics: lyrics, lyrics-fetcher, lyrics-timestamp, synced-lyrics, timestamp
- Language: Rust
- Homepage: https://crates.io/crates/tlyrics
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)