Skip to content

Commit

Permalink
fix: 🐛 修复resilio不同步的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
monlor committed May 30, 2024
1 parent 6778199 commit aa2a34b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
1 change: 1 addition & 0 deletions docker-compose-alist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions glue/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
26 changes: 18 additions & 8 deletions resilio/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit aa2a34b

Please sign in to comment.