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

main_domain="https://cf.mb6.top/tmp/emby"
echo "docker一键**脚本，适4.9.0.12b版本"
echo "-------------------web端**-------------------"
rm -f /system/Emby.Web.dll
wget -P /system/ "$main_domain/4.9.0.12b/linux_32_64/Emby.Web.dll"
rm -f /system/MediaBrowser.Model.dll
wget -P /system/ "$main_domain/4.9.0.12b/linux_32_64/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.9.0.12b/linux_32_64/dashboard-ui/modules/emby-apiclient/connectionmanager.js"
rm -f /system/dashboard-ui/embypremiere/embypremiere.js
wget -P /system/dashboard-ui/embypremiere/ "$main_domain/4.9.0.12b/linux_32_64/dashboard-ui/embypremiere/embypremiere.js"
echo "web**完成..."
rm -f /system/Emby.Server.Implementations.dll
wget -P /system/ "$main_domain/4.9.0.12b/linux_32_64/Emby.Server.Implementations.dll"
echo "Implementations替换认证..."

echo "尝试修复pgssub字幕问题"
rm -f /system/Emby.Ffmpeg.dll
wget -P /system/ "$main_domain/4.9.0.12b/linux_32_64/Emby.Ffmpeg.dll"
rm -f /system/Emby.Ffmpeg.Lib.dll
wget -P /system/ "$main_domain/4.9.0.12b/linux_32_64/Emby.Ffmpeg.Lib.dll"
rm -f /system/Emby.Server.MediaEncoding.dll
wget -P /system/ "$main_domain/4.9.0.12b/linux_32_64/Emby.Server.MediaEncoding.dll"
