Skip to content

Commit

Permalink
Merge pull request #135 from monlor/test
Browse files Browse the repository at this point in the history
fix: 🐛 jellyfin下载路径错误
  • Loading branch information
monlor authored Jun 18, 2024
2 parents b61ea4f + 4617436 commit 1f6465a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions metadata/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ disk_check() {

download_meta() {
file=$1
# 元数据路径
path=${2:-}
echo "Downloading ${file}..."
# 检查历史文件,如果存在残留则删除
if [ -f "${MEDIA_DIR}/temp/${file}.aria2" ]; then
Expand All @@ -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."
Expand Down Expand Up @@ -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..."

Expand All @@ -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..."

Expand Down

0 comments on commit 1f6465a

Please sign in to comment.