Splitting files and making presets
This commit is contained in:
parent
1b2fe5c7ab
commit
bf4a27f868
9 changed files with 173 additions and 86 deletions
|
|
@ -1,34 +1,3 @@
|
||||||
presets:
|
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
|
|
||||||
|
|
@ -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
|
||||||
39
src/ytdl_sub/prebuilt_presets/helpers/media_quality.yaml
Normal file
39
src/ytdl_sub/prebuilt_presets/helpers/media_quality.yaml
Normal 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"
|
||||||
18
src/ytdl_sub/prebuilt_presets/helpers/premade_regex.yaml
Normal file
18
src/ytdl_sub/prebuilt_presets/helpers/premade_regex.yaml
Normal 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"
|
||||||
|
|
@ -1,5 +1,3 @@
|
||||||
|
|
||||||
|
|
||||||
presets:
|
presets:
|
||||||
|
|
||||||
##################################################################################
|
##################################################################################
|
||||||
|
|
|
||||||
|
|
@ -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"
|
||||||
|
|
@ -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}"
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
presets:
|
presets:
|
||||||
|
|
||||||
|
|
||||||
_music_base:
|
_music_base:
|
||||||
output_options:
|
output_options:
|
||||||
output_directory: "{music_directory}"
|
output_directory: "{music_directory}"
|
||||||
|
|
@ -71,36 +72,6 @@ presets:
|
||||||
include_sibling_metadata: False
|
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":
|
"SoundCloud Discography":
|
||||||
preset: "_music_base"
|
preset: "_music_base"
|
||||||
|
|
@ -139,25 +110,3 @@ presets:
|
||||||
track_total: "{sc_track_total}"
|
track_total: "{sc_track_total}"
|
||||||
track_year: "{sc_track_year}"
|
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}"
|
|
||||||
|
|
@ -1,2 +1,7 @@
|
||||||
Rename presets to "Name Here"
|
Rename presets to "Name Here"
|
||||||
Have new name for presets inheret the old ones
|
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
|
||||||
Loading…
Reference in a new issue