# In the name of Allah, the most Gracious, the most Merciful.
#
#  ▓▓▓▓▓▓▓▓▓▓ 
# ░▓ Author ▓ Abdullah <https://abdullah.today> 
# ░▓▓▓▓▓▓▓▓▓▓ 
# ░░░░░░░░░░ 


# MPD server configuration main file.

# Where your collection is saved?

music_directory		"~/mus"

# Where to save new playlists?

playlist_directory		"~/mus/playlists"

# Where to store the database file?

db_file			"~/.config/mpd/database"

# Where to locate the log file? "syslog" makes MPD use the local syslog daemon

log_file			"syslog"

# Where to save Process ID?

pid_file			"/tmp/mpd.pid"

# Where to store the state file? If killed, MPD will read it to restore the
# previous state.

state_file			"~/.config/mpd/state"

# Where to locate the sticker file? Used to manage dynamic infos attached to
# song

sticker_file			"~/.config/mpd/sticker.sql"

# Where the daemon should listen?

#bind_to_address		"localhost"

# For UNIX socket, uncomment this.

#bind_to_address		"~/.config/mpd/socket"

# For network you should uncomment this line.

bind_to_address		"any"

# Which TCP port?

port				"6600"

# Type of information which is logged. "verbose" for troubleshooting

log_level			"default"

# Settings it to "yes" will put MPD into pause mode after startup. "no" will
# start playback

restore_paused "no"

# This specifies the maximum size of the output buffer to a client. The default is 8192.

max_output_buffer_size "100000"

# Save files in playlists with complete paths. Default is "no"

save_absolute_paths_in_playlists	"yes"

# Tag types that will be scanned for and made available to clients. 

metadata_to_use	"artist,album,title,track,name,genre,date,composer,performer,disc"

# Support automatic update of music database when files are changed in music_directory.

auto_update	"yes"

# Limit the depth of the directories being watched, 0 means only watch the music directory itself. There is no limit by default.

auto_update_depth "3"

# Control if MPD will follow symbolic links pointing outside the music dir. You must recreate the database after changing this option. The default is "yes".

follow_outside_symlinks	"yes"

# Control if MPD will follow symbolic links pointing inside the music dir, potentially adding duplicates to the database. You must recreate the database after changing this option. The default is "yes".

follow_inside_symlinks		"yes"

# If yes, and MPD has been compiled with support for Avahi or Bonjour, service information will be published with Zeroconf. The default is yes.

zeroconf_enabled		"yes"

# If Zeroconf is enabled, this is the service name to publish. This name should be unique to your local network, but name collisions will be properly dealt with. The default is "Music Player".

zeroconf_name			"abdullah.today"

# This setting specifies the type of ReplayGain to use. This setting can have
# the argument "off", "album", "track" or "auto". "auto" is a special mode that
# chooses between "track" and "album" depending on the current state of
# random playback. If random playback is enabled then "track" mode is used.
# See <http://www.replaygain.org> for more details about ReplayGain.
# This setting is off by default.
#
#replaygain			"album"
#
# This setting sets the pre-amp used for files that have ReplayGain tags. By
# default this setting is disabled.
#
#replaygain_preamp		"0"
#
# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
# By default this setting is disabled.
#
replaygain_missing_preamp	"1"
#
# This setting enables or disables ReplayGain limiting.
# MPD calculates actual amplification based on the ReplayGain tags
# and replaygain_preamp / replaygain_missing_preamp setting.
# If replaygain_limit is enabled MPD will never amplify audio signal
# above its original level. If replaygain_limit is disabled such amplification
# might occur. By default this setting is enabled.
#
#replaygain_limit		"yes"
#
# This setting enables on-the-fly normalization volume adjustment. This will
# result in the volume of all playing audio to be adjusted so the output has
# equal "loudness". This setting is disabled by default.
#
volume_normalization		"yes"
#

# Character Encoding
#
# If file or directory names do not display correctly for your locale then you
# may need to modify this setting.
#
filesystem_charset		"UTF-8"


# Plugins

input {
        plugin "curl"
#       proxy "proxy.isp.com:8080"
#       proxy_user "user"
#       proxy_password "password"
}

