Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MimeTypeByPath ¶
MimeTypeByPath determines the MIME-type of file at the given path
Types ¶
type Cache ¶
type Cache interface {
Set(key interface{}, value interface{})
Get(key interface{}) (value interface{}, ok bool)
}
type FfprobeCacheItem ¶
Public definition so that external modules can persist cache contents.
type Server ¶
type Server struct {
HTTPConn net.Listener
FriendlyName string
Interfaces []net.Interface
RootObjectPath string
OnBrowseDirectChildren func(path string, rootObjectPath string, host, userAgent string) (ret []interface{}, err error)
OnBrowseMetadata func(path string, rootObjectPath string, host, userAgent string) (ret interface{}, err error)
FFProbeCache Cache
LogHeaders bool
// Disable transcoding, and the resource elements implied in the CDS.
NoTranscode bool
// Force transcoding to certain format of the 'transcodes' map
ForceTranscodeTo string
// Disable media probing with ffprobe
NoProbe bool
Icons []Icon
// Stall event subscription requests until they drop. A workaround for
// some bad clients.
StallEventSubscribe bool
// Time interval between SSPD announces
NotifyInterval time.Duration
// Ignore hidden files and directories
IgnoreHidden bool
// Ignore unreadable files and directories
IgnoreUnreadable bool
// Ignore comma separated list of directories
IgnorePaths []string
// White list of clients
AllowedIpNets []*net.IPNet
// Activate support for dynamic streams configured via .dms.json metadata files
// This feature is not enabled by default, since having write access to a shared media
// folder allows executing arbitrary commands in the context of the DLNA server.
AllowDynamicStreams bool
// pattern where to write transcode logs to. The [tsname] placeholder is replaced with the name
// of the item currently being played. The default is $HOME/.dms/log/[tsname]
TranscodeLogPattern string
Logger log.Logger
// contains filtered or unexported fields
}
func (*Server) IgnorePath ¶
IgnorePath detects if a file/directory should be ignored.
Click to show internal directories.
Click to hide internal directories.