jellyfin: mount /mnt into jellyfin (#7)
* jellyfin: mount /mnt into jellyfin * jellyfin: bind /mnt * jellyfin: bind /mnt * jellyfin: bind /mnt * Update jellyfin.lua * Update jellyfin.htm * Update jellyfin.po
This commit is contained in:
parent
7080b0326e
commit
38d4f6d265
@ -2,8 +2,8 @@
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_VERSION:=1.0.3
|
||||
PKG_RELEASE:=20211103
|
||||
PKG_VERSION:=1.1.0
|
||||
PKG_RELEASE:=20211130
|
||||
|
||||
LUCI_TITLE:=LuCI support for jellyfin
|
||||
LUCI_PKGARCH:=all
|
||||
|
@ -71,7 +71,7 @@ function install_container()
|
||||
local port = luci.http.formvalue("port")
|
||||
|
||||
uci:tset(keyword, "@"..keyword.."[0]", {
|
||||
media_path = media_path or "/mnt/sda1/media",
|
||||
media_path = media_path or "",
|
||||
config_path = config_path or "/root/jellyfin/config",
|
||||
cache_path = cache_path or "",
|
||||
port = port or "8096",
|
||||
@ -147,4 +147,4 @@ end
|
||||
--[[
|
||||
todo
|
||||
网络请求提示框
|
||||
--]]
|
||||
--]]
|
||||
|
@ -100,8 +100,8 @@
|
||||
let config_path = config.value
|
||||
let cache_path = cache.value
|
||||
|
||||
if (media_path == "" || config_path == "") {
|
||||
alert("<%:Media path and Config path could not be empty!%>");
|
||||
if (config_path == "") {
|
||||
alert("<%:Config path could not be empty!%>");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -37,5 +37,5 @@ msgstr "转码缓存路径(选填)"
|
||||
msgid "Port (optional)"
|
||||
msgstr "端口(选填)"
|
||||
|
||||
msgid "Media path and Config path could not be empty!"
|
||||
msgstr "媒体文件路径和配置数据路径不能为空!"
|
||||
msgid "Config path could not be empty!"
|
||||
msgstr "配置数据路径不能为空!"
|
||||
|
@ -17,16 +17,19 @@ install(){
|
||||
local cache=`uci get jellyfin.@jellyfin[0].cache_path 2>/dev/null`
|
||||
local port=`uci get jellyfin.@jellyfin[0].port 2>/dev/null`
|
||||
|
||||
if [ -z "$media" -o -z "$config"]; then
|
||||
echo "media path or config path is empty!" >&2
|
||||
if [ -z "$config"]; then
|
||||
echo "config path is empty!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local cachev
|
||||
[ -z "$cache" ] || cachev="-v $cache:/config/transcodes"
|
||||
[ -z "$cache" ] || cachev='-v "'"$cache:/config/transcodes"'"'
|
||||
|
||||
[ -z "$port" ] && port=8096
|
||||
|
||||
local mediav
|
||||
[ -z "$media" ] || mediav='-v "'"$media:/media"'"'
|
||||
|
||||
docker run --restart=unless-stopped -d \
|
||||
--device /dev/rpc0:/dev/rpc0 \
|
||||
--device /dev/rpc1:/dev/rpc1 \
|
||||
@ -50,7 +53,7 @@ install(){
|
||||
-v /var/tmp/vowb:/var/tmp/vowb \
|
||||
--pid=host \
|
||||
--dns=172.17.0.1 \
|
||||
-p $port:8096 -v "$config:/config" $cachev -v "$media:/media" --name myjellyfin-rtk "$image_name"
|
||||
-p $port:8096 -v "$config:/config" $cachev $mediav -v /mnt:/mnt:rslave --name myjellyfin-rtk "$image_name"
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user