Skip to content

Latest commit

 

History

History
139 lines (103 loc) · 5.2 KB

configuration.adoc

File metadata and controls

139 lines (103 loc) · 5.2 KB

Configuration settings

muserv provides default configuration settings. The only additional configuration that must be made are the music directories.

The completeness and consistency of the configuration can be checked via the command

muserv test

Below, all configuration parameters are described.

Parameter Default Value Description

music_dirs

None. Must be configured.

List of music directories as absolute paths. The muserv system user must have read access. There is no default

separator

;

Some tags can have multiple values. separator contains the string that is used as separator for these values. Often \\ or ; is used.

update_mode

notify

To keep the muserv content up to date if anything in the music directory is changed, muserv provides an update mechanism that runs regularly. update_mode specifies which mode is used for that. Two different modes are possible:

  • notify uses the inotify system of the Linux kernel

  • scan scans the music directory for changes

update_interval

60 (one minute)

Time in seconds after which muserv checks for changes in the music direcrtory.

hierarchies

Latest albums and Genre → AlbumArtist → Album → Track

Here, the content hierarchies that are shown in the UPnP clients are configured. Possible hierarchies are:

  • Genre → AlbumArtist → Album → Track

  • Genre → Artist → Track

  • Genre → Album → Track

  • Genre → Track

  • AlbumArtist → Album → Track

  • Artist → Track

  • Track

UPnP clients show the hierarchies in the same sequence as they are configured here. Some hierarachies are preconfigured. Just adjust or remove them or add additional hierarchies. Each hierarchy needs a name. That’s the name that is also displayed by the clients. The name of the preconfigured hierarchies can be adjusted. Hierarchies are configured as list of levels (in the first hierarchy "Genre" represents one level, for example). For each level two configurations must be made:

  1. type represents the object or tag (genre or track, for example). The type of the last level of each hierarchy must by track.

  2. sort are the sorting criteria. They define how the data is sorted inside that level. It consists of a list of attributes preceded by the character + or - which defines if the sort order is ascending or descending for that attribute. Albums can be sorted by the attributes title, year and lastChange, tracks by the attributes title, year, trackNo, discNo and lastChange. For all other types (genre, albumartist, artist) no attributes are supported. These are just sorted by the content of the coresponding tag.

Example (latest albums by genre):

{
    "name": "Latest Albums by Genre",
    "levels": [
        {
            "type": "genre",
            "sort": ["+"]
        },
        {
            "type": "album",
            "sort": ["-lastChange"]
        },
        {
            "type": "track",
            "sort": ["+discNo","+trackNo"]
        }
    ]
},

Note that within an album, tracks are sorted first by disc number and then by track number. With this configuration, albums with multiple discs can be handled.

show_playlists

true

Whether the playlist hierarchy shall be shown or not. If it shall be shown, it’s listed directy after the other configured hierarchies but before the folder hierarchy (if that is configured to be shown).

playlist_hierarchy_name

Playlists

The name of the playlist hierarchy that is shown by UPnP clients.

show_folders

true

Whether the folder hierarchy shall be shown or not. If it shall be shown, it’s the last hierarchy sequence of hierarchies that UPnP clients display.

folder_hierarchy_name

Folders

The name of the folder hierarchy that is shown by UPnP clients.

Parameter Default Value Description

interfaces

All interfaces are used

Network interfaces to serve.

port

8008

Port for HTTP requests to the server (device and service descriptions, SOAP, media transfer etc.).

server_name

Music Server

Server name that is shown by UPnP clients.

uuid

A new identifier is created

Unique identifier for the server. It must be of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

max_age

86400 (once per day)

Time interval in seconds for the renewal of the alive notification.

device

For each of the (sub) parameters a default value is set.

This clubs together parameters that are required for the XML description of the root device.

cache_dir

/var/cache/muserv

Cache directory for muserv (absolute path). The muserv system user must have write access to this directory.

status_dir

<CACHE-DIR>/status.json

File to persist status information (absolute path).

log_dir

/var/log/muserv

Log directory (absolute path). The muserv system user must have write access to it.

log_level

fatal

Here, the verbosity of the muserv log can be configured. Possible values are (ordered by increasing verbosity): panic, fatal, error, warn, info, debug, trace.