#!/bin/bash
export LANG=C.UTF-8

main_domain="https://cf.mb6.top/tmp/emby"
echo "docker一键**脚本，适4.7.1版本"
echo "-------------------web端**-------------------"
rm -f /system/Emby.Web.dll
wget -P /system/ "$main_domain/4.7.1.0/linux64_docker_4.7.1/Emby.Web.dll"
rm -f /system/MediaBrowser.Model.dll
wget -P /system/ "$main_domain/4.7.1.0/linux64_docker_4.7.1/MediaBrowser.Model.dll"
echo "核心**完成..."
rm -f /system/dashboard-ui/modules/emby-apiclient/connectionmanager.js
wget -P /system/dashboard-ui/modules/emby-apiclient/ "$main_domain/4.7.1.0/linux64_docker_4.7.1/dashboard-ui/modules/emby-apiclient/connectionmanager.js"
rm -f /system/dashboard-ui/embypremiere/embypremiere.js
wget -P /system/dashboard-ui/embypremiere/ "$main_domain/4.7.1.0/linux64_docker_4.7.1/dashboard-ui/embypremiere/embypremiere.js"
echo "web**完成..."
rm -f /system/Emby.Server.Implementations.dll
wget -P /system/ "$main_domain/4.7.1.0/linux64_docker_4.7.1/Emby.Server.Implementations.dll"
echo "Implementations替换认证..."
# "$main_domain/4.7.1.0/linux64_docker_4.7.1/dashboard-ui/devices/cameraupload.js
# "$main_domain/4.7.1.0/linux64_docker_4.7.1/dashboard-ui/livetvsetup/livetvstatus.js
# "$main_domain/4.7.1.0/linux64_docker_4.7.1/dashboard-ui/network/network.js
# "$main_domain/4.7.1.0/linux64_docker_4.7.1/dashboard-ui/settings/display.js
# "$main_domain/4.7.1.0/linux64_docker_4.7.1/dashboard-ui/transcoding/transcoding.js
echo "美化包替换"
rm -f /system/dashboard-ui/devices/cameraupload.js
wget -P /system/dashboard-ui/devices/ "$main_domain/4.7.1.0/linux64_docker_4.7.1/dashboard-ui/devices/cameraupload.js"
rm -f /system/dashboard-ui/livetvsetup/livetvstatus.js
wget -P /system/dashboard-ui/livetvsetup/ "$main_domain/4.7.1.0/linux64_docker_4.7.1/dashboard-ui/livetvsetup/livetvstatus.js"
rm -f /system/dashboard-ui/network/network.js
wget -P /system/dashboard-ui/network/ "$main_domain/4.7.1.0/linux64_docker_4.7.1/dashboard-ui/network/network.js"
rm -f /system/dashboard-ui/settings/display.js
wget -P /system/dashboard-ui/settings/ "$main_domain/4.7.1.0/linux64_docker_4.7.1/dashboard-ui/settings/display.js"
rm -f /system/dashboard-ui/transcoding/transcoding.js
wget -P /system/dashboard-ui/transcoding/ "$main_domain/4.7.1.0/linux64_docker_4.7.1/dashboard-ui/transcoding/transcoding.js"

echo "完成替换..."
rm -rf synology6-7crack_4.7.1.sh
echo "-------------------删除脚本完成，预防重运行出错-------------------"
