Splitting files and making presets

This commit is contained in:
Qualis Svagtlys 2023-12-30 13:18:56 -06:00
parent 1b2fe5c7ab
commit bf4a27f868
9 changed files with 173 additions and 86 deletions

View file

@ -1,34 +1,3 @@
presets:
best_video_quality:
format: "bestvideo+bestaudio/best"
ytdl_options:
merge_output_format: "mp4"
max_1080p:
format: "(bv*[height<=1080]+bestaudio/best[height<=1080])"
ytdl_options:
merge_output_format: "mp4"
chunk_initial_download:
ytdl_options:
max_downloads: 20
playlistreverse: True
break_on_existing: False
break_on_reject: True
"Only Recent":
# Only fetch videos after today minus date_range
date_range:
after: "today-{only_recent_date_range}"
# Only keep files uploaded after date_range
output_options:
keep_files_after: "today-{only_recent_date_range}"
keep_max_files: "{only_recent_max_files}"
# Set the default date_range to 2 months
overrides:
date_range: "2months" # keep for legacy-reasons
only_recent_date_range: "{date_range}"
only_recent_max_files: 0

View file

@ -0,0 +1,52 @@
presets:
"Only Recent":
# Only fetch videos after today minus date_range
date_range:
after: "today-{only_recent_date_range}"
# Only keep files uploaded after date_range
output_options:
keep_files_after: "today-{only_recent_date_range}"
keep_max_files: "{only_recent_max_files}"
# Set the default date_range to 2 months
overrides:
date_range: "2months" # keep for legacy-reasons
only_recent_date_range: "{date_range}"
only_recent_max_files: 0
"Fetch Newest":
# Only fetch videos after today minus date_range
date_range:
after: "today-{only_recent_date_range}"
# Set the default date_range to 2 months
overrides:
date_range: "2months" # keep for legacy-reasons
only_recent_date_range: "{date_range}"
"Delete Oldest":
# Only keep files uploaded after date_range
output_options:
keep_files_after: "today-{only_recent_date_range}"
keep_max_files: "{only_recent_max_files}"
# Set the default date_range to 2 months
overrides:
date_range: "2months" # keep for legacy-reasons
only_recent_date_range: "{date_range}"
only_recent_max_files: 0
chunk_initial_download:
ytdl_options:
max_downloads: 20
playlistreverse: True
break_on_existing: False
break_on_reject: True
"Download in Chunks":
preset:
- chunk_initial_download

View file

@ -0,0 +1,39 @@
presets:
best_video_quality:
format: "bestvideo+bestaudio/best"
ytdl_options:
merge_output_format: "mp4"
max_1080p:
format: "(bv*[height<=1080]+bestaudio/best[height<=1080])"
ytdl_options:
merge_output_format: "mp4"
"Best AV Quality":
preset:
- best_video_quality
"Max 2160p":
format: "(bv*[height<=2160]+bestaudio/best[height<=2160])"
ytdl_options:
merge_output_format: "mp4"
"Max 1440p":
format: "(bv*[height<=1440]+bestaudio/best[height<=1440])"
ytdl_options:
merge_output_format: "mp4"
"Max 1080p":
preset:
- max_1080p
"Max 720p":
format: "(bv*[height<=720]+bestaudio/best[height<=720])"
ytdl_options:
merge_output_format: "mp4"
"Max 480p":
format: "(bv*[height<=480]+bestaudio/best[height<=480])"
ytdl_options:
merge_output_format: "mp4"

View file

@ -0,0 +1,18 @@
presets:
# Use with "YouTube Releases" to parse out each videos album and title and save accordingly
"YouTube Music Releases":
regex:
skip_if_match_fails: True
from:
title:
match: '^(?:(?:.+?)(?= - | \/{2} )(?: - | \/{2} ))*([^\[\{\(\|]*?)\s*(?=\{|\(|\||\[|$).*'
capture_group_names:
- "captured_track_title"
capture_group_defaults:
- "{title}"
description:
match: "^(?:Provided)(?:.*\\n){4}([^\\[\\{\\(\\|]*?)\\s*(?=\\{|\\(|\\||\\[|$|\\n).*"
capture_group_names: "captured_track_album"
capture_group_defaults: "Singles"

View file

@ -1,5 +1,3 @@
presets:
##################################################################################

View file

@ -0,0 +1,21 @@
presets:
# assumes that each chapter in an entry is a song
_albums_from_chapters:
preset: "Single"
chapters:
embed_chapters: True
split_by_chapters:
when_no_chapters: "pass"
overrides:
track_title: "{chapter_title}" # Chapter title is the track title
track_album: "{title}" # Video's title is the album title
track_number: "{chapter_index}"
track_number_padded: "{chapter_index_padded}"
track_total: "{chapter_count}"
"YouTube Full Albums":
preset:
- "_albums_from_chapters"

View file

@ -0,0 +1,36 @@
presets:
# assumes that each entry is a song in one album
_albums_from_playlists:
preset:
- "_music_base"
download:
- url: "{url}"
include_sibling_metadata: True
overrides:
track_album: "{playlist_title}"
track_number: "{playlist_index}"
track_number_padded: "{playlist_index_padded}"
track_total: "{playlist_count}"
track_year: "{playlist_max_upload_year}"
"YouTube Releases":
preset:
- "_albums_from_playlists"
"Bandcamp":
preset:
- "_albums_from_playlists"
regex:
from:
title:
match:
- ".*? - (.*)" # Captures 'Some - Song' from 'Emily Hopkins - Some - Song'
capture_group_names:
- "captured_track_title"
capture_group_defaults:
- "{title}"
overrides:
track_title: "{captured_track_title}"

View file

@ -1,5 +1,6 @@
presets:
_music_base:
output_options:
output_directory: "{music_directory}"
@ -71,36 +72,6 @@ presets:
include_sibling_metadata: False
_albums_from_playlists:
preset:
- "_music_base"
download:
- url: "{url}"
include_sibling_metadata: True
overrides:
track_album: "{playlist_title}"
track_number: "{playlist_index}"
track_number_padded: "{playlist_index_padded}"
track_total: "{playlist_count}"
track_year: "{playlist_max_upload_year}"
_albums_from_chapters:
preset: "Single"
chapters:
embed_chapters: True
split_by_chapters:
when_no_chapters: "pass"
overrides:
track_title: "{chapter_title}" # Chapter title is the track title
track_album: "{title}" # Video's title is the album title
track_number: "{chapter_index}"
track_number_padded: "{chapter_index_padded}"
track_total: "{chapter_count}"
"SoundCloud Discography":
preset: "_music_base"
@ -139,25 +110,3 @@ presets:
track_total: "{sc_track_total}"
track_year: "{sc_track_year}"
"YouTube Releases":
preset:
- "_albums_from_playlists"
"YouTube Full Albums":
preset:
- "_albums_from_chapters"
"Bandcamp":
preset:
- "_albums_from_playlists"
regex:
from:
title:
match:
- ".*? - (.*)" # Captures 'Some - Song' from 'Emily Hopkins - Some - Song'
capture_group_names:
- "captured_track_title"
capture_group_defaults:
- "{title}"
overrides:
track_title: "{captured_track_title}"

View file

@ -1,2 +1,7 @@
Rename presets to "Name Here"
Have new name for presets inheret the old ones
Each preset type, i.e. TV Show by Date should have one (which includes Kodi/Plex/Jellyfin), TV Show Collection separate, music ones separated
for helpers, Maybe grouped, like 'video quality' for those
bulk_initial_download probably needs its own page