Commit graph

33 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
24e71ce733
[DOCKER] Make defaults script executable (#1388)
Fixes https://github.com/jmbannon/ytdl-sub/issues/1387 and some potential docker issues by not having this file ran on start.
2025-11-26 20:22:22 -08:00
Maxim Borisov
a74c79d014
[DOCKER] Ensure correct cron log file permissions (#1378)
Co-authored-by: bedlamzd <vcs@bedlamzd.dev>
2025-11-09 09:51:57 -08:00
Snuffy2
e507e6ed46
[DOCKER] Disable pip break-system-packages (#1373)
Fixes `UPDATE_YT_DLP_ON_START` when set to 'nightly' as the pip command is missing --break-system-packages. Simplifies dockerfiles by setting this globally via pip config file.

Thanks @Snuffy2 for the contribution!
2025-11-06 21:08:10 -08:00
Jesse Bannon
2deafc9f2d
[DOCKER] Include Deno dependency, other fixes (#1345)
Closes
- Deno requirement: https://github.com/jmbannon/ytdl-sub/issues/1340
  - yt-dlp announcement: https://github.com/yt-dlp/yt-dlp/issues/14404
- Docker cron log double-logging: https://github.com/jmbannon/ytdl-sub/issues/1202 (thanks @timetocode for https://github.com/jmbannon/ytdl-sub/pull/1330 !)
- Missing pip dependency when updating yt-dlp: https://github.com/jmbannon/ytdl-sub/issues/1346
2025-09-27 16:43:34 -07:00
Jesse Bannon
cc3a36e66a [HOTFIX] Fix CRON_SCHEDULE env var 2025-09-27 14:58:29 -07:00
Jesse Bannon
4f8490d88c
[DOCKER] Env variable to update yt-dlp on start (#1344)
Closes https://github.com/jmbannon/ytdl-sub/issues/1154

For docker images, add the ability to set the variable `UPDATE_YT_DLP_ON_START`, which will update yt-dlp to the specified version if a new one exists.

Supports ``stable``,  ``nightly``, ``master``.
2025-09-27 14:09:57 -07:00
Jesse Bannon
a7cf361821
[DOCKER] Make default paths same as docker defaults (#1332)
Changes documentation and default configs to use the `/tv_shows` default path shown in the docker compose setup.
Also changes working directory and file lock directory to not be in /tmp, which often causes permission issues.
2025-09-05 22:50:47 -07:00
Jesse Bannon
c2afe05c11
[DOCKER] Fix & issue in cron (#1325)
Fixes the following issue in some people's cron runs:
```
/bin/sh: 4: /config/.cron_wrapper: Syntax error: "&" unexpected
```
2025-08-31 18:59:59 -07:00
Ross Patterson
26922e1787
[DOCKER] Missing cron script stderr output (#1307) 2025-08-27 09:02:45 -07:00
Ross Patterson
8eb5215a0c
[DOCS]: Large file long cross-device renames (#1301)
From [Discord discussion](https://discord.com/channels/994270357957648404/994270357957648408/1408832178623741993).
2025-08-24 07:55:16 -07:00
Ross Patterson
e1f81e5274
[DOCS] Add Architecture section and Quick Start (#1287)
* docs(config): Clarify preset ordering priority

Refs #1276

* docs(architecture): WIP Narrative how it works

Much of this is repetition of the reference docs and some of the changes here should
also be applied here. The goal is to repeat here the parts of the reference docs that
may hang up a user when reading "Getting Started" without sending them off to get lost
in the weeds of the reference docs.

Note that this references a `Quick Start` document which is just an empty placeholder
and is to be written in a subsequent change.

Fixes #1279

* docs(terms): Glossary redundant with architecture

Now that the introduction includes an architectural overview, that section introduces
new users to necessary concepts and associated terminology and makes the terminology
section redundant in that part of the docs.

* docs(quick): Add a rote quick start guide

This is what I came up with when I tried to write instructions requiring as little
understanding as possible. Doing so really did reinforce my impression that this just
shouldn't be done, that significant understanding is required for *any* use of ytdl-sub
and even offering a quick start may be irresponsible. I'm still on the fence, thoughts?

That said, I also think I got some good explanations out of this and a better
understanding of what the next bits of the Getting Started should be. This Quick Start
is currently redundant with other parts of the Getting Started pages. I suspect that
I'll end up repeating and/or reorganizing parts of this Quick Start into the next bits
of the Getting Started. To that end I might argue that this change is a WIP and that
merging should wait. But I could also argue that this is an incremental improvement and
can be merged before that other work. Your call.

* docs(start): Various rST/Sphinx markup issues
2025-08-19 00:38:39 -07:00
Jesse Bannon
faf9fd8a10
[DOCKER] Update yt-dlp, fix phantomjs (#1240)
Bumps [yt-dlp[default]](https://github.com/yt-dlp/yt-dlp) from 2025.5.22 to 2025.6.9.
- [Release notes](https://github.com/yt-dlp/yt-dlp/releases)
- [Changelog](https://github.com/yt-dlp/yt-dlp/blob/master/Changelog.md)
- [Commits](https://github.com/yt-dlp/yt-dlp/compare/2025.05.22...2025.06.09)

Also fixes phantomjs in docker builds
2025-06-11 23:25:56 -07:00
Jesse Bannon
e27a7c5495
[DOCKER] Fix various cron issues (#1204)
Closes
- https://github.com/jmbannon/ytdl-sub/issues/1200
  - Runs in the background now
- https://github.com/jmbannon/ytdl-sub/issues/1201
  - Was not running as user `abc`, now it is
- https://github.com/jmbannon/ytdl-sub/issues/1202
  - Due to reading stdout and tail of hidden log file. Should only tail from hidden log file now

Will leave crontab as-is if no CRON_SCHEDULE is specified
2025-04-02 21:22:12 -07:00
Jesse Bannon
1264f0c656
[DOCKER] Update Ubuntu-based images (#1185)
- Update Ubuntu-based images to use Python 3.12
- Move hidden files from GUI image's main dir
- Update github workflows to use python 3.12
- Update fixtures
- Minor doc fixes
2025-03-15 21:58:51 -07:00
Jesse Bannon
51c134a036
[DOCKER] Simplify cron (#1184)
Drastically simplifies setting up cron within ytdl-sub. Below is the documentation which is available in readthedocs, and a section on how to migrate from the old way to this.

## New Cron Documentation
Cron is preconfigured in every ytdl-sub docker container. Enable by adding the following ENV variables to your docker setup.

```
services:
  ytdl-sub:
    environment:
    - CRON_SCHEDULE="0 */6 * * *"
    - CRON_RUN_ON_START=false
```  
- CRON_SCHEDULE follows the standard [cron scheduling syntax](https://crontab.guru/#0_*/6_*_*_*). The above value will run the script once every 6 hours.
- CRON_RUN_ON_START toggles whether to run your cron script on container start.

The cron script will reside in the main directory with the file name `cron`. Cron logs should show when viewing the Docker logs.

## Migrating Existing Cron Setup
Containers' cron files will remain intact until you add the `CRON_SCHEDULE` variable. Once you add that with your preferred schedule, it will write that value to /config/crontabs/abc and create a new file `cron` within your working directory. Simply copy everything from your existing `run_cron` script into `cron`.

If you have the ENV variable `DOCKER_MODS` in your docker-compose, remove it. It is now included by default. Not removing this will prevent cron logs from showing in your docker container logs.
2025-03-15 15:47:03 -07:00
Joey Babcock
fa13ba30cf
[DOCS] Fixing 404 link to presets (#1008) 2024-06-22 23:30:21 -07:00
Jesse Bannon
248e9a15a6
[DOCS] Various doc cleanups (#928) 2024-02-17 08:53:06 -08: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
19eee28f4a
[DOCKER] New default config/subscription in Docker (#798)
The default subscription file in the docker container now matches the one in the repo's README
2023-11-03 17:14:38 -07:00
Jesse Bannon
c149957b04
[DOCKER] Remove default gui settings (#776) 2023-10-22 14:35:52 -07:00
Jesse Bannon
ee09e85a33
[DOCKER] Move cont-init.d files (#775) 2023-10-22 13:02:06 -07:00
Jesse Bannon
c932583165
[DOCKER] GUI Docker image using Code-Server (#774)
Adds a new docker image: `ytdl-sub-gui:latest` which is ytdl-sub packaged with VS-Code via LinuxServer.io's code-server image: https://hub.docker.com/r/linuxserver/code-server

Proper documentation will be added later
2023-10-22 01:17:09 -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
3404ed9cc5
[DOCKER][BUGFIX] Use PUID/PGID to chown /config dir (#644)
* [DOCKER][BUGFIX] Use `PUID`/`PGID` to chown `/config` dir

* lint
2023-07-24 10:12:20 -07:00
Jesse Bannon
726da5b6be
[BACKEND] Update docker container to have latest examples (#319) 2022-11-13 11:24:59 -08: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
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
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