When is a songs playcount queried ?
#1
Dave,

quick question when is the playcount for a song actually queried ?

I have a small test playlist of a dozen short songs

The first time I load the playlist the playcount I am displaying on screen is correct, ie it agrees with value stored in db

when the songs are played I can see in the db that the playcount gets incremented when the song finishes playing

If I stop the playlist and clear it and then play some other songs for example, then reload my test playlist it still displays the playcount from the original value stored in the db rather than the newly incremented one

If I close and restart kodi, it of course now correctly displays the new playcount

is it possible you could amend the code so that the song info is queried when the playlist is loaded ?

if this not possible then no issue as its not something I think many people would notice or worry about
Reply
#2
Song data, including playcount, gets fetched when the list of songs is displayed. If that takes a while then the data gets cached, so that when you switch away and come back it does not take a long time again but reads from cache.
Quote:If I stop the playlist and clear it and then play some other songs for example, then reload my test playlist it still displays the playcount from the original value stored in the db rather than the newly incremented one
It sounds like you are seeing the effects of caching, otherwise I would expect the reload of playlist (since you had been looking at something else) to refresh the list and thus fetch data.

But I will have a glance at where playcount is increamented and see if anything obvious strkes me.
Reply



Logout Mark Read Team Forum Stats Members Help
When is a songs playcount queried ?0
This forum uses Lukasz Tkacz MyBB addons.