#audio_output {
#	type		"alsa"
#	name		"mpd alsamixer-output"
#  mixer_type      "software"
##	device		"hw:0,0"	# optional
#	mixer_type      "hardware"	# optional
#	mixer_device	"default"	# optional
#	mixer_control	"PCM"		# optional
#	mixer_index	"0"		# optional
#}
#
# An example of an OSS output:
#
#audio_output {
#	type		"oss"
#	name		"My OSS Device"
#	device		"/dev/dsp"	# optional
#	mixer_type      "hardware"	# optional
#	mixer_device	"/dev/mixer"	# optional
#	mixer_control	"PCM"		# optional
#}
#
# An example of a shout output (for streaming to Icecast):
#
#audio_output {
#	type		"shout"
#	encoder		"vorbis"		# optional
#	name		"My Shout Stream"
#	host		"localhost"
#	port		"8000"
#	mount		"/mpd.ogg"
#	password	"hackme"
#	quality		"5.0"
#	bitrate		"128"
#	format		"44100:16:1"
##	protocol	"icecast2"		# optional
##	user		"source"		# optional
##	description	"My Stream Description"	# optional
##	url		"http://example.com"	# optional
##	genre		"jazz"			# optional
##	public		"no"			# optional
##	timeout		"2"			# optional
##	mixer_type      "software"		# optional
#}
#
# An example of a recorder output:
#
#audio_output {
#	type		"recorder"
#	name		"My recorder"
#	encoder		"vorbis"		# optional, vorbis or lame
#	path		"/var/lib/mpd/recorder/mpd.ogg"
##	quality		"5.0"			# do not define if bitrate is defined
#	bitrate		"128"			# do not define if quality is defined
#	format		"44100:16:1"
#}
#
# An example of a httpd output (built-in HTTP streaming server):
#
audio_output {
	type		"httpd"
	name		"My HTTP Stream"
	encoder		"vorbis"		# optional, vorbis or lame
	port		"8000"
#	bind_to_address	"0.0.0.0"		# optional, IPv4 or IPv6
	quality		"7.0"			# do not define if bitrate is defined
#	bitrate		"128"			# do not define if quality is defined
	format		"44100:16:1"
    always_on   "yes"
    tags        "yes"
	max_clients	"0"			# optional 0=no limit
}
#
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
#
audio_output {
	type		"pulse"
	name		"My Pulse Output"
##	server		"remote_server"		# optional
##	sink		"remote_server_sink"	# optional
  mixer_type "software"
}
#
# An example of a winmm output (Windows multimedia API).
#
#audio_output {
#	type		"winmm"
#	name		"My WinMM output"
##	device		"Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#		or
##	device		"0"		# optional
##	mixer_type	"hardware"	# optional
#}
#
# An example of an openal output.
#
#audio_output {
#	type		"openal"
#	name		"My OpenAL output"
##	device		"Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
#}
#
# An example of an sndio output.
#
#audio_output {
#	type		"sndio"
#	name		"sndio output"
#	mixer_type	"software"
#}
#
# An example of an OS X output:
#
#audio_output {
#	type		"osx"
#	name		"My OS X Device"
##	device		"Built-in Output"	# optional
##	channel_map      "-1,-1,0,1"	# optional
#}
#
## Example "pipe" output:
#
#audio_output {
#	type		"pipe"
#	name		"my pipe"
#	command		"aplay -f cd 2>/dev/null"
## Or if you're want to use AudioCompress
#	command		"AudioCompress -m | aplay -f cd 2>/dev/null"
## Or to send raw PCM stream through PCM:
#	command		"nc example.org 8765"
#	format		"44100:16:2"
#}
#

#audio_output {
#    device "mpd"
#    mixer_control "MPD"
#}

## An example of a null output (for no audio output):
#
#audio_output {
#	type		"null"
#	name		"My Null Output"
#	mixer_type      "none"			# optional
#}
#

audio_output {
    type    "fifo"
    name    "toggle_visualizer"
    path    "/tmp/mpd.fifo"
    format  "44100:16:2"
}
