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:
练亮斌 2021-12-02 18:50:51 +08:00 committed by GitHub
parent 7080b0326e
commit 38d4f6d265
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 12 deletions

View File

@ -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

View File

@ -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",

View File

@ -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;
}

View File

@ -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 "配置数据路径不能为空!"

View File

@ -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"
}