presets:
  _music_video_base:

    preset:
      # ytdl-sub includes throttle prootection by default or all prebuilt presets.
      # Can be disabled with override variable `enable_throttle_protection: False`
      - "_throttle_protection"
      - "_url_categorized"

    output_options:
      output_directory: "{music_video_directory}"
      file_name: "{music_video_file_name}.{ext}"
      thumbnail_name: "{music_video_file_name}.jpg"
      info_json_name: "{music_video_file_name}.{info_json_ext}"
      maintain_download_archive: True

    ytdl_options:
      break_on_existing: True

    overrides:
#   MUST DEFINE:
#     music_video_directory

      # Defaults
      music_video_genre_default: "ytdl-sub"
      music_video_album_default: "Music Videos"

      # Subscription overrides
      subscription_indent_1: "{music_video_genre_default}"

      # Music Video Overrides
      music_video_artist: "{subscription_name}"
      music_video_genre: "{subscription_indent_1}"
      music_video_album: >-
        { %get_url_field("category", music_video_album_default) }
      music_video_title: >-
        { %get_url_field("title", title) }
      music_video_date: >-
        { 
          %elif(
            %contains_url_field("date"),
            %get_url_field("date", upload_date_standardized),
        
            %contains_url_field("year"),
            %concat( %get_url_field("date", upload_year), "-01-01"),
        
            upload_date_standardized
          )
        }
      music_video_year: >-
        {
          %int(%elif(
            %contains_url_field("date"),
            %slice( %get_url_field("date", upload_date_standardized), 0, 4 ),
        
            %contains_url_field("year"),
            %get_url_field("date", upload_year),
        
            upload_year
          ))
        }


      # Directory Overrides
      music_video_file_name_suffix: ""
      music_video_file_name: "{music_video_artist_sanitized}/{music_video_title_sanitized}{music_video_file_name_suffix}"
