Bug Smart Playlist Doesn't Sort by Date Added
#1
I guess i have to resign myself and post a bug after i swore i was done because of a previous altercation where i wasn't believed. My wife wants to watch the Arrowverse and i need to set it up like i did with One Chicago:
  • Tag all the TV Shows that are part of the Arrowverse
  • Create a Smart Playlist to search for all Episodes that have that tag
  • Sort by Date Added Ascending

This worked fine on Kodi 19 but i just tried in Kodi 20.2 and it doesn't. Even the previously working One Chicago smart playlist does the same.

The one where one of the mods said it was working but i know it doesn't is the <dateadded>1</dateadded> in advancedsettins.xml. Yes it works for Movies but not for Episodes. It has been broken for quite some time but since i have a workaround, i didn't want to deal with the aggravating back and forth.

So my workaround is to run an SQL statement to manually update the dateAdded field:

SQL:
update myvideos121.files files
inner join myvideos121.episode episode on
    files.idFile = episode.idFile
set files.dateAdded = episode.c05;

What this does is set the date added of every episode to the air date/premiere date from the episode metadata.

The smart playlist is configured like so:

Image

But when i open the playlist, it is NOT sorted by date added:

Image

Image

If i run the following SQL, i can see what the order SHOULD be (no time to figure out how tags are stored so i explicitly look for the shows):

SQL:
select strFilename, dateAdded from myvideos121.files
where strFilename like 'Arrow%' or strFilename like 'The Flash%' or strFilename like 'Supergirl%' or strFilename like 'Black Lightning%' or strFilename like 'DC\'s Legends%' or strFilename like 'Constantine -%'
order by dateAdded;

Image

Hopefully you can see this is actually a bug and i am not trolling.

On another note, why is it that the smart playlist doesn't allow you to sort by Air date or Premiere date for episodes? Seems like that would be a pretty useful feature.

Same for Movies. It would be nice to sort by Release date. Would be extremely helpful for movie collections that have movies released in the same year where the sort title doesn't help.

Perfect example is for Stand-Up comics that release multiple shows in the same year. With a smart playlist that sorts on Release date, you can watch them in chronological order.

Right now, i add the date in ISO format in the sort title of Stand-Up comic movies. Like Jim Gaffigan 2023-11-07.
[4 Kodi Clients + 4 Norco RPC-4224 Media Servers w/376 TB HDD Space]
Reply
#2
I don't use tags but if I create a Smart Playlist looking for episodes where the Title contains a string instead (e.g. "Oak"), and ask it to order them by date added, they come out in exactly the same order as an equivalent SQL query.

SQL query used:
sql:
select strFilename, dateAdded from myvideos122.files
inner join myvideos122.episode episode on
    files.idFile = episode.idFile
WHERE c00 LIKE "%oak%" ORDER BY dateAdded

I notice when I open the playlist in Kodi and hit [Left] to bring up the side menu, it has automatically selected "Date Added" for the sort option - is yours doing this?

The other thing is I am using Kodi 21 - I would strongly recommend upgrading to Omega Beta1 (or at the very least install it to another directory somewhere and run it with the -p switch to have it as a completely standalone version for testing).  Make it a clean install, no non-essential addons, no copying addon_data or addons from your v20 install.  Make sure to upgrade the Aeon Nox Silvo skin to latest version from github too.  This would not interfere with your v20 install or your mySQL db (it would create a new myvideos122 db which you can just blow away if you scrap v21).
Reply
#3
(2023-11-09, 23:36)beeswax Wrote: I notice when I open the playlist in Kodi and hit [Left] to bring up the side menu, it has automatically selected "Date Added" for the sort option - is yours doing this?

Thanks for the hint! It lead me to a workaround.

At first, i took your suggestion of trying it in Omega. No dice. Same problem exists there.

But then i looked at the left menu and in the sort choices, there is one simply called Date. That one worked!

When creating the playlist, the sort choices DO NOT include Date. They only include Dated Added. This inconsistency can be confusing as you wouldn't expect the choices to be different.

Went back to Nexus and same thing applies. I am assuming that the nondescript Date choice is because it would be Air Date for Episodes and Premiered Date for Movies. Wonder if it is documented anywhere...

In any case, i still think this is a bug that it's not sorting on date added in a smart playlist files view. It should also let you pick Air Date for Episodes and Premiere Date for Movies (inside the playlist creation)

Thanks again for your insight.
[4 Kodi Clients + 4 Norco RPC-4224 Media Servers w/376 TB HDD Space]
Reply
#4
Glad you've got somewhere with it.  Your playlists aren't behaving the same as mine though, are you sure you're not using an old branch of the Nox Silvo skin or something?  Maybe old addon_data for one of it's associated addons or something?  If I open the playlist from the example above and access the left menu, it looks like this:

Image

I see no reason why yours should look any different or not have the 'Date added' option under sorting, unless your skin is messed up somehow.
Reply
#5
I think in general if you open a smart playlist in a video window, the view settings might (not certain on this) override the playlist setting.  Try playing the entire playlist and check the order in the videoplaylist (of course, with shuffle off).

scott s.
.
Reply

Logout Mark Read Team Forum Stats Members Help
Smart Playlist Doesn't Sort by Date Added0