diff --git a/examples/advanced/music_video_config.yaml b/examples/advanced/music_video_config.yaml deleted file mode 100644 index 64a7d4a1..00000000 --- a/examples/advanced/music_video_config.yaml +++ /dev/null @@ -1,76 +0,0 @@ -############################################################################### -# Top-level configurations to apply umask and persist error logs -configuration: - umask: "002" - persist_logs: - logs_directory: './logs' - keep_successful_logs: False - -presets: - - ############################################################################### - # Try to capture music video metadata using regex - regex_capture_metadata: - regex: - from: - # Try to capture the artist and title of the track from the - # video title. Default to channel and video title. - title: - match: - - "(.*) - (.*) \\[O" # artist - song [Official ... - - "(.*) - (.*) \\(O" # artist - song (Official ... - - "(.*) - \"(.*)\" \\[O" # artist - "song" [Official ... - - "(.*) - \"(.*)\" \\(O" # artist - "song" (Official ... - - "(.*): (.*) \\[O" # artist: song [Official ... - - "(.*): (.*) \\(O" # artist: song (Official ... - - "(.*) - \"(.*)\".*" # artist - "song" - - "(.*) - '(.*)'.*" # artist - 'song' - - "(.*) - (.*).*" # artist - song - exclude: - - ".*[Aa][Uu][Dd][Ii][Oo].*" # Exclude audio vids - - ".*[Ll][Yy][Rr][Ii][Cc].*" # Exclude lyric vids - capture_group_names: - - "captured_artist" - - "captured_title" - capture_group_defaults: - - "{channel}" - - "{title}" - - # Try to capture the year the music video premiered. - # Default to upload year - description: - match: - - ".*(19\\d{2}).*" # first 19XX digit value as year - - ".*(20\\d{2}).*" # first 20XX digit value as year - capture_group_names: - - "captured_year" - capture_group_defaults: - - "{upload_year}" - - overrides: - music_video_directory: "/music_videos" - music_video_title: "{music_video_year} - {captured_title}" - music_video_artist: "{subscription_name}" - music_video_album: "Music Videos" - music_video_year: "{captured_year}" - music_video_file_name: "{music_video_artist_sanitized}/{music_video_title_sanitized}" - - ####################################################### - - regex_capture_artist: - overrides: - music_video_artist: "{captured_artist}" - - ####################################################### - - concert: - preset: "music_video" - - overrides: - music_video_album: "Concerts" - - ####################################################### - - year_as_upload_date: - overrides: - music_video_year: "{upload_year}" diff --git a/examples/advanced/tv_show_config.yaml b/examples/advanced/tv_show_config.yaml index f19a5283..1736d3f6 100644 --- a/examples/advanced/tv_show_config.yaml +++ b/examples/advanced/tv_show_config.yaml @@ -87,21 +87,11 @@ presets: ############################################################################### # Custom preset to only fetch and keep recent videos. # Format the videos in reverse order, so the first video is the most recent + # Also include the prebuilt "Only Recent" preset TV Show Only Recent: preset: - "base" - "sponsorblock" - "no_shorts" - "season_by_year__episode_by_month_day_reversed" - - # Only fetch videos after today minus date_range - date_range: - after: "today-{date_range}" - - # Only keep files uploaded after date_range - output_options: - keep_files_after: "today-{date_range}" - - # Set the default date_range to 2 months - overrides: - date_range: "2months" + - "Only Recent" diff --git a/src/ytdl_sub/prebuilt_presets/helpers/common.yaml b/src/ytdl_sub/prebuilt_presets/helpers/common.yaml index 0e00f73d..031b2964 100644 --- a/src/ytdl_sub/prebuilt_presets/helpers/common.yaml +++ b/src/ytdl_sub/prebuilt_presets/helpers/common.yaml @@ -17,4 +17,17 @@ presets: max_downloads: 20 playlistreverse: True break_on_existing: False - break_on_reject: True \ No newline at end of file + break_on_reject: True + + "Only Recent": + # Only fetch videos after today minus date_range + date_range: + after: "today-{date_range}" + + # Only keep files uploaded after date_range + output_options: + keep_files_after: "today-{date_range}" + + # Set the default date_range to 2 months + overrides: + date_range: "2months" \ No newline at end of file diff --git a/tests/resources/expected_downloads_summaries/plugins/date_range/test_channel_recent.json b/tests/resources/expected_downloads_summaries/plugins/date_range/test_channel_recent.json index a570473a..9c301b18 100644 --- a/tests/resources/expected_downloads_summaries/plugins/date_range/test_channel_recent.json +++ b/tests/resources/expected_downloads_summaries/plugins/date_range/test_channel_recent.json @@ -6,7 +6,7 @@ "Project ⧸ Zombie/Season 2018/s2018.e102901 - Jesse's Minecraft Server | Teaser Trailer.nfo": "ee5bee94667ed4f1d47af08384418d3c", "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id-thumb.jpg": "28d852ede73b879b9ebf9a061cfc7d46", "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.info.json": "INFO_JSON", - "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.mp4": "77aca1c8f8ef32c282a8a871d80bec10", + "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.mp4": "3725eaeaae4a400599070a56a1dccf9d", "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.nfo": "c2f06f9eb5b42c777808a35587e5941e", "Project ⧸ Zombie/fanart.jpg": "129c6639b47299bc48062f0365e670ee", "Project ⧸ Zombie/poster.jpg": "5de28eea5a921a041452ab3ce1041f73", diff --git a/tests/resources/expected_downloads_summaries/plugins/date_range/test_channel_rolling_recent.json b/tests/resources/expected_downloads_summaries/plugins/date_range/test_channel_rolling_recent.json index 9d743de4..ac3d9fdf 100644 --- a/tests/resources/expected_downloads_summaries/plugins/date_range/test_channel_rolling_recent.json +++ b/tests/resources/expected_downloads_summaries/plugins/date_range/test_channel_rolling_recent.json @@ -2,7 +2,7 @@ "Project ⧸ Zombie/.ytdl-sub-recent-download-archive.json": "46170edaf7cc51e5f59ef5d4c0476200", "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id-thumb.jpg": "28d852ede73b879b9ebf9a061cfc7d46", "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.info.json": "INFO_JSON", - "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.mp4": "77aca1c8f8ef32c282a8a871d80bec10", + "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.mp4": "3725eaeaae4a400599070a56a1dccf9d", "Project ⧸ Zombie/Season 2018/s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.nfo": "c2f06f9eb5b42c777808a35587e5941e", "Project ⧸ Zombie/fanart.jpg": "129c6639b47299bc48062f0365e670ee", "Project ⧸ Zombie/poster.jpg": "5de28eea5a921a041452ab3ce1041f73", diff --git a/tests/resources/transaction_log_summaries/plugins/date_range/test_channel_recent.txt b/tests/resources/transaction_log_summaries/plugins/date_range/test_channel_recent.txt index 4d2f7afd..496901d5 100644 --- a/tests/resources/transaction_log_summaries/plugins/date_range/test_channel_recent.txt +++ b/tests/resources/transaction_log_summaries/plugins/date_range/test_channel_recent.txt @@ -59,6 +59,7 @@ Files created: s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id-thumb.jpg s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.info.json s2018.e110201 - Jesse's Minecraft Server | IP mc.jesse.id.mp4 + Embedded subtitles with lang(s) en Video Tags: contentRating: TV-14 date: 2018-11-02