#Only create collections at managed user level if criteria is met

1 messages · Page 1 of 1 (latest)

lethal violet
#

Hi. I use the below config to create multiple collections of unplayed movies by genre - and this works just great. Each managed user gets a collection containing only those movies they personally have not played. The challenge is when a user has no movies in a particular genre - either they have watched them all or they do not have access to those movies anyway. Because the creation of the collections is at the admin level, users can find they have collections with no content. I've been through the Wiki numerous times, but have been unable to find a solution. Is this possible and I have missed something or is this a limitation of Plex?

templates:
  unplayed:
    smart_filter:
      sort_by: release.desc
      all:
        genre: <<value>>
        plays.lt: 1
    collection_filtering: user
    minimum_items: 1
    sort_title: "!101_<<collection_name>>"
    content_rating: PG
    summary: <<summary>>
dynamic_collections:
  Genres:
    type: genre
    title_format: <<key_name>>
    key_name_override:
      Alien: Aliens
    template: unplayed
    template_variables:
      exclude:
        - Artificial Intelligence
        - Boxing
      summary:
        Action: >-
          "Put... the bunny... back... in the box."
                    - Cameron Poe: Con Air (1997)
        Adventure: >-
          "To live would be an awfully big adventure."
                    - Peter Pan: Hook (1991)
        Alien: >-
          "Get away from her, you b***h!"
                    - Ripley: Aliens (1986)
amber hareBOT
#

Welcome @lethal violet!

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.

exotic lark
#

The collection is a smart collection and runs when they open the collection.

nocturne pagoda
#

Each managed user gets a collection

This is an incorrect assumption. There is one collection, not one for each user. This:

    collection_filtering: user

makes Plex evaluate the filter as the user who is currently viewing the collection, rather than as the admin who created it.

The collection does not "contain" anything; it's a filter that is applied by the client at the moment the collection is viewed.

This single smart collection cannot be hidden for an individual user dynamically.

lethal violet
#

Understood. Thanks