elamperti / OpenWebScrobbler

🎧 An open source web scrobbler for Last.fm
https://openscrobbler.com/
GNU General Public License v2.0
319 stars 38 forks source link

Auto-fill album for artist and track (closes #88) #250

Open mishmish-dev opened 2 weeks ago

mishmish-dev commented 2 weeks ago

The feature uses last.fm API trackGetInfo to retrieve an album name based on track + artist.

To complete this, I'd ask for help with a couple of things: 1) Translation, I added two new tooltips; 2) Creating some animation telling user of success/failure of the operation.

Things to consider: rate-limit last.fm API calls? Delegate to backend?

mishmish-dev commented 2 weeks ago

@elamperti Regarding item 2, I could try to re-use the catch-paste alert, but how to test alerts locally?

elamperti commented 2 weeks ago

The alerts use a context, so you can dispatch messages easily. I think that, for this feature, perhaps it would be more appropriate to show a spinner within the input (when loading) and create a "shake" animation if there's a failure (or some other indicator around this field).

mishmish-dev commented 2 weeks ago

Hmm, when I run OpenScrobbler locally, the catch-paste thing doesn't work.

Anyway, I would be glad if you add this animation. I am really not a frontend guy.

elamperti commented 2 weeks ago

Sure! I'll look into it.

To catch pasted text, you should have the corresponding option enabled (from the settings modal)

mishmish-dev commented 1 week ago

Hi @elamperti I implemented shakey animation for album auto-fill failure, as well as highlighting the input field with cyan/red on success/fail

elamperti commented 1 week ago

Awesome! I'm a bit backed up with a few other upcoming changes but I'll review and merge as soon as possible. Thanks for your work and patience! 😁

mishmish-dev commented 7 hours ago

Resolved conflict with the main branch in previous commit