Commit graph

49 commits

Author SHA1 Message Date
Ross Patterson
ff66ff5be0
fix(docker): Add default crontab download command (#1321)
* docs(docker): Recommended image DEFAULT_WORKSPACE

* fix(docker): Add default crontab download command

Clarify the `/config/ytdl-sub-configs/cron` script with explanatory comments and a
default `--dry-run` command. Also change the wrapper script to echo commands for easier
debugging. To update an existing script, move the old script aside, restart the
container to regenerate it, and edit the new script.

Also clarify the Automating page in the Getting Started guide docs.

* fix(docker): Unintentional unattended dry runs

[PR feedback](https://github.com/jmbannon/ytdl-sub/pull/1321#discussion_r2315215600)
prompted me to reconsider having a default command at all. We should assume,
unfortunately, that many new users will just skim the docs enough to enable the image's
cron integration but not actually incrementally test their configuration. In those
cases, they'd end up sending dry-run non-download requests for all their subscriptions
every 6 hours for no good reason. There's just no way to provide a default command that
isn't also providing a footgun.

* docs(docker): More open cron schedule generator

From [PR
feedback](https://github.com/jmbannon/ytdl-sub/pull/1321#discussion_r2320521024), this
seems like less of an ad than the previous and the source for the page is itself open source.

* docs(docker): Document image environment footgun

From [PR
feedback](https://github.com/jmbannon/ytdl-sub/pull/1321#discussion_r2320515419).

* docs(automate): Avoid external link 404 responses

* docs(automate): False simultaneous run warning

* docs(automate): Clarify Docker daemon restarts

* docs(automate): Revert run start non-recommended

* docs(automate): Remove footgun manual run command

Addressing this underlying issue requires more thought and should be a separate PR.

* docs(automate): Restore env var footgun in example
2026-03-09 09:27:27 -07:00
Jesse Bannon
0f96d8e24e
[BACKEND] Disallow override names conflicting with plugin names (#1399)
Disallow override variable names conflicting with plugin names.

May cause backward incompatible issues from `date_range` being an old override variable name for the `Only Recent` preset. Update this variable name to `only_recent_date_range` to resolve. More info in https://ytdl-sub.readthedocs.io/en/latest/deprecation_notices.html
2025-12-26 15:30:37 -08:00
Ross Patterson
abd75f8005
[DOCS] logs: persistent logs config (#1304)
* docs(logs): Mimick argparse option default format

I find it more readable to use punctuation to separate technical information, such as
required vs optional or default values, from narrative description. Follow argparse's
lead, and put such information in parens following the narrative description.

* docs(usage): Consistent structure, clarifications

* docs(config): Clarify persist_logs behavior/opts

Clarify the `persist_logs:` options per [Discord discussion](https://discord.com/channels/994270357957648404/1409161361853780060/1409602529460879431).
2025-08-27 09:04:36 -07:00
Jesse Bannon
a68d5e4539
[FEATURE] Emby prebuilt presets (#1232)
Gives Emby first class support by creating prebuilt presets for each variant, including
- `Emby TV Show by Date`
- `Emby TV Show Collection`
- `Emby Music Videos`

Emby is identical to Jellyfin except in TV Show Collection, where it requires a `season.nfo`. A new plugin `StaticNfoTags` has been created to create those.

Huge thanks to @Kamaroth92 for the initial code for this feature!
2025-06-01 09:56:48 -07:00
Jesse Bannon
5e9472986a
[FEATURE] Enhance music video presets using specialized map syntax (#808)
Enhances the music video presets by supporting the following syntax:

`subscriptions.yaml`
```
__preset__:
  overrides:
    music_video_directory: "/music_videos"

# Choose between Jellyfin/Kodi/Plex Music Videos preset:
#   - Plex Music Videos:
#   - Jellyfin Music Videos:
#   - Kodi Music Videos:
#
"Plex Music Videos":

  = Pop:  # Sets genre tag to "Pop"
    "Rick Astley": "https://www.youtube.com/playlist?list=PLlaN88a7y2_plecYoJxvRFTLHVbIVAOoc"
    "Michael Jackson": "https://www.youtube.com/playlist?list=OLAK5uy_mnY03zP6abNWH929q2XhGzWD_2uKJ_n8E"

  = Rock:
    # Prefixing with '+' puts the subscription into 'map-mode'.
    # Music video presets in map-mode support grouping videos into different
    # categories, which get set on the album field.
    #
    # URLs can either be strings, or maps that can overload title, year, date
    "+ Guns N' Roses":
      Music Videos:
        - "https://www.youtube.com/playlist?list=PLOTK54q5K4INNXaHKtmXYr6J7CajWjqeJ"
      Concerts:
        - title: "Live at The Ritz - New York City"
          year: "1988"
          url: "https://www.youtube.com/watch?v=OldpIhHPsbs"
        - title: "Live at The Hollywood Bowl"
          date: "2023-01-11"
          url: "https://www.youtube.com/watch?v=Z7hutGlvq9I"
```
The 'map-mode' (denoted by `+`) lets you specify a map of music video categories. Under each category, a URL can be specified as-is or with additional metadata (title, year/date, url).

Music videos and concerts, especially older ones, are typically uploaded by random users with inconsistencies in their titles. This syntax aims to make it easy to specify individual URLs with the ability to overwrite their title and year, and group them by category.
2024-06-06 11:50:33 -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
544af2207b
[FEATURE] Add output_options.keep_max_files to limit number of downloads per subscription (#820)
Adds a new mechanism to limit subscriptions' number of videos to an explicit number (only supported date ranges prior to this).

Example usage:
```
output_options:
  keep_max_files: 10
```
will only keep 10 videos at max.

In addition:
- `keep_max_files` is bundled into the `Only Recent` preset and can be used via setting the `only_recent_max_files` override variable (see examples or README for usage).
- Changed the `date_range` variable name to `only_recent_date_range` for more clarity.  Usage of `date_range` will continue to work.
2023-11-17 09:01:21 -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
9f408d2196
[FEATURE] Extend subscription syntax (#790)
Extends the subscription.yaml syntax at the cost of introducing a breaking change.

# New Syntax
## Mix-n-match presets and indent variables
```
# Can mix/match presets and indent override variables.
# Uses presets TV Show, Only Recent and assigns Kids, TV-Y to subscription_indent_1 and _2
TV Show | = Kids | = TV-Y | Only Recent:
  "Jake Trains": "https://..."
```

## Subscriptions with list-value support
```
TV Show | = Kids | = TV-Y | Only Recent:
  "Jake Trains":
    - "https://url.1..."  # Assigns to subscription_value and subscription_value_1
    - "https://url.2..."  # Assigns to subscription_value_2
```

## Subscriptions with override-keys support
```
TV Show | = Kids | = TV-Y | Only Recent:
  "~Jake Trains":  # the ~ means "all keys underneath get assigned as override variables"
    url: "https://url.1..."  # Assigns to url
    url2: "https://url.2..."  # Assigns to url2
```

# Breaking Changes
In the TV show subscriptions example (https://github.com/jmbannon/ytdl-sub/blob/master/examples/tv_show_subscriptions.yaml), it had
```
TV Show Full Archive:
  # Sets "Kids" for genre, "TV-Y" for content rating
  = Kids | TV-Y:
    "Jake Trains": "https://www.youtube.com/@JakeTrains"
    "Kids Toys Play": "https://www.youtube.com/@KidsToysPlayChannel"
```
This must be changed to
```
TV Show Full Archive:
  # Sets "Kids" for genre, "TV-Y" for content rating
  = Kids | = TV-Y:  # Each indent variable assignment must have an = before it
    "Jake Trains": "https://www.youtube.com/@JakeTrains"
    "Kids Toys Play": "https://www.youtube.com/@KidsToysPlayChannel"
```
2023-11-01 20:24:06 -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
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
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
1a118e225a
[BACKEND] Perform match-filters at metadata stage, use match-filters for date_range plugin (#725)
Solved Issue: https://github.com/jmbannon/ytdl-sub/issues/706

From our discussion with yt-dlp folks (https://github.com/yt-dlp/yt-dlp/issues/8108), we learned that best practices for date--range filtering is done using match-filters. We now set the `date_range` plugin values to be a 'breaking' match filter, and any custom ones specified from users in the `match_filters` plugin as non-breaking. This means match-filters can be performed at the metadata stage, which should yield a significant speedup

Relevant docs:
- date_range: https://ytdl-sub.readthedocs.io/en/latest/config.html#date-range
- match_filters: https://ytdl-sub.readthedocs.io/en/latest/config.html#match-filters
2023-09-19 11:19:15 -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
fcdf577daf
[DOCS] Fix bandcamp docs (#488) 2023-03-01 10:07:36 -08:00
Dave Bauman
02d21e3d21
Update music_videos_subscriptions.yaml (#433)
Typo in the example command arguments
2023-01-27 12:51:30 -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
5d9fe2eaae
[BUGFIX] Set multi-value music tags as a list with single value (#349)
* [BUGFIX] Set multi-value music tags as a list with single value

* update fixtures
2022-11-21 14:11:55 -08:00
Jesse Bannon
70c78dc109
[FEATURE] Embed thumbnails into audio files as cover art (#345)
* [FEATURE] Embed thumbnails into audio files as cover art

* lint

* fix ytdl options
2022-11-19 23:36:15 -08:00
Jesse Bannon
2128e183aa
[BACKEND] Use download strategy for soundcloud example (#316) 2022-11-12 09:59:49 -08:00
Jesse Bannon
10b58264ea
[BACKEND] Update music video example with url download strategy (#312)
* [DOCS] document file __preset__

* [REFACTOR] Use `download` type in examples

* TODO: download strategy docs, validate fixtures, fix playlist test

* playlist fixed, fixtures look good

* download strategy docs, fix tests

* better docs

* lint

* yt fixed

* split chapters fixed

* fix video

* better docs

* lint
2022-11-11 08:54:07 -08:00
Jesse Bannon
44ec463ab3
[BACKEND] More strict validation for config files (#301) 2022-10-26 00:00:36 -07:00
Jesse Bannon
8da38a806e
[FEATURE] New TV Show example config (#279) 2022-10-14 16:32:19 -07:00
Jesse Bannon
1486acb421
[BACKEND] Parallelize tests, remove track and artist source variables (#246) 2022-09-27 16:51:42 -07:00
Jesse Bannon
c08ea64b5a
[BACKEND] Add generic.collection download strategy, use it for soundcloud, youtube channel/playlist (#230) 2022-09-14 15:36:14 -07:00
Jesse Bannon
5782445366
[FEATURE] Add ability for downloaders to add new override variables. Add source_title, source_uploader, and source_description for YouTube channels and playlists (#203) 2022-09-01 00:25:01 -07:00
Jesse Bannon
ca0ac787b0
[FEATURE] Ability to write .info.json files (#201) 2022-08-29 22:50:42 -07:00
Jesse Bannon
790c65859a
[FEATURE] Add split_by_chapters plugin (#184) 2022-08-18 23:24:03 -07:00
Jesse Bannon
871c051aa8
[FEATURE] Audio extract plugin (#177) 2022-08-14 10:10:10 -07:00
Jesse Bannon
df9f5a7836
[DOCS] Automated download via cron docs (#95)
* [DOCS] Automated download docs, fix -thumb.jpg

* patty
2022-07-08 11:46:47 -07:00
Maka0
cb31156b42
Added QEMU/buildx to Github Actions to build multiarch containers (#84)
* Updated docker to use buildx Buildkit

* Updated github actions to include QEMU/buildx to build multiarch containers

* Removed packages after build is done

* Updated documentation to set the correct default thumbnail file name

* Parallel jobs (#1)

Implemented parallel docker builds on Github Actions

* Updated default config file in Docker container

* Replaced Pillow with ffmpeg for thumbnail converting (and updated documentation to change the default thumbnail to -thumb.jpg) (#2)

* Swapped Pillow for ffmpeg for thumbnail conversion
* Further changed default thumbname to include "-thumb" (Kodi needs this to pick up the thumbnail image)
* Added ffmpeg bitexact for reproducability

* Removed extra packages needed for Pillow

* Updated ref check (#3)

* Fixed formatting on if statement for deploy job

Co-authored-by: Maka0 <bas@oddens.net>
2022-07-04 01:17:04 -07:00
Jesse Bannon
9df40497e2
Add --dry-run argument logic (#82)
* dry-run huge refactor

* small fixes, all tests passing

* file handler, transaction log, metadata

* dry-run actually dry running

* working tests, still have more

* Everything passing besides channel

* fix youtube channel thumbnail issue, need to fix fixtures on test

* lint 10, channel tests passing. Need dry-run for split and merge video

* all tests passing, lint 10, should test dry-run arg
2022-07-02 11:24:46 -07:00
Jesse Bannon
cb6dc8e034
Add youtube.download_strategy: "merge_playlist" (#77)
* begin

* chapters class, trying to add chapter splitting and general ffmpeg metadata creation

* working split video

* so very close

* test passing, is reproducible

* lint fixed

* fix docs

* track no longer used in example

* if, then del

* multiple values

* github hash
2022-06-26 15:18:07 -07:00
Jesse Bannon
ee6706334f
ytdl_options defaults for each download strategy (#72)
* `ytdl_options` defaults for each download strategy

* fix docker, fix defaults getting added, add debugger test

* test playlist as well

* fix with hack

* fix full channel test

* existing
2022-06-14 00:03:01 -07:00
Jesse Bannon
a79fcaa25b
Use URLs instead of IDs for sources (#70)
* youtube video url

* WIP, channel /user/ and /c/ should be valid

* unit tests passing

* soundcloud artist url

* soundcloud username

* break configs with name change

* Update all yamls with urls

* update all docs

* more negative url tests
2022-06-05 16:19:08 -07:00
Jesse Bannon
8b336e6fb0
Always convert thumbnails to jpg (#51)
* always use jpg

* fix unit test

* update readme and configs
2022-05-30 09:59:25 -07:00
Jesse Bannon
a6cf9c3a11
Add soundcloud discography example w/test (#49)
* example sc yaml

* discography test

* json sort_keys
2022-05-30 00:25:41 -07:00
Jesse Bannon
56cc17e13c
Tests for music video (vid + playlist) download (#48) 2022-05-28 22:58:38 -07:00
Jesse Bannon
9c97fb7572
sanitized suffix (#41) 2022-05-26 23:02:40 -07:00
Jesse Bannon
5b72ca51c6
Dockerfile and docker-compose.yml (#36) 2022-05-20 12:52:58 -07:00
Jesse Bannon
d17f677db3
Add inheritance for presets (#24) 2022-05-15 16:31:34 -07:00
Jesse Bannon
29ef377cc7
Add documentation for plugins + improve docs overall (#23) 2022-05-10 22:22:03 -07:00
Jesse Bannon
b564e1fcf4
Make readme up to date and improved (#19) 2022-05-02 23:31:47 -07:00
jbannon
ec62912244 test subscription types for channel 2022-05-01 06:05:00 +00:00
Jesse Bannon
9734d391a6
Add playlist_index and playlist_size to Youtube playlist videos (#17) 2022-04-30 19:24:44 -07:00
Jesse Bannon
905151e64e
Add channel as kodi tv show e2e test (#15) 2022-04-29 11:09:32 -07:00
jbannon
53b1923653 kodi tv show examples 2022-04-23 08:04:47 +00:00