presets:

##################################################################################
# Multi urls in the form of
#
#   "Subscription Name":
#     - "url"
#     - "url2"
# or
#
#   "Subscription Name": "url"
#
# where the first url tries to grab channel avatar + banner
#
  _multi_url:
    download:
      - url: "{ %array_at(urls, 0) }"
        playlist_thumbnails:
          - name: "{avatar_uncropped_thumbnail_file_name}"
            uid: "avatar_uncropped"
          - name: "{banner_uncropped_thumbnail_file_name}"
            uid: "banner_uncropped"
        source_thumbnails:
          - name: "{avatar_uncropped_thumbnail_file_name}"
            uid: "avatar_uncropped"
          - name: "{banner_uncropped_thumbnail_file_name}"
            uid: "banner_uncropped"
        include_sibling_metadata: "{include_sibling_metadata}"
        webpage_url: "{modified_webpage_url}"

      - url: "{ %array_slice(urls, 1) }"
        include_sibling_metadata: "{include_sibling_metadata}"
        webpage_url: "{modified_webpage_url}"
    overrides:
      avatar_uncropped_thumbnail_file_name: ""
      banner_uncropped_thumbnail_file_name: ""
      include_sibling_metadata: False
      modified_webpage_url: "{webpage_url}"

      subscription_array: >-
        {
          [
            url, url2, url3, url4, url5, url6, url7, url8, url9, url10,
            url11, url12, url13, url14, url15, url16, url17, url18, url19, url20,
            url21, url22, url23, url24, url25, url26, url27, url28, url29, url30,
            url31, url32, url33, url34, url35, url36, url37, url38, url39, url40,
            url41, url42, url43, url44, url45, url46, url47, url48, url49, url50,
            url51, url52, url53, url54, url55, url56, url57, url58, url59, url60,
            url61, url62, url63, url64, url65, url66, url67, url68, url69, url70,
            url71, url72, url73, url74, url75, url76, url77, url78, url79, url80,
            url81, url82, url83, url84, url85, url86, url87, url88, url89, url90,
            url91, url92, url93, url94, url95, url96, url97, url98, url99, url100
          ]
        }
      urls: "{subscription_array}"

      subscription_value: ""
      url: "{subscription_value}"
      url2: ""
      url3: ""
      url4: ""
      url5: ""
      url6: ""
      url7: ""
      url8: ""
      url9: ""
      url10: ""
      url11: ""
      url12: ""
      url13: ""
      url14: ""
      url15: ""
      url16: ""
      url17: ""
      url18: ""
      url19: ""
      url20: ""
      url21: ""
      url22: ""
      url23: ""
      url24: ""
      url25: ""
      url26: ""
      url27: ""
      url28: ""
      url29: ""
      url30: ""
      url31: ""
      url32: ""
      url33: ""
      url34: ""
      url35: ""
      url36: ""
      url37: ""
      url38: ""
      url39: ""
      url40: ""
      url41: ""
      url42: ""
      url43: ""
      url44: ""
      url45: ""
      url46: ""
      url47: ""
      url48: ""
      url49: ""
      url50: ""
      url51: ""
      url52: ""
      url53: ""
      url54: ""
      url55: ""
      url56: ""
      url57: ""
      url58: ""
      url59: ""
      url60: ""
      url61: ""
      url62: ""
      url63: ""
      url64: ""
      url65: ""
      url66: ""
      url67: ""
      url68: ""
      url69: ""
      url70: ""
      url71: ""
      url72: ""
      url73: ""
      url74: ""
      url75: ""
      url76: ""
      url77: ""
      url78: ""
      url79: ""
      url80: ""
      url81: ""
      url82: ""
      url83: ""
      url84: ""
      url85: ""
      url86: ""
      url87: ""
      url88: ""
      url89: ""
      url90: ""
      url91: ""
      url92: ""
      url93: ""
      url94: ""
      url95: ""
      url96: ""
      url97: ""
      url98: ""
      url99: ""
      url100: ""


  # multi-url with bilateral scraping built into it via
  # inspection of the URL and conditionally adding another
  # ytdl-sub url download with the scraping and download reversed
  _multi_url_bilateral_inner:
    preset:
      - "_url_bilateral_overrides"

    download:
      - url: "{ %array_apply(urls, %bilateral_url) }"
        download_reverse: False
        ytdl_options:
          playlist_items: "-1:0:-1"
        webpage_url: "{modified_webpage_url}"

  _multi_url_bilateral:
    preset:
      - "_multi_url_bilateral_inner"
      - "_multi_url"