Yooooomi / your_spotify

Self hosted Spotify tracking dashboard
GNU General Public License v3.0
2.65k stars 108 forks source link

Question - Edit playtime for the song to be imported #337

Open timmitech opened 5 months ago

timmitech commented 5 months ago

Does anybody know if there's a way to edit the time the track has to play to be imported? As I'm a skipper my listening history has some holes in it :-(

Yooooomi commented 5 months ago

Hello! As of today this is not variabilised. However the minimum time requirement is 30 seconds. Do you really want to have song you listened to for 30 seconds in your history? For reference: https://github.com/Yooooomi/your_spotify/blob/b205bfb606fbc72f41eb79fb6fcb9a230bf8819d/server/src/tools/importers/full_privacy.ts#L228 I could make it an env variable if you really need it.

timmitech commented 5 months ago

Hey, 30 seconds would be great but (i don't know if it's just me or if its a general "problem") it doesn't work. I've just tested it with three different songs.

  1. 32 secons (should be enough)
  2. a little more than a minute (should work too)
  3. full song played

After waiting for the next refreshing only the fully played song gets imported.

I'm using the provided docker compose file installed on 22nd of december last year. I think there hasn't been an update since?

timmitech commented 4 months ago

Hey there, sice it's still not working I`d like to take your env variable offer. Would it be possible for you to implement this? Maybe it works then.

raisinbear commented 4 months ago

Hm, I was irritated by this as well but it seems Spotify‘s API is at fault here. This is far from my expertise, but the code lines you quoted, @Yooooomi, are not the limiting part during API queries. Spotify simply does not return any items if songs were only partially played back (even if for several minutes). This is quite the old thread and there’s only little more I could dig up on the topic, but apparently it is either a long existing bug or the statement „longer than 30s“ that one often encounters in this context just holds for Spotify‘s internal metrics.