##############################################################################
#                        DE Content Rating Overlay                           #
#                 Created by Yozora, Bullmoose20, & Sohjiro                  #
#          EDITING THIS FILE MAY CAUSE PULLING NEW UPDATES TO FAIL           #
# https://metamanager.wiki/en/latest/defaults/overlays/content_rating_de.html#
##############################################################################

external_templates:
  pmm: templates
  template_variables:
    default:
      key: <<overlay_name>>
    horizontal_offset: 15
    horizontal_align: left
    vertical_offset: 270
    vertical_align: bottom
    back_width: 305
    back_height: 105
    back_radius: 30
    back_color: '#00000099'
    conditionals:
      inside_color:
        default: "c"
        conditions:
          - color: false
            value: ""
      pmm:
        conditions:
          - file.exists: false
            file_<<key>>.exists: false
            url.exists: false
            url_<<key>>.exists: false
            git.exists: false
            git_<<key>>.exists: false
            repo.exists: false
            repo_<<key>>.exists: false
            value: cr/de<<overlay_name>><<inside_color>>

templates:
  cr_de:
    ignore_blank_results: true
    plex_search:
      validate: false
      any:
        content_rating: <<rating>>

overlays:
  0:
    template:
      - name: standard
      - {name: cr_de, rating: "de/0, U, 0, 1, 01, 2, 02, 3, 03, 4, 04, 5, 05, G, TV-G, TV-Y, G - All Ages, gb/U, gb/0+, E, gb/E, A, no/A, no/5, no/05"}

  6:
    template:
      - name: standard
      - {name: cr_de, rating: "de/6, 6, gb/9+, TV-PG, TV-Y7, TV-Y7-FV, PG, 7, 07, 8, 08, 9, 09, 10, 11, PG - Children, no/6, no/06, no/7, no/07, no/9, no/09, no/10, no/11"}

  12:
    template:
      - name: standard
      - {name: cr_de, rating: "de/12, gb/12, 12, no/12, gb/15, gb/14+, TV-14, 13, 14, 15, PG-13 - Teens 13 or older, PG-13, no/15"}

  16:
    template:
      - name: standard
      - {name: cr_de, rating: "de/16, no/16, A-17, TVMA, TV-MA, R, 16, 17, M/PG"}

  18:
    template:
      - name: standard
      - {name: cr_de, rating: "de/18, gb/18, M, 18, R - 17+ (violence & profanity), no/18, R18, gb/R18, gb/X, X, NC-17, R+ - Mild Nudity, Rx - Hentai"}

  bpjm:
    template:
      - name: standard
      - {name: cr_de, rating: "de/BPjM Restricted, BPjM Restricted"}
  nr:
    template:
      - {name: standard, key: nr}
      - {name: cr_de, rating: "None, NR, Not Rated, Unrated, de/Unrated, de/Not Rated"}