#album #numbers #track #url #fetch #com #genius

track_album_number_genius

Fetches track's number (starting from zero) in album by album's URL

5 releases (stable)

1.0.3 Aug 23, 2023
1.0.2 Apr 16, 2022
1.0.1 Feb 15, 2022
0.1.0 Feb 14, 2022

#5 in #genius

Custom license

14KB
61 lines

Genius Track Number Fetcher

crates.io Rust

Fetches track's number (starting from zero) in album by album's URL

Example

extern crate tokio;
use track_album_number_genius::get_track_number_in_album;

#[tokio::main]
async fn main() {
    assert!(
        "{}", 
        get_track_number_in_album(
            "https://genius.com/albums/The-weeknd/After-hours", 
            "Too Late"
        ).await, 
        Some(1)
    ) 
}

Dependencies

~8–21MB
~332K SLoC