Kodi Community Forum

Full Version: Songs -- sort by "Last Played" is actually "By Track"?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hopefully I am missing something obvious BUT it seems using 'last played' in a song smart playlist is not working quite right. Here is what I see:

Note: Kodi 16.1

1. Looking at MySQL I see the last played column in the song table. Seems to have the right dates/times in it based on recent songs played.
2. I have a smart list: Find items is 'last played in the last 1 day'; Order by is 'last played'

It seems like the actual search (Fond) gets the right songs BUT they are displayed in 'track title' order -- although both the smart playlist and the side menu have it listed as 'by last played (descending).

I changed the span to 1 day and this is definitely the behavior. Tried multiple skins -- same issue.

Any ideas?
OK, I have checked this out on my current Krypton build and it works correctly.

Under the RERO policy Jarvis is now frozen and there will be no further bug fixes or releases after 16.1, hence it does what it does. But on a quick check I confirm that sorting song playlists by lastplayed is broken in 16.1

Edit: Not liking mystery fixes I will do some more checking and see if I can understand what was happening and how it was inadvertently fixed for 17.

One thing worth noting is that unplayed songs have a lastplayed = null, and unless the playlist has a rule to exclude unplayed songs or a limit on how many to return they will be included and sorted by track and title, which may look odd.
So what changed?

In 16 we accidentally set the content of music smart playlists to "files" which results in the wrong GUI view state being loaded, and so sort by lastplayed is unavailable. Hence a default sort of track and title is used.

For 17 this is fixed by PR8945 that merged in Jan but was not backported to Jarvis. It fixed a related problem reported on 16 beta4, so a fix could easily have been included for 16.1 but wasn't.
Thanks a bunch @DaveBlake, Great to see its already fixed in the next release. Also, I noticed the NULLs also and will adjust my platlist when I have a few moments -- would that simply be 'empty' in the exclude?
Personally I would add a rule based on playcount > 0 to exclude those that I have not played at all. I would also possibly apply a limit, if you have a large collection it makes things faster.
Yeah, I already had a limit but I'll add the playcount item ... good idea!
(2016-05-29, 07:43)DaveBlake Wrote: [ -> ]Personally I would add a rule based on playcount > 0 to exclude those that I have not played at all. I would also possibly apply a limit, if you have a large collection it makes things faster.

Brilliant idea! Never thought of that to be honest.