Skip to content

Commit

Permalink
jellyfin: add image selector
Browse files Browse the repository at this point in the history
  • Loading branch information
jjm2473 committed Aug 22, 2024
1 parent 9c6caae commit 24f01cb
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
2 changes: 1 addition & 1 deletion applications/luci-app-jellyfin/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

include $(TOPDIR)/rules.mk

PKG_VERSION:=1.1.10-20240822
PKG_VERSION:=1.2.0-20240822
PKG_RELEASE:=

LUCI_TITLE:=LuCI support for jellyfin
Expand Down
15 changes: 14 additions & 1 deletion applications/luci-app-jellyfin/luasrc/model/cbi/jellyfin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ m = taskd.docker_map("jellyfin", "jellyfin", "/usr/libexec/istorec/jellyfin.sh",
translate("Jellyfin"),
translate("Jellyfin is the volunteer-built media solution that puts you in control of your media. Stream to any device from your own server, with no strings attached. Your media, your server, your way.")
.. translate("Official website:") .. ' <a href=\"https://jellyfin.org/\" target=\"_blank\">https://jellyfin.org/</a>'
.. "<dl><dt>" .. translate("The following models support hardware transcoding without configuration in Jellyfin:") .. "</dt>"
.. "<dl><dt>" .. translate("When using the default image, the following models support hardware transcoding without configuration in Jellyfin:") .. "</dt>"
.. "<dd>- Easepi ARS2</dd>"
.. "<dd>- " .. translate("RK35xx series (e.g. R6S, R5S, R68s, R66s, H28K, etc.) with iStoreOS firmware (version 20221123 and above). Other firmwares require MPP and RGA to be turned on, and are not guaranteed to be available.") .. "</dd>"
.. "<dt>" .. translate("The following models may support hardware transcoding by referring to the official Jellyfin documentation:") .. "</dt>"
Expand All @@ -27,6 +27,19 @@ s = m:section(TypedSection, "jellyfin", translate("Setup"),
s.addremove=false
s.anonymous=true

o = s:option(Value, "image", translate("Image"))
o.datatype = "string"
o:value("", translate("Default"))
if luci.sys.call("grep -q 'rockchip,' /proc/device-tree/compatible 2>/dev/null") == 0 then
o:value("jjm2473/jellyfin-mpp", "jjm2473/jellyfin-mpp")
o:value("nyanmisaka/jellyfin:latest-rockchip", "nyanmisaka/jellyfin:latest-rockchip")
end
o:value("jellyfin/jellyfin", "jellyfin/jellyfin")
o:value("linuxserver/jellyfin", "linuxserver/jellyfin")
if luci.sys.call("uname -m |grep -qw x86_64") == 0 then
o:value("nyanmisaka/jellyfin", "nyanmisaka/jellyfin")
end

o = s:option(Flag, "hostnet", translate("Host network"), translate("Jellyfin running in host network, for DLNA application, port is always 8096 if enabled"))
o.default = 0
o.rmempty = false
Expand Down
10 changes: 8 additions & 2 deletions applications/luci-app-jellyfin/po/zh-cn/jellyfin.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ msgstr "官方网站:"
msgid "Jellyfin is the volunteer-built media solution that puts you in control of your media. Stream to any device from your own server, with no strings attached. Your media, your server, your way."
msgstr "Jellyfin 是志愿者构建的媒体解决方案,可让您控制自己的电影等媒体,并不受任何限制地让您从各种设备去观看您的媒体。"

msgid "The following models support hardware transcoding without configuration in Jellyfin:"
msgstr "以下机型无需在Jellyfin配置即支持硬件转码:"
msgid "When using the default image, the following models support hardware transcoding without configuration in Jellyfin:"
msgstr "当使用默认镜像时以下机型无需在Jellyfin配置即支持硬件转码:"

msgid "RK35xx series (e.g. R6S, R5S, R68s, R66s, H28K, etc.) with iStoreOS firmware (version 20221123 and above). Other firmwares require MPP and RGA to be turned on, and are not guaranteed to be available."
msgstr "RK35xx 系列(例如R6S,R5S,R68s,R66s,H28K等)并使用 iStoreOS 固件(版本20221123及以上)。其他固件需开启MPP和RGA,不保证可用。"
Expand All @@ -22,6 +22,12 @@ msgstr "x86 系列"
msgid "Raspberry Pi series"
msgstr "树莓派系列"

msgid "Image"
msgstr "镜像"

msgid "Default"
msgstr "默认"

msgid "Media path"
msgstr "媒体路径"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

image_name=`uci get jellyfin.@jellyfin[0].image 2>/dev/null`

if [ "$image_name" == "jjm2473/jellyfin-rtk:latest" ]; then
if [ "$image_name" == "jjm2473/jellyfin-rtk:latest" -o "$image_name" == "default" ]; then
uci -q batch <<-EOF >/dev/null
set jellyfin.@jellyfin[0].image="default"
delete jellyfin.@jellyfin[0].image
commit jellyfin
EOF
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ do_install_detail() {
cmd="$cmd\
-t \
--privileged "
for dev in iep rga dri dma_heap mpp_service mpp-service vpu_service vpu-service \
for dev in iep rga dri dma_heap mali0 mpp_service mpp-service vpu_service vpu-service \
hevc_service hevc-service rkvdec rkvenc avsd vepu h265e ; do
[ -e "/dev/$dev" ] && cmd="$cmd --device /dev/$dev"
done
Expand Down

0 comments on commit 24f01cb

Please sign in to comment.