Documentation ¶
Index ¶
Constants ¶
const ( // CfgDir is the directory where the muserv configuration is stored CfgDir = "/etc/muserv" // IconDir is the directory where the muserv icons are stored IconDir = CfgDir + "/icons" )
const ( // TagAlbum is the album tag TagAlbum = "album" // TagAlbumArtist is the album artist tag TagAlbumArtist = "albumartist" // TagArtist is the artist tag TagArtist = "artist" // TagGenre is the genre tag TagGenre = "genre" // TagTrack represents the track in the definition of content hierarchies TagTrack = "track" )
const UserName = "muserv"
UserName is the name of the muserv system user
Variables ¶
This section is empty.
Functions ¶
func IsValidAudioFile ¶
IsValidAudioFile returns true if file has a mime type that is relevant for muserv as per the configuration, otherwise false is returned
func SupportedMimeTypes ¶
func SupportedMimeTypes() (s string)
SupportedMimeTypes assembles a string containing the audio and image mime types that muserv supports. The string is used to set the state variable SpurceProtocolInfo of the connection manager service
Types ¶
type Cfg ¶
type Cfg struct { Cnt cnt `json:"content"` UPnP upnp `json:"upnp"` LogDir string `json:"log_dir"` LogLevel string `json:"log_level"` }
Cfg stores the data from the MuServ configuration file
type Hierarchy ¶
type Hierarchy struct { ID string `json:"id"` Name string `json:"name"` Levels []string `json:"levels"` }
Hierarchy contains the definition of one content hierarchy. Name must not be empty. Either ID or Levels must be filled, but not both. If ID is filled, it's a hierarchy that's defined muserv internally. Those hierarchies cannot be changed. They (can) occur in the config to configure where in the sequence of hierarchies they shall appear. Those hierarchies can be removed without problem. For the other hierarchies, Levels must be set.