#Delete Collection with empty list

1 messages Β· Page 1 of 1 (latest)

somber igloo
#

I'm wondering if there is a way to delete a collection when the trakt list that created the collection becomes empty. I have 4 test collections with various settings changed and none of them seem to get past the trakt builder validating the list, so maybe this is a PMM limitation?

hearty knotBOT
#

Welcome @somber igloo!

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

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

#

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

somber igloo
hearty knotBOT
#

πŸ“ If you want to review this again, penguintwok:
: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> πŸ“

static tulip
#

The problem is that the list isn't "empty"

#

it just doesn't exist

somber igloo
#

It's private

static tulip
#

does trakt_list work with private lists?

#

the wiki doesn't suggest it does

somber igloo
#

The collections were made with that list: added one movie to the list, ran PMM and created all 4 collections, removed the movie from the list, reran PMM and it's erroring

hearty knotBOT
#

πŸ“ If you want to review this again, penguintwok:
: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> πŸ“

static tulip
#

Just to ask the question - why do you have empty lists πŸ˜„

#

I think the answer to your question is "no" since it doesn't work

#

[ERROR] | Trakt Error: List https://trakt.tv/users/Kevin2kkelly/lists/in-history-Movies is empty

#

it's showing as an error, so "no" is the answer πŸ˜„

#

it's not a valid list if it's empty

somber igloo
#

It's a collection that updates daily, it gathers all the movies from my library and finds release dates matching today then filters for increments of 5 years. Most days it will find movies but every once in a while there are no movies released on that day with an increment of 5 year anniversary. So on that day the collection remains with the prior days movies.

static tulip
#

oh okay, that's cool

#

so

#

as a workaround

#

you could make it delete the collections each day before recreating them?

#
collections:
  Clear Collections:
    build_collection: false
    smart_filter:    # dummy builder, won't do anything
      all:
        release: 1
    delete_collections_named:
      - Empty 1
      - Empty 2
      - Empty 3
      - Empty 4

  Empty 1:
    trakt_list: https://trakt.tv/users/Kevin2kkelly/lists/in-history-Movies


  Empty 2:
    trakt_list: https://trakt.tv/users/Kevin2kkelly/lists/in-history-Movies
    ignore_blank_results: true

  Empty 3:
    trakt_list: https://trakt.tv/users/Kevin2kkelly/lists/in-history-Movies
    ignore_blank_results: true
    validate_builders: false

  Empty 4:
    trakt_list: https://trakt.tv/users/Kevin2kkelly/lists/in-history-Movies
    ignore_blank_results: true
    validate_builders: false
    minimum_items: 1
    delete_below_minimum: true
#

Every day it will delete the collections, then recreate them (which will error if the list is empty, so it won't create them)

somber igloo
#

Yeah that should work then, thanks! Let me go give that a try.

somber igloo
#

Awesome, that worked perfectly. I had to add another collection to clear daily in order to get the correct ordering on the home screen but that's not a big deal. Thanks for the suggestion @static tulip