external_templates:
  - repo: templates/collections
  - repo: templates/dynamic_collections

templates:
  # TODO: Figure out year delay for awards (2023 awards given in 2024, so when collection runs in 2024, it needs to look up 2023)
  # This is not true for all awards (some are given in the same year)

  # Dynamic Collections Templates
  # -----------------------------

  # Per-year award winners and nominees
  Yearly_Emmy_Winners:
    allowed_library_types: show
    summary: <<key>> Emmy Winners
    sort_title: 050_Emmy_<<key>>_Winner
    imdb_award:
      event_id: ev0000206
      event_year: <<key>>
      winning: true
      # Categories change too much year-to-year to attempt to filter
    url_poster: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Images/master/award/emmys/winner/<<key>>.jpg
    schedule: monthly(14)

  Yearly_Emmy_Nominees:
    allowed_library_types: show
    summary: <<key>> Emmy Nominees
    sort_title: 050_Emmy_<<key>>_Nominee
    imdb_award:
      event_id: ev0000206
      event_year: <<key>>
      winning: false
      # Categories change too much year-to-year to attempt to filter
    url_poster: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Images/master/award/emmys/nominee/<<key>>.jpg
    schedule: monthly(14)

  Yearly_Golden_Globes_Winners:
    default:
      imdb_sort: moviemeter,asc
    allowed_library_types: show
    summary: <<key>> Golden Globe Winners
    sort_title: 050_Golden_Globes_Winners_<<key>>
    imdb_award:
      event_id: ev0000292
      event_year: <<key>>
      winning: true
      # Categories change too much year-to-year to attempt to filter
    url_poster: https://raw.githubusercontent.com/meisnate12/Plex-Meta-Manager-Images/master/award/golden/<<key>>.jpg
    schedule: monthly(09)

    # TODO: Golden Globe Nominees?

# collections:

  # TODO: This year's Emmy nominees

  # TODO: This year's Golden Globe nominees

dynamic_collections:
  ## Use DC as suffix to avoid name conflicts with static collections
  Yearly Emmy Winners DC: # mapping name does not matter just needs to be unique
    type: number
    sync: true
    data:
      starting: 1974
      ending: current_year
    title_format: Emmy Winners <<key_name>>
    template:
      - Yearly_Emmy_Winners

  Yearly Golden Globes Shows DC: # mapping name does not matter just needs to be unique
    type: number
    sync: true
    data:
      starting: 1943
      ending: current_year
    title_format: Golden Globes Winners <<key_name>>
    template:
      - Yearly_Golden_Globes_Winners
