luisignaciocc / youtube-music-scrobbler

a python script to scrobble your YouTube Music history to Last.fm
MIT License
30 stars 5 forks source link

Inserting new records/updating existing, evaluating if new listen #10

Closed roos-robert closed 4 months ago

roos-robert commented 4 months ago

The code has been updated to do a check if the song from YouTube Music history has been played today, if no, a new local record is created and song scrobbled to Last.fm. If yes, the local record is updated if the position in the array the song was found in is less than before, then scrobbled to Last.fm.

This makes it possible to track songs being played multiple times a day.

The code should work both if you want to scrobble only e.g. once per day, or (recommended) with a 3-5 minute interval.

Also added some more output to the console to show which songs are being scrobbled to Last.fm.