Use case: using a Kodi instance in a headless microserver, as a music server - controlled via Yatse and via web UI.
Huge collection, that is explored using Yatse’s “Discover” music view, Random music view, and simple album filters: “show only unplayed albums (i.e. ‘Hide Played’)” and “order albums by playcount”
Currently, Yatse is able to detect when new music was added to kodi and will start a background sync. With the sync, Yatse will update the ‘playcount’ for each album and song. This works fine, the challenge is: if there are no new additions to the library in a while, Yatse’s view of album playcounts drift away from reality and the Filters keep showing already-played albums, which needs very frequent manual re-syncs of the entire library in my case, and this takes a while for a large collection.
When Yatse is used to trigger Kodi’s playback of a song/album, Kodi will update the playcounts as appropriate in real time, but Yatse’s playcount counters stay stuck in the values pulled in the last synchronization.
The Web-UI of course doesn’t have this problem because it’s content is pulled straight from the Kodi instance, but it’s not as nice as Yatse to browse around, and it is much slower.
Proposal: as a mitigation to this problem for people that mostly trigger playback with Yatse, could Yatse update the Song and Album playcounts locally whenever a song finishes?
Say for example: when Yatse knows that remote playback of a song went above the 90% completion threshold and then in the next poll Yatse detects that the song changed, at that point Yatse could increase the playcount of the previously played song, in its local database.
This solution won’t be perfect as Yatse won’t know about songs played using other UIs however it will be much better than the current situation, and hopefully take very little effort.
This would be specially useful when using Yatse’s “Hide Played” quick filter, which would be great as it will produce results much closer to reality.
Of course, eventually upon the next library resync, all the playcounts in Yatse will get overwritten/updated with whatever values Kodi provides, as expected.
Thanks!