You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
1.6 KiB
Lua
48 lines
1.6 KiB
Lua
1 year ago
|
--[[
|
||
|
LuCI - Lua Configuration Interface
|
||
|
]]--
|
||
|
|
||
|
local taskd = require "luci.model.tasks"
|
||
|
local megamedia_model = require "luci.model.megamedia"
|
||
|
local m, s, o
|
||
|
|
||
|
m = taskd.docker_map("megamedia", "megamedia", "/usr/libexec/apps/megamedia/megamedia.sh",
|
||
|
translate("megamedia"),
|
||
|
translate("MEGA MEDIA SERVER is a bundle of the most popular media manager apps qbittorrent, jellyfin, jackett, raadarr, sonarr, lidarr, and prowlarr. You're welcome.")
|
||
|
.. translate("Official website:") .. ' <a href=\"https://docs.linuxserver.io/images/docker-lidarr/\" target=\"_blank\">https://docs.linuxserver.io/images/docker-lidarr/</a>')
|
||
|
|
||
|
s = m:section(SimpleSection, translate("Service Status"), translate("megamedia status:"))
|
||
|
s:append(Template("megamedia/status"))
|
||
|
|
||
|
s = m:section(TypedSection, "megamedia", translate("Setup"), translate("Refresh to update settings."))
|
||
|
s.addremove=false
|
||
|
s.anonymous=true
|
||
|
|
||
|
o = s:option(Value, "port", translate("Port").."<b>*</b>")
|
||
|
o.rmempty = false
|
||
|
o.default = "9696"
|
||
|
o.datatype = "port"
|
||
|
|
||
|
o = s:option(Value, "image_name", translate("Image").."<b>*</b>")
|
||
|
o.rmempty = false
|
||
|
o.datatype = "string"
|
||
|
o:value("megamedia", "megamedia")
|
||
|
o.default = "megamedia"
|
||
|
|
||
|
local blocks = megamedia_model.blocks()
|
||
|
local home = megamedia_model.home()
|
||
|
|
||
|
o = s:option(Value, "config_path", translate("Root Dir Path").."<b>*</b>")
|
||
|
o.rmempty = false
|
||
|
o.datatype = "string"
|
||
|
o:value("/opt/docker2/compose", "/opt/docker2/compose")
|
||
|
o.default = "/opt/docker2/compose"
|
||
|
|
||
|
local paths, default_path = megamedia_model.find_paths(blocks, home, "Configs")
|
||
|
for _, val in pairs(paths) do
|
||
|
o:value(val, val)
|
||
|
end
|
||
|
o.default = default_path
|
||
|
|
||
|
return m
|