jmbannon / ytdl-sub

Lightweight tool to automate downloading and metadata generation with yt-dlp
https://ytdl-sub.readthedocs.io
GNU General Public License v3.0
1.84k stars 71 forks source link

download_strategy validation error #584

Closed jmbannon closed 1 year ago

jmbannon commented 1 year ago
configuration:
  working_directory: '/tmp/ytdl-sub-downloads'
  dl_aliases:
    video: "--preset yt_video"
    video-url: "--download.url"
    # changed from video-type: "--overrides.video_type"
    tv-show-name: "--overrides.tv_show_name"

presets:
  yt_video:
    download:
      download_strategy: "url"

    output_options:
      # changed from "/config/first_config/output_videos"
      output_directory: "/media/{tv_show_name_sanitized}"
      # changed from "{video_path}.{ext}"
      file_name: "{episode_path}.{ext}"
      # changed from "{video_path}.{thumbnail_ext}"
      thumbnail_name: "{episode_path}-thumb.{thumbnail_ext}"

    nfo_tags:
      nfo_name: "{episode_path}.nfo"
      nfo_root: "episodedetails"
      tags:
        title: "{title}"
        season: "{season}"
        episode: "{episode}"
        year: "{upload_year}"
        aired: "{upload_date_standardized}"

    output_directory_nfo_tags:
      nfo_name: "tvshow.nfo"
      nfo_root: "tvshow"
      tags:
        title: "{tv_show_name}"

    overrides:
      tv_show_name: "OVERRIDE IN SUBSCRIPTION"
      season: "{upload_year}"
      episode: "{upload_month}{upload_day_padded}"
      episode_padded: "{upload_month_padded}{upload_day_padded}"
      episode_file_name: "s{season}e{episode_padded}.{title_sanitized}"
      episode_path: "Season {season}/{episode_file_name}"

  yt_playlist:
    preset: "yt_video"
    output_options:
      maintain_download_archive: True
    ytdl_options:
      break_on_existing: True

  yt_channel:
    preset: "yt_playlist"
    # added: downloads channel avatar and banner to the output directory
    download:
       playlist_thumbnails:
        - name: "poster.jpg"
          uid: "avatar_uncropped"
        - name: "banner.jpg"
          uid: "banner_uncropped"

  recent_videos:
    preset:
      - "yt_playlist"
    date_range:
      after: "now-6months"

returns

[ytdl-sub] Validation error in yt_channel.download: missing the required field 'download_strategy'
Ulysses-101 commented 9 months ago

I'm getting the same error, any help would be greatly appreciated.

Ulysses-101 commented 9 months ago

Actually it’s slightly different...

[ytdl-sub] Validation error in yt_playlist.download.1: 'yt_playlist.download.1' contains the field 'download_strategy' which is not allowed. Allowed fields: download_reverse, include_sibling_metadata, playlist_thumbnails, source_thumbnails, url, variables [ytdl-sub] Validation error in yt_video.download.1: 'yt_video.download.1' contains the field 'download_strategy' which is not allowed. Allowed fields: download_reverse, include_sibling_metadata, playlist_thumbnails, source_thumbnails, url, variables

jmbannon commented 9 months ago

@Ulysses-101 Delete the line with download_strategy in it, and you should be good!

jmbannon commented 9 months ago

For context, it was removed in https://github.com/jmbannon/ytdl-sub/pull/899

Ulysses-101 commented 9 months ago

I did try that but got this...

[ytdl-sub] Validation error in yt_video.download: should be of type collection url list.

Ulysses-101 commented 9 months ago

`configuration: working_directory: 'ytdl-sub-tmp'

presets: yt_video:

preset:

  # Choose one of the following player types:
  # - "kodi_tv_show_by_date"
  # - "jellyfin_tv_show_by_date"
  # - "plex_tv_show_by_date"

#- "jellyfin_tv_show_by_date"  # replace with desired player type

  # Choose one of the following season/episode formats:
  # - "season_by_year__episode_by_month_day"
  # - "season_by_year_month__episode_by_day"
  # - "season_by_year__episode_by_month_day_reversed"
  # - "season_by_year__episode_by_download_index"

#- "season_by_year__episode_by_month_day"  # replace with desired season/episode format

  # Include any of the presets listed below in your 'main preset' if you want
  # it applied to every TV show. Or, use them on the individual subscriptions.
  # - "only_recent_videos"
  # - "add_subtitles"
  # - "sponsorblock"
  # - "include_info_json"
download:
 # download_strategy: "url"

output_options:
 # output_directory: "/home/alice/exhdd/media/tvshows/{tv_show_name_sanitized}"
  output_directory: "../tvshows/{tv_show_name_sanitized}"
  file_name: "{episode_path}.{ext}"
  thumbnail_name: "{episode_path}.{thumbnail_ext}"

overrides:
  tv_show_name: "OVERRIDE IN SUBSCRIPTION"
  season: "{upload_year}"
  episode: "{upload_month}{upload_day_padded}"
  episode_padded: "{upload_month_padded}{upload_day_padded}"
  episode_file_name: "s{season}e{episode_padded}.{title_sanitized}"
  episode_path: "Season {season}/{episode_file_name}"

overrides:

video_name: "{upload_date_standardized}.{title_sanitized}"

video_type: "{channel}"

video_path: "{video_type_sanitized}/{video_name}"

season: "{upload_year}"

episode: "{upload_month}{upload_day_padded}"

1week_videos: date_range: after: "now-1week" output_options: keep_files_after: "now-1week"

1months_videos: date_range: after: "now-1month" output_options: keep_files_after: "now-1month"

3months_videos: date_range: after: "now-3months" output_options: keep_files_after: "now-3months"

6months_videos: date_range: after: "now-6months" output_options: keep_files_after: "now-6months"

12months_videos: date_range: after: "now-12months" output_options: keep_files_after: "now-12months"

24months_videos: date_range: after: "now-24months" output_options: keep_files_after: "now-24months"

48months_videos: date_range: after: "now-48months" output_options: keep_files_after: "now-48months"

60months_videos: date_range: after: "now-60months" output_options: keep_files_after: "now-60months"

yt_playlist: preset:

Ulysses-101 commented 9 months ago

Sorry can't seem to get the formatting right!

Ulysses-101 commented 9 months ago

Got it working after deleting the "download:" and "playlist_thumbnails" sections. Many thanks for your help, much appricated. BTW I love ytdl-sub, you've done an amazing job :-)

jmbannon commented 9 months ago

For the future, use triple-backticks for formatting (```)

both above and below the code block