[GH-ISSUE #7] Errant removal and addition of playlists #6

Closed
opened 2026-02-27 20:07:39 +03:00 by kerem · 4 comments
Owner

Originally created by @tomballgithub on GitHub (Mar 31, 2025).
Original GitHub issue: https://github.com/misiektoja/spotify_profile_monitor/issues/7

It doesn't seem to me that a playlist should be a (-1) due to a network issue, just to get added back later.

Example:

-----------------------------------------------------------------------------------------------------------------
* Playlists number changed for user redacted from 26 to 25 (-1)

Removed playlists:

- Error while getting info for playlist with URI spotify:playlist:redacted, skipping for now - 502 Server Error: Bad Gateway for url: https://api.spotify.com/v1/playlists/redacted?fields=name,description,owner,followers,external_urls,tracks.total
Timestamp:              Mon, 31 Mar 2025, 11:01:51
-----------------------------------------------------------------------------------------------------------------

-----------------------------------------------------------------------------------------------------------------
* Playlists number changed for user redacted from 25 to 26 (+1)

Added playlists:

- redacted [ https://open.spotify.com/playlist/redacted?si=1 ]

Sending email notification to redacted
Check interval:         30 minutes (Mon 31 Mar 11:02 - 11:32)
Timestamp:              Mon, 31 Mar 2025, 11:32:28
-----------------------------------------------------------------------------------------------------------------

Originally created by @tomballgithub on GitHub (Mar 31, 2025). Original GitHub issue: https://github.com/misiektoja/spotify_profile_monitor/issues/7 It doesn't seem to me that a playlist should be a (-1) due to a network issue, just to get added back later. Example: ``` ----------------------------------------------------------------------------------------------------------------- * Playlists number changed for user redacted from 26 to 25 (-1) Removed playlists: - Error while getting info for playlist with URI spotify:playlist:redacted, skipping for now - 502 Server Error: Bad Gateway for url: https://api.spotify.com/v1/playlists/redacted?fields=name,description,owner,followers,external_urls,tracks.total Timestamp: Mon, 31 Mar 2025, 11:01:51 ----------------------------------------------------------------------------------------------------------------- ----------------------------------------------------------------------------------------------------------------- * Playlists number changed for user redacted from 25 to 26 (+1) Added playlists: - redacted [ https://open.spotify.com/playlist/redacted?si=1 ] Sending email notification to redacted Check interval: 30 minutes (Mon 31 Mar 11:02 - 11:32) Timestamp: Mon, 31 Mar 2025, 11:32:28 ----------------------------------------------------------------------------------------------------------------- ```
kerem closed this issue 2026-02-27 20:07:39 +03:00
Author
Owner

@misiektoja commented on GitHub (Apr 5, 2025):

It is essentially not a network issue, but a Spotify API glitch. I have also observed it a few times on my own account.

What happens is that the Spotify API reports that the number of playlists has decreased. We check if a playlist has been removed or made private, and if not, we try to get information about it, but we get 502.

The next time we check, Spotify returns the original number of playlists.

A very similar issue could be observed in the past with all playlists disappearing for the user only to reappear later, but I put the code to handle it.

Anyway, I have some ideas to address it with a caching mechanism.

<!-- gh-comment-id:2780691034 --> @misiektoja commented on GitHub (Apr 5, 2025): It is essentially not a network issue, but a Spotify API glitch. I have also observed it a few times on my own account. What happens is that the Spotify API reports that the number of playlists has decreased. We check if a playlist has been removed or made private, and if not, we try to get information about it, but we get 502. The next time we check, Spotify returns the original number of playlists. A very similar issue could be observed in the past with all playlists disappearing for the user only to reappear later, but I put the code to handle it. Anyway, I have some ideas to address it with a caching mechanism.
Author
Owner

@tomballgithub commented on GitHub (Apr 5, 2025):

My simplistic thought was just not trust an observed change until it is
seen X times. In my case, I expect changes so rarely that the delay
wouldn't matter. But false changes would be annoying.

  • Jeoff

On Sat, Apr 5, 2025, 7:16 AM Michal Szymanski @.***>
wrote:

It is essentially not a network issue, but a Spotify API glitch. I have
also observed it a few times on my own account.

What happens is that the Spotify API reports that the number of playlists
has decreased. We check if a playlist has been removed or made private, and
if not, we try to get information about it, but we get 502.

The next time we check, Spotify returns the original number of playlists.

A very similar issue could be observed in the past with all playlists
disappearing for the user only to reappear later, but I put the code to
handle it.

Anyway, I have some ideas to address it with a caching mechanism.


Reply to this email directly, view it on GitHub
https://github.com/misiektoja/spotify_profile_monitor/issues/7#issuecomment-2780691034,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADVRWS55K5VVTYVCPLFR5G32X7CRPAVCNFSM6AAAAAB2E3G65OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBQGY4TCMBTGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>
[image: misiektoja]misiektoja left a comment
(misiektoja/spotify_profile_monitor#7)
https://github.com/misiektoja/spotify_profile_monitor/issues/7#issuecomment-2780691034

It is essentially not a network issue, but a Spotify API glitch. I have
also observed it a few times on my own account.

What happens is that the Spotify API reports that the number of playlists
has decreased. We check if a playlist has been removed or made private, and
if not, we try to get information about it, but we get 502.

The next time we check, Spotify returns the original number of playlists.

A very similar issue could be observed in the past with all playlists
disappearing for the user only to reappear later, but I put the code to
handle it.

Anyway, I have some ideas to address it with a caching mechanism.


Reply to this email directly, view it on GitHub
https://github.com/misiektoja/spotify_profile_monitor/issues/7#issuecomment-2780691034,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADVRWS55K5VVTYVCPLFR5G32X7CRPAVCNFSM6AAAAAB2E3G65OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBQGY4TCMBTGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

<!-- gh-comment-id:2780787418 --> @tomballgithub commented on GitHub (Apr 5, 2025): My simplistic thought was just not trust an observed change until it is seen X times. In my case, I expect changes so rarely that the delay wouldn't matter. But false changes would be annoying. - Jeoff On Sat, Apr 5, 2025, 7:16 AM Michal Szymanski ***@***.***> wrote: > It is essentially not a network issue, but a Spotify API glitch. I have > also observed it a few times on my own account. > > What happens is that the Spotify API reports that the number of playlists > has decreased. We check if a playlist has been removed or made private, and > if not, we try to get information about it, but we get 502. > > The next time we check, Spotify returns the original number of playlists. > > A very similar issue could be observed in the past with all playlists > disappearing for the user only to reappear later, but I put the code to > handle it. > > Anyway, I have some ideas to address it with a caching mechanism. > > — > Reply to this email directly, view it on GitHub > <https://github.com/misiektoja/spotify_profile_monitor/issues/7#issuecomment-2780691034>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ADVRWS55K5VVTYVCPLFR5G32X7CRPAVCNFSM6AAAAAB2E3G65OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBQGY4TCMBTGQ> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > [image: misiektoja]*misiektoja* left a comment > (misiektoja/spotify_profile_monitor#7) > <https://github.com/misiektoja/spotify_profile_monitor/issues/7#issuecomment-2780691034> > > It is essentially not a network issue, but a Spotify API glitch. I have > also observed it a few times on my own account. > > What happens is that the Spotify API reports that the number of playlists > has decreased. We check if a playlist has been removed or made private, and > if not, we try to get information about it, but we get 502. > > The next time we check, Spotify returns the original number of playlists. > > A very similar issue could be observed in the past with all playlists > disappearing for the user only to reappear later, but I put the code to > handle it. > > Anyway, I have some ideas to address it with a caching mechanism. > > — > Reply to this email directly, view it on GitHub > <https://github.com/misiektoja/spotify_profile_monitor/issues/7#issuecomment-2780691034>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/ADVRWS55K5VVTYVCPLFR5G32X7CRPAVCNFSM6AAAAAB2E3G65OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOOBQGY4TCMBTGQ> > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> >
Author
Owner

@misiektoja commented on GitHub (Apr 7, 2025):

My simplistic thought was just not trust an observed change until it is
seen X times. In my case, I expect changes so rarely that the delay
wouldn't matter. But false changes would be annoying.

Hey, I refactored the playlist processing to handle the erratic behavior of the Spotify API. I'm not sure if it will cover all the corner cases, but I left it running for a couple of hours and it looks promising. Let me know how it is on your side (pushed to dev branch).

<!-- gh-comment-id:2784174438 --> @misiektoja commented on GitHub (Apr 7, 2025): > My simplistic thought was just not trust an observed change until it is > seen X times. In my case, I expect changes so rarely that the delay > wouldn't matter. But false changes would be annoying. Hey, I refactored the playlist processing to handle the erratic behavior of the Spotify API. I'm not sure if it will cover all the corner cases, but I left it running for a couple of hours and it looks promising. Let me know how it is on your side (pushed to dev branch).
Author
Owner

@tomballgithub commented on GitHub (Apr 7, 2025):

I'll test this out and try to induce the situation and see what happens

<!-- gh-comment-id:2784732213 --> @tomballgithub commented on GitHub (Apr 7, 2025): I'll test this out and try to induce the situation and see what happens
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify_profile_monitor#6
No description provided.