From aa2a34b0adab43f2a11d22812dd5075df7e1501f Mon Sep 17 00:00:00 2001 From: monlor Date: Fri, 31 May 2024 00:40:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8Dresilio?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E6=AD=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose-alist.yml | 1 + glue/entrypoint.sh | 4 ++++ resilio/entrypoint.sh | 26 ++++++++++++++++++-------- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/docker-compose-alist.yml b/docker-compose-alist.yml index f96ab56..e277328 100644 --- a/docker-compose-alist.yml +++ b/docker-compose-alist.yml @@ -17,6 +17,7 @@ services: - ALIYUN_FOLDER_ID= - AUTO_UPDATE_ENABLED=true - AUTO_CLEAR_ENABLED=true + - AUTO_UPDATE_MEDIA_ADDR=false restart: unless-stopped networks: - default diff --git a/glue/entrypoint.sh b/glue/entrypoint.sh index 460b185..0f50fb1 100644 --- a/glue/entrypoint.sh +++ b/glue/entrypoint.sh @@ -70,6 +70,8 @@ if [ "${EMBY_ENABLED:=false}" = "true" ]; then cd ${MEDIA_DIR}/xiaoya 7z x -aoa -mmt=16 ${MEDIA_DIR}/temp/pikpak.mp4 + chmod -R 777 ${MEDIA_DIR}/xiaoya + touch ${MEDIA_DIR}/config/emby_meta_finished fi fi @@ -106,6 +108,8 @@ if [ "${JELLYFIN_ENABLED:=false}" = "true" ]; then cd ${MEDIA_DIR}/xiaoya 7z x -aoa -mmt=16 ${MEDIA_DIR}/temp/PikPak_jf.mp4 + chmod -R 777 ${MEDIA_DIR}/xiaoya + touch ${MEDIA_DIR}/config/jellyfin_meta_finished fi diff --git a/resilio/entrypoint.sh b/resilio/entrypoint.sh index b456821..2988616 100644 --- a/resilio/entrypoint.sh +++ b/resilio/entrypoint.sh @@ -10,20 +10,30 @@ done echo "检查并创建同步目录..." dirs=( - "/sync/xiaoya/每日更新/电视剧" - "/sync/xiaoya/每日更新/电影" - "/sync/xiaoya/电影/2023" - "/sync/xiaoya/纪录片(已刮削)" - "/sync/xiaoya/音乐" - "/sync/xiaoya/每日更新/动漫" - "/sync/xiaoya/每日更新/动漫剧场版" + "/sync/xiaoya/每日更新/电视剧,uuLY99gGZ1guQNf2vkxZl9gnBZPGt05TLTk0QQ==" + "/sync/xiaoya/每日更新/电影,FouyyCCh9FA87nX1vgPDQDgtqxmAaS6+UtkXAw==" + "/sync/xiaoya/电影/2023,idHchd0CgODoJc6b83N9O78MqrzByHw8DgWK/Q==" + "/sync/xiaoya/纪录片(已刮削),iKT0ovILxP3J25ARf3l1zVtg9k6ACie9fZpCvw==" + "/sync/xiaoya/音乐,3NRc3JTCqv0q9kwxkQuWM7t6jGz/K0fD7Iqy4Q==" + "/sync/xiaoya/每日更新/动漫,7Q5yvySxbSKvbfcw8TsdIul3RWEGv8K7xQTJwQ==" + "/sync/xiaoya/每日更新/动漫剧场版,3TMeMJFlG8sbQtaezrEXBwLM05uUi4I56q4qrA==" ) -for dir in "${dirs[@]}"; do +for line in "${dirs[@]}"; do + dir=$(echo $line | awk -F, '{print $1}') + id_base64=$(echo $line | awk -F, '{print $2}') if [ ! -d "$dir" ]; then echo "创建目录: $dir" mkdir -p "$dir" + chmod -R 777 "$dir" fi + if [ ! -d "$dir/.sync" ]; then + echo "创建同步目录: $dir/.sync" + mkdir -p "$dir/.sync" + chmod -R 777 "$dir/.sync" + fi + echo "$id_base64" | base64 -d > "$dir/.sync/ID" + chmod 777 "$dir/.sync/ID" done exec /init \ No newline at end of file