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 |
|
| ELASTIC_USER | Change the default ElasticSearch user | Optional |
|
||||||
| TA_LDAP | Configure TA to use LDAP Authentication | [Read more](https://docs.tubearchivist.com/configuration/ldap/) |
|
| 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) |
|
| 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 |
|
| DJANGO_DEBUG | Return additional error messages, for debug only | Optional |
|
||||||
| TA_LOGIN_AUTH_MODE | Configure the order of login authentication backends (Default: single) | Optional |
|
| TA_LOGIN_AUTH_MODE | Configure the order of login authentication backends (Default: single) | Optional |
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,15 @@ else
|
||||||
LOGLEVEL="INFO"
|
LOGLEVEL="INFO"
|
||||||
fi
|
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
|
# stop on pending manual migration
|
||||||
python manage.py ta_stop_on_error
|
python manage.py ta_stop_on_error
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue