Commit graph

76 commits

Author SHA1 Message Date
Jesse Bannon
b195f37412
[DEV] Disable soundcloud e2e test in CI (#1448) 2026-05-10 08:59:32 -07:00
Jesse Bannon
57fd6901e4
[DEV] Linter: Use ruff over black and isort (#1445)
Will eventually replace pylint with ruff
2026-03-09 11:39:01 -07:00
Jesse Bannon
0006c0ea94
[DEV] Disable YouTube tests in GH CLI (#1090) 2024-10-07 23:46:27 -07:00
Jesse Bannon
c0ba30b220
[DEV] More OutputOption unit tests (#1082) 2024-10-02 21:37:54 -07:00
Jesse Bannon
481ced34c5
[DEV] Custom ffmpeg unit test (#1076) 2024-09-30 22:04:52 -07:00
Jesse Bannon
01e1f46b86
[DEV] Remaining throttle unit tests (#1075) 2024-09-30 22:04:32 -07:00
Jesse Bannon
1caade46bd
[DEV] Unit test music tags (#1074) 2024-09-29 23:33:00 -07:00
Jesse Bannon
1b57d79c8f
[BREAKING CHANGE] Remove regex plugin (#1067)
Regex plugin has been removed in favor of scripting. The function [regex_capture_many](https://ytdl-sub.readthedocs.io/en/latest/config_reference/scripting/scripting_functions.html#regex-capture-many) has been created to replicate the plugin's behavior. See the following converted example:

`regex, now deprecated`
```
    regex:
      from:
        title:
          match:
            - ".*? - (.*)"  # Captures 'Song' from 'Emily Hopkins - Some - Song'
          capture_group_names:
            - "captured_track_title"
          capture_group_defaults:
            - "{title}"
    overrides:
      track_title: "{captured_track_title}"
```

`scripting equivalent`
```
    overrides:
      # Captures 'Song' from 'Emily Hopkins - Some - Song'
      captured_track_title: >-
        {
          %regex_capture_many(
            title,
            [ ".*? - (.*)" ],
            [ title ]
          )
        }
      track_title: "{%array_at(captured_track_title, 1)}"
```

## Motivation:
Regex was a unique plugin that added custom variables based on user input. This made the backend need to support both `overrides` and 'plugin user variables'. Removing `regex` plugin will consolidate this logic into only `overrides`, making it much easier to maintain.
2024-09-29 08:41:09 -07:00
Jesse Bannon
fd5882051a
[DEV] Unit test filter plugin (#1066) 2024-09-26 11:54:15 -07:00
Jesse Bannon
513d1f5a97
[DEV] Partially unit test throttle protection (#1065) 2024-09-26 10:27:31 -07:00
Jesse Bannon
79ba60021c
[BACKEND] Proper functions with docstrings (#1061)
Reimplement some of the 'hidden' functions, including `%regex_capture_many`, as standard functions with docstrings
2024-09-25 23:24:49 -07:00
Jesse Bannon
f963125398
[DEV] Unit test NFO tags (#1064) 2024-09-25 23:23:16 -07: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
d2e733f2e7
[BACKEND] Only download audio when using audio_extract plugin (#902)
This addition optimizes the `audio_extract` plugin by preemptively telling yt-dlp to discard the video and only download the audio stream
2024-01-18 15:00:17 -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
308c76a8f2
[FEATURE] Filter plugins, regex helper script functions (#848)
Adds generic `filter_include` and `filter_exclude` plugins in anticipation for function script usage. Will detail it more with official docs at a later time!
2023-12-20 09:52:12 -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
395691f2b9
[FEATURE] Create output_directory_nfo_tags on first entry instead of last (#809) 2023-11-05 23:10:29 -08:00
Jesse Bannon
e257210e4a
[BACKEND] Shared multi-url helper preset, can now disable grabbing poster/fanart (#807) 2023-11-05 16:51:17 -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
5fb5a18abc
[FEATURE] TV Show prebuilt presets that require no config (#788)
Introduces 3 new presets + 1 helper preset to download TV show-based subscriptions without the need of a config

```
Plex TV Show by Date
Jellyfin TV Show by Date
Kodi TV Show by Date
```
and
```
Only Recent
```

Example usage can be found in https://github.com/jmbannon/ytdl-sub/blob/master/examples/tv_show_subscriptions.yaml
2023-11-01 22:39:32 -07:00
Jesse Bannon
056b111be6
[FEATURE] Prebuilt Music Videos (#787)
Creates standardized prebuilt presets for music videos. Preset names are:

```
"Kodi Music Videos"
"Jellyfin Music Videos"
"Plex Music Videos"
```

Usage can be found in the `examples/` directory
2023-10-28 00:12:22 -07:00
Jesse Bannon
d810291e7c
[BUGFIX] Write music multi-tags correctly (#782)
Music multi-tags (artists, albumartists, etc) were not writing correctly. Fix it by explicitly checking to see if the tag is multi or not in the codebase.
2023-10-25 10:37:24 -07:00
Jesse Bannon
ff857c84af
[FEATURE] Prebuilt music presets (#780)
Adds the following prebuilt presets:
```
"Single"
"SoundCloud Discography"
"YouTube Releases"
"YouTube Full Albums"
"Bandcamp"
```

which require no config.yaml to use. Usage examples can be found in the `/examples` directory
2023-10-24 09:23:05 -07:00
Jesse Bannon
83ecd19c77
[FEATURE] Process all subscriptions even if one or more error (#771)
Closes GH Issue #766, partially closes #520

Prior to this release, no other subscriptions would download if a subscription before it had an error. Now, subscriptions will continue to download even if one has an error, and will be reported in the output summary.
2023-10-21 12:25:38 -07:00
Jesse Bannon
4105c2ed40
[FEATURE] No longer require a config.yaml (#763)
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
2023-10-18 09:58:37 -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
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
Jesse Bannon
da70c725fc
[FEATURE] Support best codec type in audio_extract (#700)
Adds support to the `audio_extract` plugin (https://ytdl-sub.readthedocs.io/en/latest/config.html#audio-extract) to the following to grab the best audio format available:

```
audio_extract:
  codec: "best"
```
2023-09-02 00:50:26 -07:00
Jesse Bannon
5f9b8afc4b
[BUGFIX] Do not hard-fail if the thumbnail fails to download/convert (#675)
* [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
2023-07-28 13:12:46 -07:00
Jesse Bannon
a9e6a80111
[REFACTOR] Support simple download (#671)
* [REFACTOR] Support simple `download`

* fix test

* asdfas
2023-07-26 09:00:00 -07:00
Jesse Bannon
598b1da8a4
[REFACTOR] Purge download_strategy from configs + tests (#670) 2023-07-25 20:26:04 -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
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
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
0497f2b749
[FEATURE] Perform match-filter on download, not metadata pull (#612)
* [FEATURE] Apply match-filter on download instead of metadata

* correct ytdl_option ordering

* lint

* test that downloads
2023-05-18 09:52:24 -07:00
Jesse Bannon
7c692cda6e
[REFACTOR] BaseDownloader (#542)
* [REFACTOR] BaseDownloader

* doh

* fix mock
2023-03-14 23:42:50 -07:00
Jesse Bannon
e69933d525
[REFACTOR] Split metadata and download into two separate steps (#540) 2023-03-13 22:41:09 -07:00
Jesse Bannon
e5949abce0
[BACKEND] partial validate test for subtitle lang variable (#527) 2023-03-10 11:54:49 -08:00
Jesse Bannon
5d40d02eb3
[BACKEND] Make break message debug level and more clear (#496) 2023-03-02 13:01:01 -08:00
Jesse Bannon
4ba41c757c
[BACKEND] More verbose logging when breaking (#450)
* [BACKEND] More verbose logging when breaking

* make thumbnail id a debugger log

* mock for info log

* info
2023-02-20 10:50:04 -08:00
Jesse Bannon
f713d720e4
[DOCKER] Upgrade ffmpeg, add phantomjs (#448)
* [DOCKER] Upgrade ffmpeg, add phantomjs

* only install phantomjs for x86

* lint
2023-02-20 09:36:41 -08:00
Jesse Bannon
e5b5c5e638
[BACKEND] Bandcamp e2e test, update music example (#393)
* [BUGFIX] Fix missing contains function when checking entries

* remove children func

* [BACKEND] Bandcamp e2e test, update music example

* WIP

* combine soundcloud and all music into music_audio config

* sc fixtures

* updated tests and examples

* bandcamp e2e test

* regen off

* remove url validators

* use bandcamp artist url for more parent coverage

* lint
2023-01-14 16:48:27 -08:00
Jesse Bannon
6020f27f12
[BACKEND] Better error message for music_tags recieving a video (#413)
* [BACKEND] Better error message for music_tags recieving a video

* test and better message
2023-01-13 10:25:17 -08:00
Jesse Bannon
c3d9d45c18
[BUGFIX] Invalid cross-device link workaround (#400) 2023-01-04 15:34:26 -08:00
Jesse Bannon
a77885f4de
[FEATURE] Match filters plugin (#365) 2022-11-26 22:32:19 -08:00
Jesse Bannon
2f792f774c
[FEATURE] Add custom ffmpeg post-processing (#364) 2022-11-26 14:56:34 -08:00
Jesse Bannon
ead5620c5c
[FEATURE] Add mp3 id3v2.4 multi-tag support (#356)
* [FEATURE] Add mp3 id3v2.4 multi-tag support

* docs

* fix new docker issue

* update fixture
2022-11-24 00:56:23 -08:00