From 46174362deeb2aaa240f7739553b24f863ee0509 Mon Sep 17 00:00:00 2001 From: monlor Date: Tue, 18 Jun 2024 16:33:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20jellyfin=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E8=B7=AF=E5=BE=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: #132 --- metadata/entrypoint.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/metadata/entrypoint.sh b/metadata/entrypoint.sh index b657c90..55dab52 100644 --- a/metadata/entrypoint.sh +++ b/metadata/entrypoint.sh @@ -42,6 +42,8 @@ disk_check() { download_meta() { file=$1 + # 元数据路径 + path=${2:-} echo "Downloading ${file}..." # 检查历史文件,如果存在残留则删除 if [ -f "${MEDIA_DIR}/temp/${file}.aria2" ]; then @@ -61,7 +63,7 @@ download_meta() { for i in {1..5}; do echo "Downloading ${file}, try ${i}..." echo "Link is ${ALIST_ADDR}/d/元数据/${file}" - if aria2c -o "${file}" --allow-overwrite=true --auto-file-renaming=false --enable-color=false -c -x6 "${ALIST_ADDR}/d/元数据/${file}"; then + if aria2c -o "${file}" --allow-overwrite=true --auto-file-renaming=false --enable-color=false -c -x6 "${ALIST_ADDR}/d/元数据/${path}${file}"; then # 下载的文件小于10M,下载失败,删除 if [ "$(stat -c %s "${file}")" -lt 10000000 ]; then echo "Download ${file} failed, file size less than 10M, retry after 10 seconds." @@ -149,7 +151,7 @@ download_jellyfin_config() { echo "Downloading Jellyfin config..." cd ${MEDIA_DIR}/temp - download_meta Jellyfin/config_jf.mp4 + download_meta config_jf.mp4 Jellyfin/ echo "Extracting Jellyfin config..." @@ -174,8 +176,8 @@ download_jellyfin_media() { echo "Downloading Jellyfin media..." cd "${MEDIA_DIR}/temp" - download_meta Jellyfin/all_jf.mp4 - download_meta Jellyfin/PikPak_jf.mp4 + download_meta all_jf.mp4 Jellyfin/ + download_meta PikPak_jf.mp4 Jellyfin/ echo "Extracting Jellyfin media..."