mirror of
https://github.com/tubearchivist/tubearchivist.git
synced 2025-07-19 23:38:15 +00:00
Add option to update yt-dlp on restart (#992)
* Add option to update yt-dlp on restart * Address pr feedback
This commit is contained in:
parent
ab3b83ed3f
commit
08681f0e33
@ -71,6 +71,7 @@ All environment variables are explained in detail in the docs [here](https://doc
|
||||
| ELASTIC_USER | Change the default ElasticSearch user | Optional |
|
||||
| TA_LDAP | Configure TA to use LDAP Authentication | [Read more](https://docs.tubearchivist.com/configuration/ldap/) |
|
||||
| DISABLE_STATIC_AUTH | Remove authentication from media files, (Google Cast...) | [Read more](https://docs.tubearchivist.com/installation/env-vars/#disable_static_auth) |
|
||||
| TA_AUTO_UPDATE_YTDLP | Configure TA to automatically install the latest yt-dlp on container start | Optional |
|
||||
| DJANGO_DEBUG | Return additional error messages, for debug only | Optional |
|
||||
| TA_LOGIN_AUTH_MODE | Configure the order of login authentication backends (Default: single) | Optional |
|
||||
|
||||
|
@ -9,6 +9,15 @@ else
|
||||
LOGLEVEL="INFO"
|
||||
fi
|
||||
|
||||
# update yt-dlp if needed
|
||||
if [[ "${TA_AUTO_UPDATE_YTDLP,,}" =~ ^(release|nightly)$ ]]; then
|
||||
echo "Updating yt-dlp..."
|
||||
preflag=$([[ "${TA_AUTO_UPDATE_YTDLP,,}" == "nightly" ]] && echo "--pre" || echo "")
|
||||
python -m pip install --target=/root/.local/bin --upgrade $preflag "yt-dlp[default]" || {
|
||||
echo "yt-dlp update failed"
|
||||
}
|
||||
fi
|
||||
|
||||
# stop on pending manual migration
|
||||
python manage.py ta_stop_on_error
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user