[GH-ISSUE #56] get_history() doesn't update properly? #42

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

Originally created by @akraus53 on GitHub (Aug 11, 2020).
Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/56

Originally assigned to: @akraus53 on GitHub.

My script (a scrobbler for lastFm) checks the get_history() function every minute but it just fetched old values? There were several new songs and it shows them in the browser too...

My script: https://gist.github.com/akraus53/ae97d9e4841dd669b920be906318c7be

The log file kept saying the history doesn't have any new entries but the browser did. It started working again an hour later?

Originally created by @akraus53 on GitHub (Aug 11, 2020). Original GitHub issue: https://github.com/sigma67/ytmusicapi/issues/56 Originally assigned to: @akraus53 on GitHub. My script (a scrobbler for lastFm) checks the get_history() function every minute but it just fetched old values? There were several new songs and it shows them in the browser too... My script: https://gist.github.com/akraus53/ae97d9e4841dd669b920be906318c7be The log file kept saying the history doesn't have any new entries but the browser did. It started working again an hour later?
kerem 2026-02-27 22:07:42 +03:00
  • closed this issue
  • added the
    yt-update
    label
Author
Owner

@sigma67 commented on GitHub (Aug 23, 2020):

Sounds odd, especially if it starts working again an hour later. Did you face the same issue again? Any possible causes?

<!-- gh-comment-id:678757536 --> @sigma67 commented on GitHub (Aug 23, 2020): Sounds odd, especially if it starts working again an hour later. Did you face the same issue again? Any possible causes?
Author
Owner

@akraus53 commented on GitHub (Aug 23, 2020):

Well kind of. It's hard to tell because if you're not listening and actively looking at LastFM you can't really tell if there's a break. There's another problem: Sometimes my script logs songs which were listened to a day before aka the history returned is missing the first X entries. I'll look into it further after my exams.

<!-- gh-comment-id:678787257 --> @akraus53 commented on GitHub (Aug 23, 2020): Well kind of. It's hard to tell because if you're not listening and actively looking at LastFM you can't really tell if there's a break. There's another problem: Sometimes my script logs songs which were listened to a day before aka the history returned is missing the first X entries. I'll look into it further after my exams.
Author
Owner

@akraus53 commented on GitHub (Aug 31, 2020):

image

My Script checks the last entry of get_history() every minute. It seems (and this only happens rarely) that the last entry is missing, so my scrobbler logs that i listened to the song again?

It seems like on that one afternoon the history was missing the last entry a few times and a minute later it was ok again? I will look into the log file of my script asap, I'm not on the same network atm and can only access it thru ssh.

Of course i could adjust my tool to check the last few entires and fix the problem this way, but we might aswell look into why it's happening in the first place

<!-- gh-comment-id:683691243 --> @akraus53 commented on GitHub (Aug 31, 2020): ![image](https://user-images.githubusercontent.com/22496160/91708547-c6646c00-eb81-11ea-86f8-88188c04a08f.png) My Script checks the last entry of get_history() every minute. It seems (and this only happens rarely) that the last entry is missing, so my scrobbler logs that i listened to the song again? It seems like on that one afternoon the history was missing the last entry a few times and a minute later it was ok again? I will look into the log file of my script asap, I'm not on the same network atm and can only access it thru ssh. Of course i could adjust my tool to check the last few entires and fix the problem this way, but we might aswell look into why it's happening in the first place
Author
Owner

@akraus53 commented on GitHub (Sep 7, 2020):

image

<!-- gh-comment-id:688156012 --> @akraus53 commented on GitHub (Sep 7, 2020): ![image](https://user-images.githubusercontent.com/22496160/92365228-10a29b80-f0f4-11ea-95a3-62adf91199bf.png)
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/ytmusicapi#42
No description provided.