Commit graph

112 commits

Author SHA1 Message Date
Jesse Bannon
017db953bf
[FEATURE] Automatically handle playlists ordered in reverse (#948)
Playlists have always been a pain-point with ytdl-sub. If an author adds new videos to the end of a playlist, as opposed to the front, it breaks ytdl-sub's intuition of incremental scraping by breaking on the first (oldest) video. This update now makes it possible to handle this in the prebuilt TV Show presets:
- Add each URL variable (`url`, `url2`, ...) into the `download` portion of the subscription twice
- First definition is what we all know and use, simply scrapes first-to-last, then downloads last-to-first
- Second definition does the following:
  - Check to see if a URL is a YouTube playlist URL, if so...
    - Set the field to download, but with modifications to scrape last-to-first, then download first-to-last
  - Otherwise...
    - Set the field to an empty string, which means ytdl-sub will skip it
2024-04-01 04:24:41 -07:00
Jesse Bannon
083db0d9dc
[FEATURE] Simplify TV Show Collection Preset (#953)
Simplifies TV Show Collection presets, drastically. Old version:
```
  rick_a_tv_show_collection:
    preset:
      - "jellyfin_tv_show_collection"
      - "season_by_collection__episode_by_year_month_day_reversed"
      - "collection_season_1"
      - "collection_season_2"
    overrides:
      tv_show_name: "Rick A"
      collection_season_1_url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
      collection_season_1_name: "All Videos"
      collection_season_2_url: "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc"
      collection_season_2_name: "Official Music Videos"
```

New version:
```
  Jellyfin TV Show Collection:
    "~Rick A":
      s01_name: "All Videos"
      s01_url: "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
      s02_name: "Official Music Videos"
      s02_url: "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc"
```
2024-03-30 22:04:45 -07:00
Jesse Bannon
0beeeb464d
[FEATURE] Music tag dates (#938)
Adds proper support for setting `date` and `original_date` fields via `music_tag` plugin using a standardized date format.
2024-02-28 13:48:42 -08:00
Jesse Bannon
8e6a2cb98e
[DOCS] Rewrite first subscription documentation (#932) 2024-02-20 21:04:13 -08:00
Jesse Bannon
248e9a15a6
[DOCS] Various doc cleanups (#928) 2024-02-17 08:53:06 -08:00
Jesse Bannon
cea21ca47f
[DOCS] Add more configuration docs (#916) 2024-02-02 22:52:17 -08:00
Jesse Bannon
b3374cb4d5
[DEV] %map_extend scripting function (#906)
* [DEV] `%map_extend` scripting function

* lint
2024-01-19 00:51:44 -08:00
Jesse Bannon
213580ee84
[DEV] Add type-check functions (#905) 2024-01-18 23:24:10 -08:00
Jesse Bannon
f0b3991e3e
[FEATURE] Toggle date_range to break or not (#904)
Adds a the new field `breaking` to the `date_range` plugin, to toggle whether an entry breaks subsequent metadata pulls. This is useful to disable if you are grabbing a playlist that may have videos out of order, but still want to apply a date range to it.
2024-01-18 16:23:02 -08:00
Jesse Bannon
c0ca3c3945
[BACKEND] Remove old format for video_tags, music_tags, download_strategy (#899)
Now that sufficient time has passed, we can formally deprecate the following:
- https://ytdl-sub.readthedocs.io/en/latest/deprecation_notices.html#video-tags
- https://ytdl-sub.readthedocs.io/en/latest/deprecation_notices.html#music-tags
- usage of `download_strategy` (simply remove it if you're getting an error about it)
2024-01-15 00:04:32 -08:00
Jesse Bannon
e3158583ca
[FEATURE] Toggleable plugin field enable for all dict-based plugins (#897)
For key/value-based plugins, add an `enable` field to make it easier for child presets to disable their functionality
2024-01-11 00:40:07 -08:00
Jesse Bannon
961e04d027
[DOCS] Update Usage page (#883) 2024-01-08 16:20:08 -08:00
Jesse Bannon
d80a63631a
[BACKEND] String split scripting function (#877) 2024-01-07 00:13:32 -08:00
Jesse Bannon
ba71abc466
[BACKEND] Optional default in %array_at scripting function (#879)
As title
2024-01-06 23:47:09 -08:00
Jesse Bannon
dc74c6a52a
[BACKEND] elif scripting function (#876)
As titled
2024-01-05 17:48:59 -08:00
Qualis Svagtlys
891b951625
[DOCS] Unraid and FAQ Doc Updates (#869) 2024-01-05 11:12:09 -08:00
Jesse Bannon
b3d298b664
[DOCS] Advanced scripting usage, rename Overrides to Static (#866) 2024-01-01 00:01:46 -08:00
Jesse Bannon
b99463d204
[DOCS] Explain String + Reduce better (#865) 2023-12-30 23:59:10 -08:00
Jesse Bannon
d1acae1a60
[DOCS] Update scripting types (#863) 2023-12-30 10:57:59 -08:00
Jesse Bannon
12430ecf1e
[DOCS] Scripting reference start (#862) 2023-12-29 22:34:36 -08:00
Jesse Bannon
f2d55fdb23
[REFACTOR] Organize variable definitions (#860) 2023-12-29 14:39:19 -08:00
Jesse Bannon
189e897888
[FEATURE] subscription_map value (#859)
To be used later for advanced presets. For subscriptions in the form of (+ as prefix)

```
   + Subscription Name:
     Music Videos:
       - "https://url1.com/..."
     Concerts:
       - "https://url2.com/..."
```

Stores all the contents under the subscription name into the override variable
``subscription_map`` as a Map value. The above example is stored as:

```
   {
     "Music Videos": [
       "https://url1.com/..."
     ],
     "Concerts: [
       "https://url2.com/..."
     ]
   }
```

Advanced scripting is needed to dissect this Map variable into a usable preset
2023-12-29 08:55:12 -08:00
Jesse Bannon
731d4e444c
[DOCS] Tooling to auto-generate custom sphinx docs (#849)
Tooling + updating docs
2023-12-28 22:39:59 -08:00
Jesse Bannon
1fcaba9274
[DOCS] Update links to reflect doc-upgrade (#858) 2023-12-27 11:07:11 -08:00
Qualis Svagtlys
008bcf1b2d
[DOCS] Begin complete overhaul of readthedocs (#847)
Readthedocs for ytdl-sub is getting a massive overhaul to both look and read like a modernized app. It is still very-much work-in-progress, stay tuned for more!

Huge thanks to @Svagtlys (aka Momo) for driving this
2023-12-27 10:27:40 -08:00
Jesse Bannon
e92b1cd12a
[BACKEND][HUGE] Function Support in variable syntax (#838)
A complete gutting of the internals of ytdl-sub to support functions in our variable syntax, in addition to being able to access a yt-dlp entry's .info.json fields using functions. Functionally, ytdl-sub should still look and behave the same from a user-perspective.

With so many lines of code changed (+8927, -2708), no doubt there will be new issues. Please make a GH issue or reach out on Discord if your config/subscriptions break in any way/shape/form.

Details on how to use function support will come soon in the form of proper documentation in our readthedocs.
2023-12-18 16:08:15 -08:00
Jesse Bannon
f1a2187a17
[FEATURE] Add throttle_protection plugin (#799)
Provides options to make ytdl-sub look more 'human-like' to protect from throttling. For range-based values, a random number will be chosen within the range to avoid sleeps looking scripted.

Usage:
```
    throttle_protection:
      sleep_per_download_s:
        min: 2.2
        max: 10.8
      sleep_per_subscription_s:
        min: 9.0
        max: 14.1
      max_downloads_per_subscription:
        min: 10
        max: 36
      subscription_download_probability: 1.0
```
2023-11-05 08:23:12 -08:00
Jesse Bannon
e9b2214a0a
[DOCS] New README with only subscriptions (#791) 2023-11-02 23:28:55 -07:00
Jesse Bannon
545f186c46
[FEATURE][BUGFIX] Beautiful subscriptions syntax update + fix (#758)
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
2023-10-17 16:30:50 -07:00
Jesse Bannon
c255f40348
[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-10-02 16:07:48 -07:00
Jesse Bannon
3e41e0f59e
[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.
2023-09-27 21:37:36 -07:00
Jesse Bannon
6615e1d1ac
[BACKEND] Always filter out live, post_live, and upcoming videos on download (#742)
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
2023-09-24 06:24:21 -07:00
Jesse Bannon
a48efdc84c
[FEATURE] format plugin to set yt-dlp format easier (#714)
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 😉
2023-09-13 00:02:19 -07:00
CatDuck
3b79a7ccae
[FEATURE] Add max_1080p prebuilt preset (#690)
* 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>
2023-08-30 11:28:58 -07:00
Jesse Bannon
77487aee86
[FEATURE] Simplify `video_tags` (#661)
* [FEATURE] Simplify ``video_tags``

* video tags old

* change for episode

* deprecation notice
2023-07-24 18:18:53 -07:00
Jesse Bannon
cc38db9c7a
[FEATURE] Simplify `music_tags` plugin (#660)
* [FEATURE] Simplify ``music_tags`` plugin

* docs

* more compatible

* check old format better

* better dict instantiate
2023-07-24 18:05:54 -07:00
Jesse Bannon
0cbd2af4d3
[FEATURE] embed_thumbnail plugin (#659)
* [REFACTOR] OptionsValidator + OptionsDictValidator

* more

* [FEATURE] Dedicated embed_thumbnail plugin

* tests

* fix test

* docs

* deprecation notices

* priority to run after file convert

* naming

* fixtures
2023-07-24 12:07:36 -07:00
Jesse Bannon
7a43b0a90b
[FEATURE] Add __value__ to subscription files to be able to create one-liner subs (#641)
* [FEATURE] Add __value__ to subscription files to create one-liner subs

* docs
2023-06-29 23:57:54 -07:00
Jesse Bannon
a993beff0e
[FEATURE] Ability to use overrides in regex plugin (#631)
* [FEATURE] Ability to use overrides in regex plugin

* lint

* more tests

* more docs

* docs
2023-06-17 13:02:35 -07:00
Jesse Bannon
ac5561cb2e
[FEATURE] Content rating override variable (#626)
* [FEATURE] Content rating override variable

* docs
2023-06-03 07:42:16 -07:00
Jesse Bannon
ec447cfbd7
[FEATURE] exclude field in regex plugin (#620)
* [FEATURE] `exclude` field in regex plugin

* tests

* excludes doc
2023-05-22 10:23:00 -07:00
Jesse Bannon
2f1756dea7
[FEATURE] More tv show collection seasons (#615) 2023-05-19 09:05:51 -07:00
Jesse Bannon
a2f1a2ba94
[FEATURE] Add subscription_name override variable by default (#599)
* [FEATURE] Add `subscription_name` override variable by default

* docs for it

* lint

* only test non-cli video test
2023-04-28 19:36:20 -07:00
Jesse Bannon
2426b700f3
[DOCS] Add unraid to readthedocs install (#580) 2023-04-05 12:34:00 -07:00
Jesse Bannon
1965bc0a40
[FEATURE] Multiple URLs supported for tv_show_by_date preset (#568)
* [BACKEND] Support empty urls for multi_url, add overrides for extra urls in tv_show_by_date preset

* need to check for missing urls in downloader

* use override in test

* docs about multi url

* wording
2023-03-30 09:28:32 -07:00
Jesse Bannon
54b8b76034
[BACKEND] Handle case when collection url is missing from entry (#558)
* [BACKEND] Handle case when collection url is missing from entry

* hide experimental docs
2023-03-21 13:39:41 -07:00
Jesse Bannon
a96fcff55f
[DOCS] passthrough in README (#549) 2023-03-15 16:12:42 -07:00
Jesse Bannon
ec51361728
[DOCS] Docker passthrough install docs (#548) 2023-03-15 16:08:15 -07:00
Jesse Bannon
9c41a17375
[DOCS] Fix download docs (#547) 2023-03-15 15:55:30 -07:00
Jesse Bannon
45244889ae
[FEATURE] chunk_initial_download preset (#532) 2023-03-10 19:18:37 -08:00