Ytdl-sub

Latest version: v2024.6.6

Safety actively analyzes 638437 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 15 of 38

2023.10.18

[BACKEND] `season_directory_name` variable for TV show presets (762)

2023.10.17

[FEATURE] Beautiful subscriptions migration support (758)

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, set download_archive_name to
reflect the newly migrated 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"


Step 5 (optional)
If your subscription uses multiple urls in the form of `overrides`, or has any extras besides a simple name: url mapping, you can do:

tv_show:
"Rick A": regular preset syntax works under subscription name
overrides:
url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
url2: "https://www.youtube.com/channel/FSDFsdfasdf23fasdfsadJsal"

Or if you use the `download` section explicitly:

music_discography:
"Rick A":
download:
- "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
- "https://www.youtube.com/channel/FSDFsdfasdf23fasdfsadJsal"

2023.10.03.post2

Use the next release - this one has bugs!

2023.10.03

[BUGFIX] Fix match-filter edge case and date_range.before (750)

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.

2023.10.02

[FEATURE] Subscription nesting (747)

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.

2023.09.28

[FEATURE] Ability to add subscription value via config (744)

`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.

Page 15 of 38

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.