2 LuCI - Lua Configuration Interface - miniDLNA support
4 Copyright 2012 Gabor Juhos <juhosg@openwrt.org>
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
15 m = Map("minidlna", translate("miniDLNA"),
16 translate("MiniDLNA is server software with the aim of being fully compliant with DLNA/UPnP-AV clients."))
18 m:section(SimpleSection).template = "minidlna_status"
20 s = m:section(TypedSection, "minidlna", "miniDLNA Settings")
24 o = s:option(Flag, "enabled", translate("Enable:"))
27 function o.cfgvalue(self, section)
28 return luci.sys.init.enabled("minidlna") and self.enabled or self.disabled
31 function o.write(self, section, value)
33 luci.sys.init.enable("minidlna")
34 luci.sys.call("/etc/init.d/minidlna start >/dev/null")
36 luci.sys.call("/etc/init.d/minidlna stop >/dev/null")
37 luci.sys.init.disable("minidlna")
40 return Flag.write(self, section, value)
43 port = s:option(Value, "port", translate("Port:"),
44 translate("Port for HTTP (descriptions, SOAP, media transfer) traffic."))
45 port.datatype = "port"
48 s:option(Value, "interface", translate("Interfaces:"),
49 translate("Network interfaces to serve, comma delimited list."))
51 o = s:option(Value, "friendly_name", translate("Friendly name:"),
52 translate("Set this if you want to customize the name that shows up on your clients."))
54 o.placeholder = "OpenWrt DLNA Server"
56 o = s:option(Value, "db_dir", translate("Database directory:"),
57 translate("Set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache."))
59 o.placeholder = "/var/cache/minidlna"
61 o = s:option(Value, "log_dir", translate("Log directory:"),
62 translate("Set this if you would like to specify the directory where you want MiniDLNA to store its log file."))
64 o.placeholder = "/var/log"
66 s:option(Flag, "inotify", translate("Enable inotify:"),
67 translate("Set this to enable inotify monitoring to automatically discover new files."))
69 s:option(Flag, "enable_tivo", translate("Enable TIVO:"),
70 translate("Set this to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO."))
73 o = s:option(Flag, "strict_dlna", translate("Strict to DLNA standard:"),
74 translate("Set this to strictly adhere to DLNA standards. This will allow server-side downscaling of very large JPEG images, which may hurt JPEG serving performance on (at least) Sony DLNA products."))
77 o = s:option(Value, "presentation_url", translate("Presentation URL:"))
79 o.placeholder = "http://192.168.1.1/"
81 o = s:option(Value, "notify_interval", translate("Notify interval:"),
82 translate("Notify interval in seconds."))
83 o.datatype = "uinteger"
86 o = s:option(Value, "serial", translate("Announced serial number:"),
87 translate("Serial number the miniDLNA daemon will report to clients in its XML description."))
88 o.placeholder = "12345678"
90 s:option(Value, "model_number", translate("Announced model number:"),
91 translate("Model number the miniDLNA daemon will report to clients in its XML description."))
94 o = s:option(Value, "minissdpsocket", translate("miniSSDP socket:"),
95 translate("Specify the path to the MiniSSDPd socket."))
97 o.placeholder = "/var/run/minissdpd.sock"
99 o = s:option(ListValue, "root_container", translate("Root container:"))
100 o:value(".", translate("Standard container"))
101 o:value("B", translate("Browse directory"))
102 o:value("M", translate("Music"))
103 o:value("V", translate("Video"))
104 o:value("P", translate("Pictures"))
106 o = s:option(Value, "album_art_names", translate("Album art names:"),
107 translate("This is a list of file names to check for when searching for album art. Note: names must be delimited with a forward slash '/'"))
109 o.placeholder = "Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg"
111 s:option(DynamicList, "media_dir", translate("Media directories:"),
112 translate("Set this to the directory you want scanned. If you want to restrict the directory to a specific content type, you can prepend the type ('A' for audio, 'V' for video, 'P' for images), followed by a comma, to the directory (eg. media_dir=A,/mnt/media/Music). Multiple directories can be specified."))