From f5037c089144b34b15a15e5e49fd9bdfe5918d6f Mon Sep 17 00:00:00 2001 From: Jesse Bannon Date: Sat, 6 Jan 2024 23:29:10 -0800 Subject: [PATCH] generic --- .../music_videos/music_video_extras.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ytdl_sub/prebuilt_presets/music_videos/music_video_extras.yaml b/src/ytdl_sub/prebuilt_presets/music_videos/music_video_extras.yaml index 3f6e5d0f..252ae027 100644 --- a/src/ytdl_sub/prebuilt_presets/music_videos/music_video_extras.yaml +++ b/src/ytdl_sub/prebuilt_presets/music_videos/music_video_extras.yaml @@ -25,14 +25,22 @@ presets: overrides: + # Splits metadata values from (TODO: allow any whitespace between | ) + # Key: + # - metadata_0 | url + # - metadata_0 | metadata_1 | url "%get_value_split": >- { %split($0, " | ") } + + # Gets the size of the metadata split "%get_value_size": >- { %array_size( %get_value_split($0) ) } + # Gets the URL from the metadata, will always be the last one "%get_value_url": >- { %array_at( %get_value_split($0), -1 ) } + # gets metadata_i if present, otherwise returns null "%get_value_metadata_i": >- { %if( @@ -42,6 +50,7 @@ presets: ) } + # For each value under a key, build this map allowing up to 5 metadata values "%get_value_metadata_map": >- { { @@ -55,9 +64,11 @@ presets: } } + # TODO: Have this support single-string values "%get_value_metadata_map_outer": >- { %array_apply_fixed( $1, $0, %get_value_metadata_map ) } + # Build an array of metadata maps from every key in the subscription_map subscription_list_of_maps: >- { %array_flatten(