Skip to content

Commit

Permalink
fix: reduce duplicate updates
Browse files Browse the repository at this point in the history
  • Loading branch information
DDSRem committed Jun 22, 2024
1 parent 4fe6311 commit ae7c7f3
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions emby_metadata_downloader/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,26 +71,23 @@ function mount_img() {

}

if [ "${RESTART_AUTO_UPDATE}" == "true" ]; then
update_app
fi

if [ "${IMG_VOLUME}" == "true" ]; then
mount_img
fi

cd /app || exit

TWELVE_HOURS=$((12 * 60 * 60))

if [ "$CYCLE" -lt "$TWELVE_HOURS" ]; then
WARN "您设置的循环时间小于12h,对于服务器压力过大,同步下载将不会运行!"
tail -f /dev/null
else
while true; do
INFO "开始更新代码!"
update_app
INFO "更新成功!"
if [ "${RESTART_AUTO_UPDATE}" == "true" ]; then
INFO "开始更新代码!"
update_app
INFO "更新成功!"
fi
cd /app || exit
INFO "开始下载同步!"
INFO "python3 solid.py $*"
python3 solid.py $@
Expand Down

0 comments on commit ae7c7f3

Please sign in to comment.