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:
Craig Alexander
2025-06-30 23:09:18 -04:00
committed by GitHub
parent ab3b83ed3f
commit 08681f0e33
2 changed files with 10 additions and 0 deletions

View File

@@ -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