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 s = m:section(TypedSection, "minidlna", "miniDLNA Settings")
22 o = s:option(Flag, "enabled", translate("Enable:"))
25 function o.cfgvalue(self, section)
26 return luci.sys.init.enabled("minidlna") and self.enabled or self.disabled
29 function o.write(self, section, value)
31 luci.sys.init.enable("minidlna")
32 luci.sys.call("/etc/init.d/minidlna start >/dev/null")
34 luci.sys.call("/etc/init.d/minidlna stop >/dev/null")
35 luci.sys.init.disable("minidlna")
38 return Flag.write(self, section, value)
41 port = s:option(Value, "port", translate("Port:"),
42 translate("Port for HTTP (descriptions, SOAP, media transfer) traffic."))
43 port.datatype = "port"
46 s:option(Value, "interface", translate("Interfaces:"),
47 translate("Network interfaces to serve, comma delimited list."))
49 o = s:option(Value, "friendly_name", translate("Friendly name:"),
50 translate("Set this if you want to customize the name that shows up on your clients."))
52 o.placeholder = "OpenWrt DLNA Server"
54 o = s:option(Value, "db_dir", translate("Database directory:"),
55 translate("Set this if you would like to specify the directory where you want MiniDLNA to store its database and album art cache."))
57 o.placeholder = "/var/cache/minidlna"
59 o = s:option(Value, "log_dir", translate("Log directory:"),
60 translate("Set this if you would like to specify the directory where you want MiniDLNA to store its log file."))
62 o.placeholder = "/var/log"
64 s:option(Flag, "inotify", translate("Enable inotify:"),
65 translate("Set this to enable inotify monitoring to automatically discover new files."))
67 s:option(Flag, "enable_tivo", translate("Enable TIVO:"),
68 translate("Set this to enable support for streaming .jpg and .mp3 files to a TiVo supporting HMO."))
71 o = s:option(Flag, "strict_dlna", translate("Strict to DLNA standard:"),
72 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."))
75 o = s:option(Value, "presentation_url", translate("Presentation URL:"))
77 o.placeholder = "http://192.168.1.1/"
79 o = s:option(Value, "notify_interval", translate("Notify interval:"),
80 translate("Notify interval in seconds."))
81 o.datatype = "uinteger"
84 o = s:option(Value, "serial", translate("Announced serial number:"),
85 translate("Serial number the miniDLNA daemon will report to clients in its XML description."))
86 o.placeholder = "12345678"
88 s:option(Value, "model_number", translate("Announced model number:"),
89 translate("Model number the miniDLNA daemon will report to clients in its XML description."))
92 o = s:option(Value, "minissdpsocket", translate("miniSSDP socket:"),
93 translate("Specify the path to the MiniSSDPd socket."))
95 o.placeholder = "/var/run/minissdpd.sock"
97 o = s:option(ListValue, "root_container", translate("Root container:"))
98 o:value(".", translate("Standard container"))
99 o:value("B", translate("Browse directory"))
100 o:value("M", translate("Music"))
101 o:value("V", translate("Video"))
102 o:value("P", translate("Pictures"))
104 o = s:option(Value, "album_art_names", translate("Album art names:"),
105 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 '/'"))
107 o.placeholder = "Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg"
109 s:option(DynamicList, "media_dir", translate("Media directories:"),
110 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."))