From 814d7d444b89609f5152680367d17a14daaf03cf Mon Sep 17 00:00:00 2001
From: jjm2473 <1129525450@qq.com>
Date: Mon, 14 Nov 2022 12:07:12 +0800
Subject: [PATCH] luci-app-jellyfin: move script to common folder

---
 applications/luci-app-jellyfin/Makefile                       | 2 +-
 applications/luci-app-jellyfin/luasrc/model/cbi/jellyfin.lua  | 2 +-
 .../luci-app-jellyfin/luasrc/view/jellyfin/status.htm         | 4 ++--
 .../jellyfin/install.sh => libexec/istorec/jellyfin.sh}       | 0
 4 files changed, 4 insertions(+), 4 deletions(-)
 rename applications/luci-app-jellyfin/root/usr/{share/jellyfin/install.sh => libexec/istorec/jellyfin.sh} (100%)

diff --git a/applications/luci-app-jellyfin/Makefile b/applications/luci-app-jellyfin/Makefile
index a4f2038..f9d4e82 100644
--- a/applications/luci-app-jellyfin/Makefile
+++ b/applications/luci-app-jellyfin/Makefile
@@ -2,7 +2,7 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_VERSION:=1.1.5-20221110
+PKG_VERSION:=1.1.5-20221114
 PKG_RELEASE:=
 
 LUCI_TITLE:=LuCI support for jellyfin
diff --git a/applications/luci-app-jellyfin/luasrc/model/cbi/jellyfin.lua b/applications/luci-app-jellyfin/luasrc/model/cbi/jellyfin.lua
index 8fbb7f7..10fa318 100644
--- a/applications/luci-app-jellyfin/luasrc/model/cbi/jellyfin.lua
+++ b/applications/luci-app-jellyfin/luasrc/model/cbi/jellyfin.lua
@@ -6,7 +6,7 @@ local taskd = require "luci.model.tasks"
 local jellyfin_model = require "luci.model.jellyfin"
 local m, s, o
 
-m = taskd.docker_map("jellyfin", "jellyfin", "/usr/share/jellyfin/install.sh",
+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>')
diff --git a/applications/luci-app-jellyfin/luasrc/view/jellyfin/status.htm b/applications/luci-app-jellyfin/luasrc/view/jellyfin/status.htm
index 5b45bdc..c7fc31b 100644
--- a/applications/luci-app-jellyfin/luasrc/view/jellyfin/status.htm
+++ b/applications/luci-app-jellyfin/luasrc/view/jellyfin/status.htm
@@ -1,6 +1,6 @@
 <%
 local util  = require "luci.util"
-local container_status = util.trim(util.exec("/usr/share/jellyfin/install.sh status"))
+local container_status = util.trim(util.exec("/usr/libexec/istorec/jellyfin.sh status"))
 local container_install = (string.len(container_status) > 0)
 local container_running = container_status == "running"
 -%>
@@ -16,7 +16,7 @@ local container_running = container_status == "running"
 </div>
 <%
 if container_running then
-    local port=util.trim(util.exec("/usr/share/jellyfin/install.sh port"))
+    local port=util.trim(util.exec("/usr/libexec/istorec/jellyfin.sh port"))
     if port == "" then
         port="8096"
     end
diff --git a/applications/luci-app-jellyfin/root/usr/share/jellyfin/install.sh b/applications/luci-app-jellyfin/root/usr/libexec/istorec/jellyfin.sh
similarity index 100%
rename from applications/luci-app-jellyfin/root/usr/share/jellyfin/install.sh
rename to applications/luci-app-jellyfin/root/usr/libexec/istorec/jellyfin.sh