The only required field in a config was `working_directory`. This is now optional (defaults to `.ytdl-sub-working-directory`) making it so a config is no longer required. This sets the stage to onboard noob users who will solely use prebuilt presets in a single subscription file
A follow-up to the prior commit which fixes some bugs in the 'beautiful subscriptions' implementation. A proper migration guide will be written in the wiki once it's ready
With the recent push to 'beautify subscriptions' (see https://github.com/jmbannon/ytdl-sub/releases/tag/2023.10.02), we need the ability to change subscription names from their legacy form:
```
rick_a:
preset:
- "tv_show"
overrides:
tv_show_name: "Rick A"
url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
```
into:
```
tv_show:
"Rick A": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
```
This however has implications from ytdl-sub's legacy download archive naming. By default, we write archives to `.ytdl-sub-{subscription_name}-download-archive.json`. If we change the subscription name, the archive will not be found, causing a complete redownload. This new feature gives us the ability to migrate download archives to a new naming schema.
# Migrating to Beautified Subscriptions
## Step 0
BACK UP ALL CONFIG + SUBSCRIPTION FILES!!!!! If something goes wrong, restore your backup and try again and/or ask for help.
## Step 1
Since we know we'll be changing our `subscripion_name` to the value of `tv_show_name`, we can use that in our newly migrated download archive name by setting this within the `tv_show` preset (or whatever your 'base' preset is).
```
presets:
tv_show:
output_options:
migrated_download_archive_name: ".{tv_show_name_sanitized}-download-archive.json"
```
## Step 2
Perform a download as usual, via `ytdl-sub sub ...`. This will load the old archive, and save it into the new archive. You should see `MIGRATION DETECTED` within the logs. Ensure it completes successfully.
Perform another download invocation and ensure you see the `MIGRATION SUCCESSFUL` within the logs.
## Step 3
Now we can set:
```
presets:
tv_show:
output_options:
# rename migrated_download_archive_name to just download_archive_name
download_archive_name: ".{tv_show_name_sanitized}-download-archive.json"
overrides:
tv_show_name: "{subscription_name}"
url: "{subscription_value}"
```
Our download archives now default to our new format, and we set `tv_show_name` + `url` to use subscription values by default.
## Step 4
We can now beautify our subscription.yaml file to:
```
tv_show:
"Rick A": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
```
Fixes yet another bug that is match-filter related. The `date_range.before` value would get ignored if you specified any other match-filters. That is fixed by making them `&` behind-the-scenes.
Closes Feature Request: https://github.com/jmbannon/ytdl-sub/issues/743
Subscriptions support using presets as keys, and using keys to set override variables as values.
For example:
```
tv_show:
only_recent:
[News]:
"Breaking News": "https://www.youtube.com/@SomeBreakingNews"
[Tech]:
"Two Minute Papers": "https://www.youtube.com/@TwoMinutePapers"
```
Will create two subscriptions named "Breaking News" and "Two Minute Papers", equivalent to:
```
"Breaking News":
preset:
- "tv_show"
- "only_recent"
overrides:
subscription_indent_1: "News"
subscription_name: "Breaking News"
subscription_value: "https://www.youtube.com/@SomeBreakingNews"
"Two Minute Papers":
preset:
- "tv_show"
overrides:
subscription_indent_1: "Tech"
subscription_name: "Two Minute Papers" subscription_value: "https://www.youtube.com/@TwoMinutePapers"
```
You can provide as many parent presets in the form of keys, and subscription indents as ``[keys]``.
This can drastically simplify subscription definitions by setting things you want configurable like so in your
parent preset:
```
presets:
tv_show_name:
overrides:
tv_show_name: "{subscription_name}"
url: "{subscription_value}"
genre: "{subscription_indent_1}"
```
NOTE!!!
Changing your subscription name from 'legacy' subscriptions will need their download archive file migrated to a new name. A future update will assist in this migration process. Either wait until then or, if you consider yourself a ytdl-sub expert, keep a backup of your subscription file before migrating.
`Subscription Value` is the mechanism used to achieve one-liner subscriptions. It works by having the subscription `"Subscription Name": "value"`, and assigning `"value"` to an override variable via setting the subscription value to that override variable's name.
This feature allows you to set subscription value within the config. In the near future, ytdl-sub will strive to make subscription files simpler by hiding most of the "under-the-hood" logic within the config file.
Closes Issue: https://github.com/jmbannon/ytdl-sub/issues/729
Add a new field to the match_filter plugin: `download_match_filters`. This set of filters will be applied at the download stage (as opposed to `filters` which get applied at the metadata stage). By default, always set `"!is_live & !is_upcoming & !post_live"` as a download filter. This prevents ytdl-sub from hanging when trying to grab live and upcoming videos.
Docs on match-filters: https://ytdl-sub.readthedocs.io/en/latest/config.html#match-filters
Adding a default match-filter broke other people's match-filters. This is because each match-filter acts as an OR. I.e.
```
match_filters:
filters:
- "!is_live & !is_upcoming & !post_live" # the one I added
- "original_url!*=/shorts/ & !is_live"
```
Would not filter shorts, because under the hood, yt-dlp evaluates it as `(!is_live & !is_upcoming & !post_live) | (original_url!*=/shorts/ & !is_live)`
Need to rethink how to filter live videos by default 🤔
Follow-up to filtering out live videos. YouTube channels with an upcoming video that hasn't premiered yet would also hang ytdl-sub. Perform a match-filter to skip those as well.
More info on match-filters here: https://ytdl-sub.readthedocs.io/en/latest/config.html#match-filters
Any YouTube channel with an active livestream would make ytdl-sub hang until it completed. This adds a match-filter to skip live videos by default for all prebuild TV show presets.
More info on match-filters here: https://ytdl-sub.readthedocs.io/en/latest/config.html#match-filters
Bugfix to the prior release. Convert yt-dlp date formats (i.e. `today-2months`) into a date string with format `YYYYMMDD`. This will make it compatible with match-filter syntax
Makes setting yt-dlp's `format` field easier by giving it its own documented plugin.
Old:
```
my_format_preset:
ytdl_options:
format: "best"
```
New:
```
my_format_preset:
format: "best"
```
The old method will still work, so do not worry about updating configs ASAP. However, the option is available to save a few lines 😉
* Fix Plex MP4
No WebM, Best quality, No AV1 either
* Fixed because I am idiot
Forcing Plex to download only MP4 and 1080P. More efficient then downloading Webm and converting. Plex does not direct Play AV1 currently anyway.
* Plex Update
Default will get best video in H265 or H264, if neither are available, it will get next best video. All MP4, no limit on resolution.
Plex_tv_show_av1 will allow for absolute best possible resolution in any codec as long as its MP4, including Av1 which is not currently supported in Plex.
Without AV1 is considered default, for maximum compatibility at this time.
* EBUATK
Incorrect setting on Av1, fixed.
* Removed Av1 Preset
* adding common 1080p MAX preset
max_1080_video_quality:
* removed remux video
Removed remux video
Shortened preset name.
* Update presets.rst
Update presets.rst documentation to reflect the "max_1080P" preset
* remove remux_video
* Title Change for Clarity
* Update presets.rst
---------
Co-authored-by: catduckgnaf <128985786+cellardoor452@users.noreply.github.com>
* [BUGFIX] Do not fail with thumbnail issues
* helper
* refactor
* dry-run
* regen fixture
* download arhcive txt -> json in docs, fixtures
* return if no download thumb path
* better test
* more test coverage