#Sort Collection by Date (Descending)

1 messages · Page 1 of 1 (latest)

river burrow
#

I wanted to sort some of my TV collections by date but I want it so the newest shows are at the top instead of at the default which is oldest at the top.
In my yaml file I have the following:

  AppleTV+:
    tmdb_network: 2552
    collection_order: custom
    sort_by: release.desc```

This isnt working and I am getting the attached error in the log file. 
Another user, @last radish had this issue and was able to resolve it by changing the formatting of the code but I wasnt able to work out exactly what they did to fix it.

| Value: custom
robust ploverBOT
#

📝 If you want to review this again, tallinex:
:one: Right-click (or long press with phone) on the message that contains the log
:two: Select: Copy Message Link
:three: Use the command: /logscan <message_link> or !logscan <message_link> and paste the value copied from the previous step where you see <message_link> 📝

#

Welcome @river burrow!

Someone from <@&938443185347244033> will assist when they're available.

Including meta.log from the beginning is a huge help. Type !logs for more information.

After attaching your log, do not forget to hit the green check boxes when prompted by our bot.

#

You can press the "Close Post" button above or type /close at any time to close this post.

trim venture
#

As it says, sort_by is not supported in that context.

Also, even if it did work, these two are contradictory:

    collection_order: custom
    sort_by: release.desc

The first says "put this collection in the order in which tmdb_network provides it", while the second [attempts to] say "put this is descending order by release". Kometa can't do both.

#

Without looking at the docs, I would try:

collections:
  AppleTV+:
    tmdb_network: 2552
    collection_order: release.desc
robust ploverBOT
#

✅ YAML validation passed!! That is valid YAML, but may not meet Kometa's requirements

river burrow
#

Just tested and that worked. thank you @trim venture
I had assumed that the plex setting had to be changed to custom and then the order applied.

trim venture
#

Is there something in the docs that needs to be changed to make that more clear?

river burrow
#

I got that idea from this page:
https://kometa.wiki/en/latest/kometa/guides/order/?h=sort#collection-order
The part that says "When using Kometa builders, the majority of builders will require collection_order: custom to be set".
and the example code shows:

  Top Action Movies:
    collection_order: custom
    plex_search:
      all:
        genre: Action
      sort_by: audience_rating.desc
      limit: 50```
> So I just assumed I had to add the collection_order
trim venture
#

Yeah, there are examples there but I suppose there isn't a specific "don't use these at the same level" statement

#

It's sort of a tricky thing to express in a succinct way that won't make people ignore the wall of text

river burrow
#

Yup, I think its fine and at least if anyone has an the issue in the future hopefully they will find this

frail oracleBOT
#

antwanchild used !afnh

@river burrow, anything further needed here? If not, please type /close and hit enter. Please respond within 24 hours of this message or it will be archived.