tranxuanthang / lrclib

LRCLIB server written in Rust with Axum and SQLite3 database
https://lrclib.net
MIT License
187 stars 1 forks source link

Enable search using duration #2

Open aneesh1122 opened 5 months ago

aneesh1122 commented 5 months ago

Let us get the results in lrclib.net after entering the duration.

Example 1) I searched 'Numb'. Got many results. Screenshot_2024-05-04-19-18-49-591_com.brave.browser-edit.jpg

2) I want to get the lyrics of the second song with runtime 3:06. I searched for 'Numb 3:06' but got no results Screenshot_2024-05-04-19-20-24-412_com.brave.browser.png

Please let us get results by using runtime

Tip : also include results for 'Numb 3:05' and 'Numb 3:07' when searched for 'Numb 3:06'

Batwam commented 4 months ago

As per the API

Note: The provided duration is crucial. LRCLIB will attempt to provide the lyrics only when the duration matches the record in LRCLIB's database, or at least with a difference of ±2 seconds in duration.

So it should probably show any result within ±2 seconds

aneesh1122 commented 4 months ago

As per the API

Note: The provided duration is crucial. LRCLIB will attempt to provide the lyrics only when the duration matches the record in LRCLIB's database, or at least with a difference of ±2 seconds in duration.

So it should probably show any result within ±2 seconds

even ±2 seconds will do if it means I'll get the lyrics easily.

Batwam commented 4 months ago

Yeah, it's the same thing as what you suggested in the Tip at the end of your original post, just a bit more tolerant and consistent with the LibLRC API.