#############################################################
#                 Dynamic Year Collections                  #
#         Created by Yozora, Bullmoose20, & Sohjiro         #
#############################################################
#  Call this from your config.yml (Movie or Show)           #
#  If nothing is specified these are the defaults           #
#                                                           #
#    metadata_path:                                         #
#      - git: PMM/year                                      #
#        template_variables:                                #
#          # Turn the separator collection on/off           #
#          use_separator: true                              #
#          # Turn the other collection on/off               #
#          use_other: true                                  #
#          # Sets how the collection is sorted              #
#          sort_by: critic_rating.desc                      #
#          # Sets the collection mode of the collection     #
#          collection_mode:                                 #
#          # Sets the value at the start of the sort title  #
#          collection_section: 13                           #
#          # Sets the number of items per collection        #
#          limit: 10                                        #
#############################################################

external_templates:
  git: PMM/templates
  template_variables:
    collection_section: 13

templates:
  year_dynamic:
    default:
      limit: 10
      sort_by: critic_rating.desc
    url_poster: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Images/master/year/best/<<key>>.jpg
    smart_filter:
      sort_by: <<sort_by>>
      any:
        year: <<key>>
      limit: <<limit>>

collections:
  Year Collections:
    template:
      - name: separator
        separator: year

dynamic_collections:
  Year:
    type: number
    title_format: Best of <<key_name>>
    data:
      starting: current_year-10
      ending: current_year
    template:
      - year_dynamic
      - shared
