-
released this
2023-10-04 01:08:14 +02:00 | 356 commits to master since this releaseWith 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_nameto the value oftv_show_name, we can use that in our newly migrated download archive name by setting this within thetv_showpreset (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 seeMIGRATION DETECTEDwithin the logs. Ensure it completes successfully.Perform another download invocation and ensure you see the
MIGRATION SUCCESSFULwithin 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+urlto 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"Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download
-
Source code (ZIP)