Compare commits
97 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4634b94c83 | ||
![]() |
6e04a327b4 | ||
![]() |
7ec887eea2 | ||
![]() |
1477b64d4f | ||
![]() |
a2c108f5ef | ||
![]() |
f546e76490 | ||
![]() |
2568bc3957 | ||
![]() |
7104ac963b | ||
![]() |
2cb36590b2 | ||
![]() |
af7b928d7c | ||
![]() |
c0d8a9b07a | ||
![]() |
5b0d23d553 | ||
![]() |
ab30695bd1 | ||
![]() |
53a4de35c4 | ||
![]() |
22e6d95c4b | ||
![]() |
1c7bd7d5c4 | ||
![]() |
3c4ed9cbe3 | ||
![]() |
2677b90244 | ||
![]() |
1b20fa441d | ||
![]() |
18c042d4cf | ||
![]() |
98f92d828a | ||
![]() |
76268773b5 | ||
![]() |
87542e3080 | ||
![]() |
66f5b0fed7 | ||
![]() |
5cb603983e | ||
![]() |
9c5790ab1d | ||
![]() |
4b7078297d | ||
![]() |
841694ccf2 | ||
![]() |
12f4a8255a | ||
![]() |
bda77ffc5b | ||
![]() |
ed9ece5ea3 | ||
![]() |
ce49d99c2f | ||
![]() |
2e450bbf95 | ||
![]() |
303b3071e4 | ||
![]() |
eb6d5f34fc | ||
![]() |
f80126959d | ||
![]() |
4fb4f6d1b7 | ||
![]() |
43df4a7500 | ||
![]() |
4cdcaa8630 | ||
![]() |
04f632296f | ||
![]() |
7c8dbcfaac | ||
![]() |
436ba3c96c | ||
![]() |
5d12f52873 | ||
![]() |
a8bf8ede01 | ||
![]() |
8682183bc3 | ||
![]() |
94c31d0da9 | ||
![]() |
464a4cbeec | ||
![]() |
9f0cbf418a | ||
![]() |
b477f86c92 | ||
![]() |
020371f145 | ||
![]() |
ccafe3f3cf | ||
![]() |
3830748de5 | ||
![]() |
1a43f5145d | ||
![]() |
7f143a83c1 | ||
![]() |
6ccc254179 | ||
![]() |
7db2450447 | ||
![]() |
6c2a6a65e0 | ||
![]() |
4247a757b3 | ||
![]() |
57e34823d8 | ||
![]() |
3c93decdf0 | ||
![]() |
89e7a5018d | ||
![]() |
7235b46e5e | ||
![]() |
0852226a48 | ||
![]() |
e20d215abf | ||
![]() |
e4b9b67e24 | ||
![]() |
685b78828d | ||
![]() |
060908d5c4 | ||
![]() |
0b0f4c61f1 | ||
![]() |
228bf7eb09 | ||
![]() |
5eaf2b8fc3 | ||
![]() |
e097fef79e | ||
![]() |
9a813cd3b1 | ||
![]() |
1c60c8e014 | ||
![]() |
eddda95900 | ||
![]() |
72184dccfc | ||
![]() |
fee75dc766 | ||
![]() |
ba5c856f15 | ||
![]() |
12308a0f55 | ||
![]() |
a958abde2f | ||
![]() |
583208db7e | ||
![]() |
7b5ba15170 | ||
![]() |
d5e0d49f86 | ||
![]() |
73b22d82aa | ||
![]() |
db51cc4e02 | ||
![]() |
be8a52a914 | ||
![]() |
ad597a8ff0 | ||
![]() |
b1fe105904 | ||
![]() |
451b142e3a | ||
![]() |
2833625266 | ||
![]() |
0464028872 | ||
![]() |
98985c03b0 | ||
![]() |
793fd8c479 | ||
![]() |
6c602811df | ||
![]() |
6d48a5684a | ||
![]() |
bd115a4008 | ||
![]() |
08272cdee2 | ||
![]() |
b14a5141a6 |
33
NEWS
33
NEWS
@@ -1,3 +1,36 @@
|
|||||||
|
ver 0.21.4 (2019/01/04)
|
||||||
|
* database
|
||||||
|
- inotify: fix crash bug "terminate called after throwing ..."
|
||||||
|
- upnp: implement "list ... group"
|
||||||
|
* output
|
||||||
|
- httpd: declare protocol "HTTP/1.1" instead of "ICY"
|
||||||
|
* remove libwrap support
|
||||||
|
* Windows
|
||||||
|
- fix "Failed to accept connection: unknown error"
|
||||||
|
* fix Haiku build
|
||||||
|
|
||||||
|
ver 0.21.3 (2018/11/16)
|
||||||
|
* output
|
||||||
|
- alsa: fix crash bug
|
||||||
|
- alsa: fix stuttering at start of playback
|
||||||
|
- alsa: fix discarded samples at end of song
|
||||||
|
- alsa: clear error after reopening device
|
||||||
|
* log: default to journal if MPD was started as systemd service
|
||||||
|
|
||||||
|
ver 0.21.2 (2018/11/12)
|
||||||
|
* protocol
|
||||||
|
- operator "=~" matches a regular expression
|
||||||
|
- operator "contains" matches substrings
|
||||||
|
* decoder
|
||||||
|
- ffmpeg: require FFmpeg 3.1 or later
|
||||||
|
- ffmpeg: fix broken sound with certain codecs
|
||||||
|
* output
|
||||||
|
- alsa: fix high CPU usage with dmix
|
||||||
|
- httpd: fix three crash bugs
|
||||||
|
* mixer
|
||||||
|
- alsa: fix more rounding errors
|
||||||
|
* fix zlib support
|
||||||
|
|
||||||
ver 0.21.1 (2018/11/04)
|
ver 0.21.1 (2018/11/04)
|
||||||
* protocol
|
* protocol
|
||||||
- allow escaping quotes in filter expressions
|
- allow escaping quotes in filter expressions
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.musicpd"
|
package="org.musicpd"
|
||||||
android:installLocation="auto"
|
android:installLocation="auto"
|
||||||
android:versionCode="23"
|
android:versionCode="26"
|
||||||
android:versionName="0.21">
|
android:versionName="0.21.4">
|
||||||
|
|
||||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="26"/>
|
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="26"/>
|
||||||
|
|
||||||
|
@@ -38,7 +38,7 @@ author = 'Max Kellermann'
|
|||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.21.1'
|
version = '0.21.4'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = version
|
release = version
|
||||||
|
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
# settings.
|
# settings.
|
||||||
#
|
#
|
||||||
# The special value "syslog" makes MPD use the local syslog daemon. This
|
# The special value "syslog" makes MPD use the local syslog daemon. This
|
||||||
# setting defaults to logging to syslog, otherwise logging is disabled.
|
# setting defaults to logging to syslog.
|
||||||
#
|
#
|
||||||
#log_file "~/.mpd/log"
|
#log_file "~/.mpd/log"
|
||||||
#
|
#
|
||||||
|
145
doc/protocol.rst
145
doc/protocol.rst
@@ -8,7 +8,7 @@ General protocol syntax
|
|||||||
Protocol overview
|
Protocol overview
|
||||||
=================
|
=================
|
||||||
|
|
||||||
The ``MPD`` command protocol exchanges
|
The :program:`MPD` command protocol exchanges
|
||||||
line-based text records between client and server over TCP.
|
line-based text records between client and server over TCP.
|
||||||
Once the client is connected to the server, they conduct a
|
Once the client is connected to the server, they conduct a
|
||||||
conversation until the client closes the connection. The
|
conversation until the client closes the connection. The
|
||||||
@@ -152,10 +152,15 @@ of:
|
|||||||
``VALUE`` in ``AlbumArtist``
|
``VALUE`` in ``AlbumArtist``
|
||||||
and falls back to ``Artist`` tags if
|
and falls back to ``Artist`` tags if
|
||||||
``AlbumArtist`` does not exist.
|
``AlbumArtist`` does not exist.
|
||||||
``VALUE`` is what to find. The
|
``VALUE`` is what to find.
|
||||||
`find` commands specify an exact value
|
|
||||||
and are case-sensitive; the `search`
|
- ``(TAG contains 'VALUE')`` checks if the given value is a substring
|
||||||
commands specify a sub string and ignore case.
|
of the tag value.
|
||||||
|
|
||||||
|
- ``(TAG =~ 'VALUE')`` and ``(TAG !~ 'VALUE')`` use a Perl-compatible
|
||||||
|
regular expression instead of doing a simple string comparison.
|
||||||
|
(This feature is only available if :program:`MPD` was compiled with
|
||||||
|
:file:`libpcre`)
|
||||||
|
|
||||||
- ``(file == 'VALUE')``: match the full song URI
|
- ``(file == 'VALUE')``: match the full song URI
|
||||||
(relative to the music directory).
|
(relative to the music directory).
|
||||||
@@ -184,6 +189,9 @@ of:
|
|||||||
be enclosed in parantheses, e.g. :code:`((artist == 'FOO') AND
|
be enclosed in parantheses, e.g. :code:`((artist == 'FOO') AND
|
||||||
(album == 'BAR'))`
|
(album == 'BAR'))`
|
||||||
|
|
||||||
|
The :command:`find` commands are case sensitive, which
|
||||||
|
:command:`search` and related commands ignore case.
|
||||||
|
|
||||||
Prior to MPD 0.21, the syntax looked like this::
|
Prior to MPD 0.21, the syntax looked like this::
|
||||||
|
|
||||||
find TYPE VALUE
|
find TYPE VALUE
|
||||||
@@ -223,8 +231,7 @@ arguments for you.
|
|||||||
Tags
|
Tags
|
||||||
====
|
====
|
||||||
|
|
||||||
The following tags are supported by
|
The following tags are supported by :program:`MPD`:
|
||||||
``MPD``:
|
|
||||||
|
|
||||||
* **artist**: the artist name. Its meaning is not well-defined; see "*composer*" and "*performer*" for more specific tags.
|
* **artist**: the artist name. Its meaning is not well-defined; see "*composer*" and "*performer*" for more specific tags.
|
||||||
* **artistsort**: same as artist, but for sorting. This usually omits prefixes such as "The".
|
* **artistsort**: same as artist, but for sorting. This usually omits prefixes such as "The".
|
||||||
@@ -250,7 +257,7 @@ The following tags are supported by
|
|||||||
* **musicbrainz_workid**: the work id in the `MusicBrainz <https://picard.musicbrainz.org/docs/mappings/>`_ database.
|
* **musicbrainz_workid**: the work id in the `MusicBrainz <https://picard.musicbrainz.org/docs/mappings/>`_ database.
|
||||||
|
|
||||||
There can be multiple values for some of these tags. For
|
There can be multiple values for some of these tags. For
|
||||||
example, ``MPD`` may return multiple
|
example, :program:`MPD` may return multiple
|
||||||
lines with a ``performer`` tag. A tag value is
|
lines with a ``performer`` tag. A tag value is
|
||||||
a UTF-8 string.
|
a UTF-8 string.
|
||||||
|
|
||||||
@@ -293,16 +300,17 @@ Recipes
|
|||||||
Queuing
|
Queuing
|
||||||
=======
|
=======
|
||||||
|
|
||||||
Often, users run ``MPD`` with :ref:`random <command_random>` enabled,
|
Often, users run :program:`MPD` with :ref:`random <command_random>`
|
||||||
but want to be able to insert songs "before" the rest of the playlist.
|
enabled, but want to be able to insert songs "before" the rest of the
|
||||||
That is commonly called "queuing".
|
playlist. That is commonly called "queuing".
|
||||||
|
|
||||||
``MPD`` implements this by allowing the client to specify a "priority"
|
:program:`MPD` implements this by allowing the client to specify a
|
||||||
for each song in the playlist (commands :ref:`priod <command_prio>`
|
"priority" for each song in the playlist (commands :ref:`priod
|
||||||
and :ref:`priodid <command_prioid>`). A higher priority means that
|
<command_prio>` and :ref:`priodid <command_prioid>`). A higher
|
||||||
the song is going to be played before the other songs.
|
priority means that the song is going to be played before the other
|
||||||
|
songs.
|
||||||
|
|
||||||
In "random" mode, ``MPD`` maintains an
|
In "random" mode, :program:`MPD` maintains an
|
||||||
internal randomized sequence of songs. In this sequence,
|
internal randomized sequence of songs. In this sequence,
|
||||||
songs with a higher priority come first, and all songs with
|
songs with a higher priority come first, and all songs with
|
||||||
the same priority are shuffled (by default, all songs are
|
the same priority are shuffled (by default, all songs are
|
||||||
@@ -327,9 +335,9 @@ Command reference
|
|||||||
commands using song ids should be used instead of the commands
|
commands using song ids should be used instead of the commands
|
||||||
that manipulate and control playback based on playlist
|
that manipulate and control playback based on playlist
|
||||||
position. Using song ids is a safer method when multiple
|
position. Using song ids is a safer method when multiple
|
||||||
clients are interacting with ``MPD``.
|
clients are interacting with :program:`MPD`.
|
||||||
|
|
||||||
Querying ``MPD``'s status
|
Querying :program:`MPD`'s status
|
||||||
================================
|
================================
|
||||||
|
|
||||||
:command:`clearerror`
|
:command:`clearerror`
|
||||||
@@ -344,7 +352,7 @@ Querying ``MPD``'s status
|
|||||||
|
|
||||||
:command:`idle [SUBSYSTEMS...]` [#since_0_14]_
|
:command:`idle [SUBSYSTEMS...]` [#since_0_14]_
|
||||||
Waits until there is a noteworthy change in one or more
|
Waits until there is a noteworthy change in one or more
|
||||||
of ``MPD``'s subsystems. As soon
|
of :program:`MPD`'s subsystems. As soon
|
||||||
as there is one, it lists all changed systems in a line
|
as there is one, it lists all changed systems in a line
|
||||||
in the format ``changed:
|
in the format ``changed:
|
||||||
SUBSYSTEM``, where SUBSYSTEM is one of the
|
SUBSYSTEM``, where SUBSYSTEM is one of the
|
||||||
@@ -353,7 +361,7 @@ Querying ``MPD``'s status
|
|||||||
- ``database``: the song database has been modified after :ref:`update <command_update>`.
|
- ``database``: the song database has been modified after :ref:`update <command_update>`.
|
||||||
- ``update``: a database update has started or finished. If the database was modified during the update, the ``database`` event is also emitted.
|
- ``update``: a database update has started or finished. If the database was modified during the update, the ``database`` event is also emitted.
|
||||||
- ``stored_playlist``: a stored playlist has been modified, renamed, created or deleted
|
- ``stored_playlist``: a stored playlist has been modified, renamed, created or deleted
|
||||||
- ``playlist``: the current playlist has been modified
|
- ``playlist``: the queue (i.e. the current playlist) has been modified
|
||||||
- ``player``: the player has been started, stopped or seeked
|
- ``player``: the player has been started, stopped or seeked
|
||||||
- ``mixer``: the volume has been changed
|
- ``mixer``: the volume has been changed
|
||||||
- ``output``: an audio output has been added, removed or modified (e.g. renamed, enabled or disabled)
|
- ``output``: an audio output has been added, removed or modified (e.g. renamed, enabled or disabled)
|
||||||
@@ -374,11 +382,11 @@ Querying ``MPD``'s status
|
|||||||
to wait for events as long as mpd runs. The
|
to wait for events as long as mpd runs. The
|
||||||
`idle` command can be canceled by
|
`idle` command can be canceled by
|
||||||
sending the command `noidle` (no other
|
sending the command `noidle` (no other
|
||||||
commands are allowed). ``MPD``
|
commands are allowed). :program:`MPD`
|
||||||
will then leave `idle` mode and print
|
will then leave `idle` mode and print
|
||||||
results immediately; might be empty at this time.
|
results immediately; might be empty at this time.
|
||||||
If the optional ``SUBSYSTEMS`` argument
|
If the optional ``SUBSYSTEMS`` argument
|
||||||
is used, ``MPD`` will only send
|
is used, :program:`MPD` will only send
|
||||||
notifications when something changed in one of the
|
notifications when something changed in one of the
|
||||||
specified subsytems.
|
specified subsytems.
|
||||||
|
|
||||||
@@ -388,7 +396,8 @@ Querying ``MPD``'s status
|
|||||||
Reports the current status of the player and the volume
|
Reports the current status of the player and the volume
|
||||||
level.
|
level.
|
||||||
|
|
||||||
- ``volume``: ``0-100`` or ``-1`` if the volume cannot be determined
|
- ``volume``: ``0-100`` (deprecated: ``-1`` if the volume cannot
|
||||||
|
be determined)
|
||||||
- ``repeat``: ``0`` or ``1``
|
- ``repeat``: ``0`` or ``1``
|
||||||
- ``random``: ``0`` or ``1``
|
- ``random``: ``0`` or ``1``
|
||||||
- ``single`` [#since_0_15]_: ``0``, ``1``, or ``oneshot`` [#since_0_21]_
|
- ``single`` [#since_0_15]_: ``0``, ``1``, or ``oneshot`` [#since_0_21]_
|
||||||
@@ -401,6 +410,7 @@ Querying ``MPD``'s status
|
|||||||
- ``nextsong`` [#since_0_15]_: playlist song number of the next song to be played
|
- ``nextsong`` [#since_0_15]_: playlist song number of the next song to be played
|
||||||
- ``nextsongid`` [#since_0_15]_: playlist songid of the next song to be played
|
- ``nextsongid`` [#since_0_15]_: playlist songid of the next song to be played
|
||||||
- ``time``: total time elapsed (of current playing/paused song)
|
- ``time``: total time elapsed (of current playing/paused song)
|
||||||
|
(deprecated, use ``elapsed`` instead)
|
||||||
- ``elapsed`` [#since_0_16]_: Total time elapsed within the current song, but with higher resolution.
|
- ``elapsed`` [#since_0_16]_: Total time elapsed within the current song, but with higher resolution.
|
||||||
- ``duration`` [#since_0_20]_: Duration of the current song in seconds.
|
- ``duration`` [#since_0_20]_: Duration of the current song in seconds.
|
||||||
- ``bitrate``: instantaneous bitrate in kbps
|
- ``bitrate``: instantaneous bitrate in kbps
|
||||||
@@ -411,6 +421,10 @@ Querying ``MPD``'s status
|
|||||||
- ``updating_db``: ``job id``
|
- ``updating_db``: ``job id``
|
||||||
- ``error``: if there is an error, returns message here
|
- ``error``: if there is an error, returns message here
|
||||||
|
|
||||||
|
:program:`MPD` may omit lines which have no (known) value. Older
|
||||||
|
:program:`MPD` versions used to have a "magic" value for
|
||||||
|
"unknown", e.g. ":samp:`volume: -1`".
|
||||||
|
|
||||||
:command:`stats`
|
:command:`stats`
|
||||||
Displays statistics.
|
Displays statistics.
|
||||||
|
|
||||||
@@ -524,8 +538,36 @@ Controlling playback
|
|||||||
:command:`stop`
|
:command:`stop`
|
||||||
Stops playing.
|
Stops playing.
|
||||||
|
|
||||||
The current playlist
|
The Queue
|
||||||
====================
|
=========
|
||||||
|
|
||||||
|
.. note:: The "queue" used to be called "current playlist" or just
|
||||||
|
"playlist", but that was deemed confusing, because
|
||||||
|
"playlists" are also files containing a sequence of songs.
|
||||||
|
Those "playlist files" or "stored playlists" can be
|
||||||
|
:ref:`loaded into the queue <command_load>` and the queue
|
||||||
|
can be :ref:`saved into a playlist file <command_save>`, but
|
||||||
|
they are not to be confused with the queue.
|
||||||
|
|
||||||
|
Many of the command names in this section reflect the old
|
||||||
|
naming convention, but for the sake of compatibility, we
|
||||||
|
cannot rename commands.
|
||||||
|
|
||||||
|
There are two ways to address songs within the queue: by their
|
||||||
|
position and by their id.
|
||||||
|
|
||||||
|
The position is a 0-based index. It is unstable by design: if you
|
||||||
|
move, delete or insert songs, all following indices will change, and a
|
||||||
|
client can never be sure what song is behind a given index/position.
|
||||||
|
|
||||||
|
Song ids on the other hand are stable: an id is assigned to a song
|
||||||
|
when it is added, and will stay the same, no matter how much it is
|
||||||
|
moved around. Adding the same song twice will assign different ids to
|
||||||
|
them, and a deleted-and-readded song will have a new id. This way, a
|
||||||
|
client can always be sure the correct song is being used.
|
||||||
|
|
||||||
|
Many commands come in two flavors, one for each address type.
|
||||||
|
Whenever possible, ids should be used.
|
||||||
|
|
||||||
:command:`add {URI}`
|
:command:`add {URI}`
|
||||||
Adds the file ``URI`` to the playlist
|
Adds the file ``URI`` to the playlist
|
||||||
@@ -541,7 +583,7 @@ The current playlist
|
|||||||
OK
|
OK
|
||||||
|
|
||||||
:command:`clear`
|
:command:`clear`
|
||||||
Clears the current playlist.
|
Clears the queue.
|
||||||
|
|
||||||
.. _command_delete:
|
.. _command_delete:
|
||||||
|
|
||||||
@@ -566,13 +608,13 @@ The current playlist
|
|||||||
|
|
||||||
:command:`playlist`
|
:command:`playlist`
|
||||||
|
|
||||||
Displays the current playlist.
|
Displays the queue.
|
||||||
|
|
||||||
Do not use this, instead use :ref:`playlistinfo
|
Do not use this, instead use :ref:`playlistinfo
|
||||||
<command_playlistinfo>`.
|
<command_playlistinfo>`.
|
||||||
|
|
||||||
:command:`playlistfind {TAG} {NEEDLE}`
|
:command:`playlistfind {TAG} {NEEDLE}`
|
||||||
Finds songs in the current playlist with strict
|
Finds songs in the queue with strict
|
||||||
matching.
|
matching.
|
||||||
|
|
||||||
:command:`playlistid {SONGID}`
|
:command:`playlistid {SONGID}`
|
||||||
@@ -590,7 +632,7 @@ The current playlist
|
|||||||
|
|
||||||
:command:`playlistsearch {TAG} {NEEDLE}`
|
:command:`playlistsearch {TAG} {NEEDLE}`
|
||||||
Searches case-insensitively for partial matches in the
|
Searches case-insensitively for partial matches in the
|
||||||
current playlist.
|
queue.
|
||||||
|
|
||||||
:command:`plchanges {VERSION} [START:END]`
|
:command:`plchanges {VERSION} [START:END]`
|
||||||
Displays changed songs currently in the playlist since
|
Displays changed songs currently in the playlist since
|
||||||
@@ -627,7 +669,7 @@ The current playlist
|
|||||||
but address the songs with their id.
|
but address the songs with their id.
|
||||||
|
|
||||||
:command:`rangeid {ID} {START:END}` [#since_0_19]_
|
:command:`rangeid {ID} {START:END}` [#since_0_19]_
|
||||||
Since ``MPD``
|
Since :program:`MPD`
|
||||||
0.19 Specifies the portion of the
|
0.19 Specifies the portion of the
|
||||||
song that shall be played. ``START`` and
|
song that shall be played. ``START`` and
|
||||||
``END`` are offsets in seconds
|
``END`` are offsets in seconds
|
||||||
@@ -637,7 +679,7 @@ The current playlist
|
|||||||
playing cannot be manipulated this way.
|
playing cannot be manipulated this way.
|
||||||
|
|
||||||
:command:`shuffle [START:END]`
|
:command:`shuffle [START:END]`
|
||||||
Shuffles the current playlist.
|
Shuffles the queue.
|
||||||
``START:END`` is optional and specifies
|
``START:END`` is optional and specifies
|
||||||
a range of songs.
|
a range of songs.
|
||||||
|
|
||||||
@@ -691,6 +733,8 @@ remote playlists (absolute URI with a supported scheme).
|
|||||||
between clients and the server, clients should not
|
between clients and the server, clients should not
|
||||||
compare this value with their local clock.
|
compare this value with their local clock.
|
||||||
|
|
||||||
|
.. _command_load:
|
||||||
|
|
||||||
:command:`load {NAME} [START:END]`
|
:command:`load {NAME} [START:END]`
|
||||||
Loads the playlist into the current queue. Playlist
|
Loads the playlist into the current queue. Playlist
|
||||||
plugins are supported. A range may be specified to load
|
plugins are supported. A range may be specified to load
|
||||||
@@ -721,8 +765,10 @@ remote playlists (absolute URI with a supported scheme).
|
|||||||
Removes the playlist `NAME.m3u` from
|
Removes the playlist `NAME.m3u` from
|
||||||
the playlist directory.
|
the playlist directory.
|
||||||
|
|
||||||
|
.. _command_save:
|
||||||
|
|
||||||
:command:`save {NAME}`
|
:command:`save {NAME}`
|
||||||
Saves the current playlist to
|
Saves the queue to
|
||||||
`NAME.m3u` in the playlist directory.
|
`NAME.m3u` in the playlist directory.
|
||||||
|
|
||||||
The music database
|
The music database
|
||||||
@@ -807,7 +853,7 @@ The music database
|
|||||||
:command:`list {TYPE} {FILTER} [group {GROUPTYPE}]`
|
:command:`list {TYPE} {FILTER} [group {GROUPTYPE}]`
|
||||||
Lists unique tags values of the specified type.
|
Lists unique tags values of the specified type.
|
||||||
``TYPE`` can be any tag supported by
|
``TYPE`` can be any tag supported by
|
||||||
``MPD`` or
|
:program:`MPD` or
|
||||||
*file*.
|
*file*.
|
||||||
|
|
||||||
Additional arguments may specify a :ref:`filter <filter_syntax>`.
|
Additional arguments may specify a :ref:`filter <filter_syntax>`.
|
||||||
@@ -826,10 +872,10 @@ The music database
|
|||||||
``URI``.
|
``URI``.
|
||||||
|
|
||||||
Do not use this command. Do not manage a client-side
|
Do not use this command. Do not manage a client-side
|
||||||
copy of ``MPD``'s database. That
|
copy of :program:`MPD`'s database. That
|
||||||
is fragile and adds huge overhead. It will break with
|
is fragile and adds huge overhead. It will break with
|
||||||
large databases. Instead, query
|
large databases. Instead, query
|
||||||
``MPD`` whenever you need
|
:program:`MPD` whenever you need
|
||||||
something.
|
something.
|
||||||
|
|
||||||
.. _command_listallinfo:
|
.. _command_listallinfo:
|
||||||
@@ -840,16 +886,16 @@ The music database
|
|||||||
as :ref:`lsinfo <command_lsinfo>`
|
as :ref:`lsinfo <command_lsinfo>`
|
||||||
|
|
||||||
Do not use this command. Do not manage a client-side
|
Do not use this command. Do not manage a client-side
|
||||||
copy of ``MPD``'s database. That
|
copy of :program:`MPD`'s database. That
|
||||||
is fragile and adds huge overhead. It will break with
|
is fragile and adds huge overhead. It will break with
|
||||||
large databases. Instead, query
|
large databases. Instead, query
|
||||||
``MPD`` whenever you need
|
:program:`MPD` whenever you need
|
||||||
something.
|
something.
|
||||||
|
|
||||||
:command:`listfiles {URI}`
|
:command:`listfiles {URI}`
|
||||||
Lists the contents of the directory
|
Lists the contents of the directory
|
||||||
``URI``, including files are not
|
``URI``, including files are not
|
||||||
recognized by ``MPD``.
|
recognized by :program:`MPD`.
|
||||||
``URI`` can be a path relative to the
|
``URI`` can be a path relative to the
|
||||||
music directory or an URI understood by one of the
|
music directory or an URI understood by one of the
|
||||||
storage plugins. The response contains at least one
|
storage plugins. The response contains at least one
|
||||||
@@ -956,7 +1002,7 @@ Multiple storages can be "mounted" together, similar to the
|
|||||||
`mount` command on many operating
|
`mount` command on many operating
|
||||||
systems, but without cooperation from the kernel. No
|
systems, but without cooperation from the kernel. No
|
||||||
superuser privileges are necessary, beause this mapping exists
|
superuser privileges are necessary, beause this mapping exists
|
||||||
only inside the ``MPD`` process
|
only inside the :program:`MPD` process
|
||||||
|
|
||||||
.. _command_mount:
|
.. _command_mount:
|
||||||
|
|
||||||
@@ -999,15 +1045,15 @@ Stickers
|
|||||||
|
|
||||||
"Stickers" [#since_0_15]_ are pieces of
|
"Stickers" [#since_0_15]_ are pieces of
|
||||||
information attached to existing
|
information attached to existing
|
||||||
``MPD`` objects (e.g. song files,
|
:program:`MPD` objects (e.g. song files,
|
||||||
directories, albums). Clients can create arbitrary name/value
|
directories, albums). Clients can create arbitrary name/value
|
||||||
pairs. ``MPD`` itself does not assume
|
pairs. :program:`MPD` itself does not assume
|
||||||
any special meaning in them.
|
any special meaning in them.
|
||||||
|
|
||||||
The goal is to allow clients to share additional (possibly
|
The goal is to allow clients to share additional (possibly
|
||||||
dynamic) information about songs, which is neither stored on
|
dynamic) information about songs, which is neither stored on
|
||||||
the client (not available to other clients), nor stored in the
|
the client (not available to other clients), nor stored in the
|
||||||
song files (``MPD`` has no write
|
song files (:program:`MPD` has no write
|
||||||
access).
|
access).
|
||||||
|
|
||||||
Client developers should create a standard for common sticker
|
Client developers should create a standard for common sticker
|
||||||
@@ -1049,14 +1095,21 @@ Connection settings
|
|||||||
===================
|
===================
|
||||||
|
|
||||||
:command:`close`
|
:command:`close`
|
||||||
Closes the connection to ``MPD``.
|
Closes the connection to :program:`MPD`.
|
||||||
``MPD`` will try to send the
|
:program:`MPD` will try to send the
|
||||||
remaining output buffer before it actually closes the
|
remaining output buffer before it actually closes the
|
||||||
connection, but that cannot be guaranteed. This command
|
connection, but that cannot be guaranteed. This command
|
||||||
will not generate a response.
|
will not generate a response.
|
||||||
|
|
||||||
|
Clients should not use this command; instead, they should just
|
||||||
|
close the socket.
|
||||||
|
|
||||||
:command:`kill`
|
:command:`kill`
|
||||||
Kills ``MPD``.
|
Kills :program:`MPD`.
|
||||||
|
|
||||||
|
Do not use this command. Send ``SIGTERM`` to :program:`MPD`
|
||||||
|
instead, or better: let your service manager handle :program:`MPD`
|
||||||
|
shutdown (e.g. :command:`systemctl stop mpd`).
|
||||||
|
|
||||||
:command:`password {PASSWORD}`
|
:command:`password {PASSWORD}`
|
||||||
This is used for authentication with the server.
|
This is used for authentication with the server.
|
||||||
@@ -1090,7 +1143,7 @@ Connection settings
|
|||||||
|
|
||||||
:command:`tagtypes clear`
|
:command:`tagtypes clear`
|
||||||
Clear the list of tag types this client is interested
|
Clear the list of tag types this client is interested
|
||||||
in. This means that ``MPD`` will
|
in. This means that :program:`MPD` will
|
||||||
not send any tags to this client.
|
not send any tags to this client.
|
||||||
|
|
||||||
:command:`tagtypes all`
|
:command:`tagtypes all`
|
||||||
|
74
doc/user.rst
74
doc/user.rst
@@ -67,6 +67,7 @@ For example, the following installs a fairly complete list of build dependencies
|
|||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
apt install g++ \
|
apt install g++ \
|
||||||
|
libpcre3-dev \
|
||||||
libmad0-dev libmpg123-dev libid3tag0-dev \
|
libmad0-dev libmpg123-dev libid3tag0-dev \
|
||||||
libflac-dev libvorbis-dev libopus-dev \
|
libflac-dev libvorbis-dev libopus-dev \
|
||||||
libadplug-dev libaudiofile-dev libsndfile1-dev libfaad-dev \
|
libadplug-dev libaudiofile-dev libsndfile1-dev libfaad-dev \
|
||||||
@@ -87,7 +88,7 @@ For example, the following installs a fairly complete list of build dependencies
|
|||||||
libupnp-dev \
|
libupnp-dev \
|
||||||
libavahi-client-dev \
|
libavahi-client-dev \
|
||||||
libsqlite3-dev \
|
libsqlite3-dev \
|
||||||
libsystemd-dev libwrap0-dev \
|
libsystemd-dev \
|
||||||
libgtest-dev \
|
libgtest-dev \
|
||||||
libboost-dev \
|
libboost-dev \
|
||||||
libicu-dev
|
libicu-dev
|
||||||
@@ -275,7 +276,9 @@ You can also use multiple storage plugins to assemble a virtual music directory
|
|||||||
Configuring database plugins
|
Configuring database plugins
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
If a music directory is configured, one database plugin is used. To configure this plugin, add a database block to :file:`mpd.conf`:
|
If a music directory is configured, one database plugin is used. To
|
||||||
|
configure this plugin, add a :code:`database` block to
|
||||||
|
:file:`mpd.conf`:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
@@ -290,7 +293,9 @@ reference.
|
|||||||
Configuring neighbor plugins
|
Configuring neighbor plugins
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
All neighbor plugins are disabled by default to avoid unwanted overhead. To enable (and configure) a plugin, add a neighbor block to :file:`mpd.conf`:
|
All neighbor plugins are disabled by default to avoid unwanted
|
||||||
|
overhead. To enable (and configure) a plugin, add a :code:`neighbor`
|
||||||
|
block to :file:`mpd.conf`:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
@@ -303,7 +308,8 @@ More information can be found in the :ref:`neighbor_plugin` reference.
|
|||||||
Configuring input plugins
|
Configuring input plugins
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
To configure an input plugin, add a input block to :file:`mpd.conf`:
|
To configure an input plugin, add an :code:`input` block to
|
||||||
|
:file:`mpd.conf`:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
@@ -331,7 +337,8 @@ More information can be found in the :ref:`input_plugins` reference.
|
|||||||
Configuring decoder plugins
|
Configuring decoder plugins
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
Most decoder plugins do not need any special configuration. To configure a decoder, add a decoder block to :file:`mpd.conf`:
|
Most decoder plugins do not need any special configuration. To
|
||||||
|
configure a decoder, add a :code:`decoder` block to :file:`mpd.conf`:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
@@ -367,7 +374,8 @@ Configuring audio outputs
|
|||||||
|
|
||||||
Audio outputs are devices which actually play the audio chunks produced by :program:`MPD`. You can configure any number of audio output devices, but there must be at least one. If none is configured, :program:`MPD` attempts to auto-detect. Usually, this works quite well with ALSA, OSS and on Mac OS X.
|
Audio outputs are devices which actually play the audio chunks produced by :program:`MPD`. You can configure any number of audio output devices, but there must be at least one. If none is configured, :program:`MPD` attempts to auto-detect. Usually, this works quite well with ALSA, OSS and on Mac OS X.
|
||||||
|
|
||||||
To configure an audio output manually, add one or more audio_output blocks to :file:`mpd.conf`:
|
To configure an audio output manually, add one or more
|
||||||
|
:code:`audio_output` blocks to :file:`mpd.conf`:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
@@ -405,14 +413,21 @@ The following table lists the audio_output options valid for all plugins:
|
|||||||
* - **always_on yes|no**
|
* - **always_on yes|no**
|
||||||
- If set to yes, then :program:`MPD` attempts to keep this audio output always open. This may be useful for streaming servers, when you don't want to disconnect all listeners even when playback is accidentally stopped.
|
- If set to yes, then :program:`MPD` attempts to keep this audio output always open. This may be useful for streaming servers, when you don't want to disconnect all listeners even when playback is accidentally stopped.
|
||||||
* - **mixer_type hardware|software|null|none**
|
* - **mixer_type hardware|software|null|none**
|
||||||
- Specifies which mixer should be used for this audio output: the hardware mixer (available for ALSA :ref:`alsa_plugin`, OSS :ref:`oss_plugin` and PulseAudio :ref:`pulse_plugin`), the software mixer, the "null" mixer (null; allows setting the volume, but with no effect; this can be used as a trick to implement an external mixer :ref:`external_mixer`) or no mixer (none). By default, the hardware mixer is used for devices which support it, and none for the others.
|
- Specifies which mixer should be used for this audio output: the
|
||||||
|
hardware mixer (available for ALSA :ref:`alsa_plugin`, OSS
|
||||||
|
:ref:`oss_plugin` and PulseAudio :ref:`pulse_plugin`), the
|
||||||
|
software mixer, the ":samp:`null`" mixer (allows setting the
|
||||||
|
volume, but with no effect; this can be used as a trick to
|
||||||
|
implement an external mixer :ref:`external_mixer`) or no mixer
|
||||||
|
(:samp:`none`). By default, the hardware mixer is used for
|
||||||
|
devices which support it, and none for the others.
|
||||||
|
|
||||||
Configuring filters
|
Configuring filters
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
Filters are plugins which modify an audio stream.
|
Filters are plugins which modify an audio stream.
|
||||||
|
|
||||||
To configure a filter, add a filter block to :file:`mpd.conf`:
|
To configure a filter, add a :code:`filter` block to :file:`mpd.conf`:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
@@ -437,9 +452,12 @@ The following table lists the filter options valid for all plugins:
|
|||||||
Configuring playlist plugins
|
Configuring playlist plugins
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
Playlist plugins are used to load remote playlists (protocol commands load, listplaylist and listplaylistinfo). This is not related to :program:`MPD`'s playlist directory.
|
Playlist plugins are used to load remote playlists (protocol commands
|
||||||
|
load, listplaylist and listplaylistinfo). This is not related to
|
||||||
|
:program:`MPD`'s :ref:`playlist directory <stored_playlists>`.
|
||||||
|
|
||||||
To configure a playlist plugin, add a playlist_plugin block to :file:`mpd.conf`:
|
To configure a playlist plugin, add a :code:`playlist_plugin` block to
|
||||||
|
:file:`mpd.conf`:
|
||||||
|
|
||||||
.. code-block:: none
|
.. code-block:: none
|
||||||
|
|
||||||
@@ -816,10 +834,16 @@ The queue
|
|||||||
|
|
||||||
The queue (sometimes called "current playlist") is a list of songs to be played by :program:`MPD`. To play a song, add it to the queue and start playback. Most clients offer an interface to edit the queue.
|
The queue (sometimes called "current playlist") is a list of songs to be played by :program:`MPD`. To play a song, add it to the queue and start playback. Most clients offer an interface to edit the queue.
|
||||||
|
|
||||||
|
.. _stored_playlists:
|
||||||
|
|
||||||
Stored Playlists
|
Stored Playlists
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
Stored playlists are some kind of secondary playlists which can be created, saved, edited and deleted by the client. They are addressed by their names. Its contents can be loaded into the queue, to be played back. The playlist_directory setting specifies where those playlists are stored.
|
Stored playlists are some kind of secondary playlists which can be
|
||||||
|
created, saved, edited and deleted by the client. They are addressed
|
||||||
|
by their names. Its contents can be loaded into the queue, to be
|
||||||
|
played back. The :code:`playlist_directory` setting specifies where
|
||||||
|
those playlists are stored.
|
||||||
|
|
||||||
Advanced usage
|
Advanced usage
|
||||||
**************
|
**************
|
||||||
@@ -859,9 +883,11 @@ Obey the "format" row, which indicates that the current playback format is 16 bi
|
|||||||
Check list for bit-perfect playback:
|
Check list for bit-perfect playback:
|
||||||
|
|
||||||
* Use the ALSA output plugin.
|
* Use the ALSA output plugin.
|
||||||
* Disable sound processing inside ALSA by configuring a "hardware" device (hw:0,0 or similar).
|
* Disable sound processing inside ALSA by configuring a "hardware"
|
||||||
* Don't use software volume (setting mixer_type).
|
device (:samp:`hw:0,0` or similar).
|
||||||
* Don't force :program:`MPD` to use a specific audio format (settings format, audio_output_format).
|
* Don't use software volume (setting :code:`mixer_type`).
|
||||||
|
* Don't force :program:`MPD` to use a specific audio format (settings
|
||||||
|
:code:`format`, :code:`audio_output_format`).
|
||||||
* Verify that you are really doing bit-perfect playback using :program:`MPD`'s verbose log and :file:`/proc/asound/card*/pcm*p/sub*/hw_params`. Some DACs can also indicate the audio format.
|
* Verify that you are really doing bit-perfect playback using :program:`MPD`'s verbose log and :file:`/proc/asound/card*/pcm*p/sub*/hw_params`. Some DACs can also indicate the audio format.
|
||||||
|
|
||||||
Direct Stream Digital (DSD)
|
Direct Stream Digital (DSD)
|
||||||
@@ -876,7 +902,11 @@ DSD (`Direct Stream Digital <https://en.wikipedia.org/wiki/Direct_Stream_Digital
|
|||||||
* DoP (DSD over PCM) playback. This wraps DSD inside fake 24 bit PCM according to the DoP standard. Requires a DAC that supports DSD. No support from ALSA and the sound chip required (except for bit-perfect 24 bit PCM support).
|
* DoP (DSD over PCM) playback. This wraps DSD inside fake 24 bit PCM according to the DoP standard. Requires a DAC that supports DSD. No support from ALSA and the sound chip required (except for bit-perfect 24 bit PCM support).
|
||||||
* Convert DSD to PCM on-the-fly.
|
* Convert DSD to PCM on-the-fly.
|
||||||
|
|
||||||
Native DSD playback is used automatically if available. DoP is only used if enabled explicitly using the dop option, because there is no way for :program:`MPD` to find out whether the DAC supports it. DSD to PCM conversion is the fallback if DSD cannot be used directly.
|
Native DSD playback is used automatically if available. DoP is only
|
||||||
|
used if enabled explicitly using the :code:`dop` option, because there
|
||||||
|
is no way for :program:`MPD` to find out whether the DAC supports
|
||||||
|
it. DSD to PCM conversion is the fallback if DSD cannot be used
|
||||||
|
directly.
|
||||||
|
|
||||||
Client Hacks
|
Client Hacks
|
||||||
************
|
************
|
||||||
@@ -967,7 +997,16 @@ All :program:`MPD` crashes are bugs which must be fixed by a developer, and you
|
|||||||
|
|
||||||
A crash bug report needs to contain a "backtrace".
|
A crash bug report needs to contain a "backtrace".
|
||||||
|
|
||||||
First of all, your :program:`MPD` executable must not be "stripped" (i.e. debug information deleted). The executables shipped with Linux distributions are usually stripped, but some have so-called "debug" packages (package mpd-dbg or mpd-dbgsym on Debian, mpd-debug on other distributions). Make sure this package is installed.
|
First of all, your :program:`MPD` executable must not be "stripped"
|
||||||
|
(i.e. debug information deleted). The executables shipped with Linux
|
||||||
|
distributions are usually stripped, but some have so-called "debug"
|
||||||
|
packages (package :file:`mpd-dbgsym` or :file:`mpd-dbg` on Debian,
|
||||||
|
:file:`mpd-debug` on other distributions). Make sure this package is
|
||||||
|
installed.
|
||||||
|
|
||||||
|
If you built :program:`MPD` from sources, please recompile with Meson
|
||||||
|
option ":code:`--buildtype=debug -Db_ndebug=false`", because this will
|
||||||
|
add more helpful information to the backtrace.
|
||||||
|
|
||||||
You can extract the backtrace from a core dump, or by running :program:`MPD` in a debugger, e.g.:
|
You can extract the backtrace from a core dump, or by running :program:`MPD` in a debugger, e.g.:
|
||||||
|
|
||||||
@@ -976,4 +1015,5 @@ You can extract the backtrace from a core dump, or by running :program:`MPD` in
|
|||||||
gdb --args mpd --stdout --no-daemon --verbose
|
gdb --args mpd --stdout --no-daemon --verbose
|
||||||
run
|
run
|
||||||
|
|
||||||
As soon as you have reproduced the crash, type "bt" on the gdb command prompt. Copy the output to your bug report.
|
As soon as you have reproduced the crash, type ":command:`bt`" on the
|
||||||
|
gdb command prompt. Copy the output to your bug report.
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
project(
|
project(
|
||||||
'mpd',
|
'mpd',
|
||||||
['c', 'cpp'],
|
['c', 'cpp'],
|
||||||
version: '0.21.1',
|
version: '0.21.4',
|
||||||
meson_version: '>= 0.47.2',
|
meson_version: '>= 0.47.2',
|
||||||
default_options: [
|
default_options: [
|
||||||
'c_std=c99',
|
'c_std=c99',
|
||||||
@@ -20,7 +20,7 @@ conf.set_quoted('PACKAGE', meson.project_name())
|
|||||||
conf.set_quoted('PACKAGE_NAME', meson.project_name())
|
conf.set_quoted('PACKAGE_NAME', meson.project_name())
|
||||||
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
|
||||||
conf.set_quoted('VERSION', meson.project_version())
|
conf.set_quoted('VERSION', meson.project_version())
|
||||||
conf.set_quoted('PROTOCOL_VERSION', '0.21.0')
|
conf.set_quoted('PROTOCOL_VERSION', '0.21.4')
|
||||||
conf.set_quoted('SYSTEM_CONFIG_FILE_LOCATION', join_paths(get_option('prefix'), get_option('sysconfdir'), 'mpd.conf'))
|
conf.set_quoted('SYSTEM_CONFIG_FILE_LOCATION', join_paths(get_option('prefix'), get_option('sysconfdir'), 'mpd.conf'))
|
||||||
|
|
||||||
common_cppflags = [
|
common_cppflags = [
|
||||||
@@ -99,7 +99,7 @@ is_linux = host_machine.system() == 'linux'
|
|||||||
is_android = get_option('android_ndk') != ''
|
is_android = get_option('android_ndk') != ''
|
||||||
is_darwin = host_machine.system() == 'darwin'
|
is_darwin = host_machine.system() == 'darwin'
|
||||||
is_windows = host_machine.system() == 'windows'
|
is_windows = host_machine.system() == 'windows'
|
||||||
is_haiku = host_machine.system() == 'haiku' # TODO is this correct?
|
is_haiku = host_machine.system() == 'haiku'
|
||||||
|
|
||||||
if is_android
|
if is_android
|
||||||
common_cppflags += '-DANDROID'
|
common_cppflags += '-DANDROID'
|
||||||
@@ -312,9 +312,9 @@ subdir('src/lib/curl')
|
|||||||
subdir('src/lib/expat')
|
subdir('src/lib/expat')
|
||||||
subdir('src/lib/ffmpeg')
|
subdir('src/lib/ffmpeg')
|
||||||
subdir('src/lib/gcrypt')
|
subdir('src/lib/gcrypt')
|
||||||
subdir('src/lib/wrap')
|
|
||||||
subdir('src/lib/nfs')
|
subdir('src/lib/nfs')
|
||||||
subdir('src/lib/oss')
|
subdir('src/lib/oss')
|
||||||
|
subdir('src/lib/pcre')
|
||||||
subdir('src/lib/pulse')
|
subdir('src/lib/pulse')
|
||||||
subdir('src/lib/sndio')
|
subdir('src/lib/sndio')
|
||||||
subdir('src/lib/sqlite')
|
subdir('src/lib/sqlite')
|
||||||
@@ -431,7 +431,6 @@ mpd = build_target(
|
|||||||
systemd_dep,
|
systemd_dep,
|
||||||
sqlite_dep,
|
sqlite_dep,
|
||||||
zeroconf_dep,
|
zeroconf_dep,
|
||||||
libwrap_dep,
|
|
||||||
more_deps,
|
more_deps,
|
||||||
],
|
],
|
||||||
link_args: link_args,
|
link_args: link_args,
|
||||||
|
@@ -175,7 +175,7 @@ option('dbus', type: 'feature', description: 'D-Bus support')
|
|||||||
option('expat', type: 'feature', description: 'Expat XML support')
|
option('expat', type: 'feature', description: 'Expat XML support')
|
||||||
option('icu', type: 'feature', description: 'Use libicu for Unicode')
|
option('icu', type: 'feature', description: 'Use libicu for Unicode')
|
||||||
option('iconv', type: 'feature', description: 'Use iconv() for character set conversion')
|
option('iconv', type: 'feature', description: 'Use iconv() for character set conversion')
|
||||||
option('libwrap', type: 'feature', description: 'libwrap support')
|
option('pcre', type: 'feature', description: 'Enable regular expression support (using libpcre)')
|
||||||
option('sqlite', type: 'feature', description: 'SQLite database support (for stickers)')
|
option('sqlite', type: 'feature', description: 'SQLite database support (for stickers)')
|
||||||
option('yajl', type: 'feature', description: 'libyajl for YAML support')
|
option('yajl', type: 'feature', description: 'libyajl for YAML support')
|
||||||
option('zlib', type: 'feature', description: 'zlib support (for database compression)')
|
option('zlib', type: 'feature', description: 'zlib support (for database compression)')
|
||||||
|
@@ -112,8 +112,8 @@ liblame = AutotoolsProject(
|
|||||||
)
|
)
|
||||||
|
|
||||||
ffmpeg = FfmpegProject(
|
ffmpeg = FfmpegProject(
|
||||||
'http://ffmpeg.org/releases/ffmpeg-4.0.2.tar.xz',
|
'http://ffmpeg.org/releases/ffmpeg-4.1.tar.xz',
|
||||||
'a95c0cc9eb990e94031d2183f2e6e444cc61c99f6f182d1575c433d62afb2f97',
|
'a38ec4d026efb58506a99ad5cd23d5a9793b4bf415f2c4c2e9c1bb444acd1994',
|
||||||
'lib/libavcodec.a',
|
'lib/libavcodec.a',
|
||||||
[
|
[
|
||||||
'--disable-shared', '--enable-static',
|
'--disable-shared', '--enable-static',
|
||||||
@@ -341,8 +341,8 @@ ffmpeg = FfmpegProject(
|
|||||||
)
|
)
|
||||||
|
|
||||||
curl = AutotoolsProject(
|
curl = AutotoolsProject(
|
||||||
'http://curl.haxx.se/download/curl-7.61.1.tar.xz',
|
'http://curl.haxx.se/download/curl-7.62.0.tar.xz',
|
||||||
'3d5913d6a39bd22e68e34dff697fd6e4c3c81563f580c76fca2009315cd81891',
|
'dab5643a5fe775ae92570b9f3df6b0ef4bc2a827a959361fb130c73b721275c1',
|
||||||
'lib/libcurl.a',
|
'lib/libcurl.a',
|
||||||
[
|
[
|
||||||
'--disable-shared', '--enable-static',
|
'--disable-shared', '--enable-static',
|
||||||
|
@@ -1,47 +0,0 @@
|
|||||||
#!/usr/bin/env ruby
|
|
||||||
#
|
|
||||||
# This script verifies that every source includes config.h first.
|
|
||||||
# This is very important for consistent Large File Support.
|
|
||||||
#
|
|
||||||
|
|
||||||
def check_file(file)
|
|
||||||
first = true
|
|
||||||
file.each_line do |line|
|
|
||||||
if line =~ /^\#include\s+(\S+)/ then
|
|
||||||
if $1 == '"config.h"'
|
|
||||||
unless first
|
|
||||||
puts "#{file.path}: config.h included too late"
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if first
|
|
||||||
puts "#{file.path}: config.h missing"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
first = false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def check_path(path)
|
|
||||||
File.open(path) do |file|
|
|
||||||
check_file(file)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if ARGV.empty?
|
|
||||||
Dir["src/*.c"].each do |path|
|
|
||||||
check_path(path)
|
|
||||||
end
|
|
||||||
|
|
||||||
Dir["src/*/*.c"].each do |path|
|
|
||||||
check_path(path)
|
|
||||||
end
|
|
||||||
|
|
||||||
Dir["test/*.c"].each do |path|
|
|
||||||
check_path(path)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
ARGV.each do |path|
|
|
||||||
check_path(path)
|
|
||||||
end
|
|
||||||
end
|
|
@@ -22,7 +22,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "AudioParser.hxx"
|
#include "AudioParser.hxx"
|
||||||
#include "AudioFormat.hxx"
|
#include "AudioFormat.hxx"
|
||||||
#include "util/RuntimeError.hxx"
|
#include "util/RuntimeError.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "CheckAudioFormat.hxx"
|
#include "CheckAudioFormat.hxx"
|
||||||
#include "AudioFormat.hxx"
|
#include "AudioFormat.hxx"
|
||||||
#include "util/RuntimeError.hxx"
|
#include "util/RuntimeError.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "IcyMetaDataParser.hxx"
|
#include "IcyMetaDataParser.hxx"
|
||||||
#include "tag/Tag.hxx"
|
#include "tag/Tag.hxx"
|
||||||
#include "tag/Builder.hxx"
|
#include "tag/Builder.hxx"
|
||||||
|
@@ -22,7 +22,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Idle.hxx"
|
#include "Idle.hxx"
|
||||||
#include "Main.hxx"
|
#include "Main.hxx"
|
||||||
#include "Instance.hxx"
|
#include "Instance.hxx"
|
||||||
|
@@ -22,7 +22,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "IdleFlags.hxx"
|
#include "IdleFlags.hxx"
|
||||||
#include "util/ASCII.hxx"
|
#include "util/ASCII.hxx"
|
||||||
|
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#ifndef MPD_INSTANCE_HXX
|
#ifndef MPD_INSTANCE_HXX
|
||||||
#define MPD_INSTANCE_HXX
|
#define MPD_INSTANCE_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "config.h"
|
||||||
#include "event/Loop.hxx"
|
#include "event/Loop.hxx"
|
||||||
#include "event/Thread.hxx"
|
#include "event/Thread.hxx"
|
||||||
#include "event/MaskMonitor.hxx"
|
#include "event/MaskMonitor.hxx"
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#ifndef MPD_LOCATE_URI_HXX
|
#ifndef MPD_LOCATE_URI_HXX
|
||||||
#define MPD_LOCATE_URI_HXX
|
#define MPD_LOCATE_URI_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "config.h"
|
||||||
#include "util/Compiler.h"
|
#include "util/Compiler.h"
|
||||||
#include "fs/AllocatedPath.hxx"
|
#include "fs/AllocatedPath.hxx"
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "LogV.hxx"
|
#include "LogV.hxx"
|
||||||
#include "util/Domain.hxx"
|
#include "util/Domain.hxx"
|
||||||
|
|
||||||
|
@@ -17,11 +17,11 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "LogBackend.hxx"
|
#include "LogBackend.hxx"
|
||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
#include "util/Domain.hxx"
|
#include "util/Domain.hxx"
|
||||||
#include "util/StringStrip.hxx"
|
#include "util/StringStrip.hxx"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#ifndef MPD_LOG_BACKEND_HXX
|
#ifndef MPD_LOG_BACKEND_HXX
|
||||||
#define MPD_LOG_BACKEND_HXX
|
#define MPD_LOG_BACKEND_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
#include "LogLevel.hxx"
|
#include "LogLevel.hxx"
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@@ -30,6 +30,10 @@
|
|||||||
#include "util/RuntimeError.hxx"
|
#include "util/RuntimeError.hxx"
|
||||||
#include "system/Error.hxx"
|
#include "system/Error.hxx"
|
||||||
|
|
||||||
|
#ifdef ENABLE_SYSTEMD_DAEMON
|
||||||
|
#include <systemd/sd-daemon.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@@ -139,6 +143,16 @@ log_init(const ConfigData &config, bool verbose, bool use_stdout)
|
|||||||
if (param == nullptr) {
|
if (param == nullptr) {
|
||||||
/* no configuration: default to syslog (if
|
/* no configuration: default to syslog (if
|
||||||
available) */
|
available) */
|
||||||
|
#ifdef ENABLE_SYSTEMD_DAEMON
|
||||||
|
if (sd_booted() &&
|
||||||
|
getenv("NOTIFY_SOCKET") != nullptr) {
|
||||||
|
/* if MPD was started as a systemd
|
||||||
|
service, default to journal (which
|
||||||
|
is connected to fd=2) */
|
||||||
|
out_fd = STDOUT_FILENO;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#ifndef HAVE_SYSLOG
|
#ifndef HAVE_SYSLOG
|
||||||
throw std::runtime_error("config parameter 'log_file' not found");
|
throw std::runtime_error("config parameter 'log_file' not found");
|
||||||
#endif
|
#endif
|
||||||
|
10
src/Main.cxx
10
src/Main.cxx
@@ -192,7 +192,7 @@ glue_db_init_and_load(const ConfigData &config)
|
|||||||
if (instance->database == nullptr)
|
if (instance->database == nullptr)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (instance->database->GetPlugin().flags & DatabasePlugin::FLAG_REQUIRE_STORAGE) {
|
if (instance->database->GetPlugin().RequireStorage()) {
|
||||||
InitStorage(config, instance->io_thread.GetEventLoop());
|
InitStorage(config, instance->io_thread.GetEventLoop());
|
||||||
|
|
||||||
if (instance->storage == nullptr) {
|
if (instance->storage == nullptr) {
|
||||||
@@ -216,17 +216,17 @@ glue_db_init_and_load(const ConfigData &config)
|
|||||||
std::throw_with_nested(std::runtime_error("Failed to open database plugin"));
|
std::throw_with_nested(std::runtime_error("Failed to open database plugin"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!instance->database->IsPlugin(simple_db_plugin))
|
auto *db = dynamic_cast<SimpleDatabase *>(instance->database);
|
||||||
|
if (db == nullptr)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
SimpleDatabase &db = *(SimpleDatabase *)instance->database;
|
|
||||||
instance->update = new UpdateService(config,
|
instance->update = new UpdateService(config,
|
||||||
instance->event_loop, db,
|
instance->event_loop, *db,
|
||||||
static_cast<CompositeStorage &>(*instance->storage),
|
static_cast<CompositeStorage &>(*instance->storage),
|
||||||
*instance);
|
*instance);
|
||||||
|
|
||||||
/* run database update after daemonization? */
|
/* run database update after daemonization? */
|
||||||
return db.FileExists();
|
return db->FileExists();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
|
@@ -24,9 +24,10 @@
|
|||||||
#ifndef MPD_MAPPER_HXX
|
#ifndef MPD_MAPPER_HXX
|
||||||
#define MPD_MAPPER_HXX
|
#define MPD_MAPPER_HXX
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "util/Compiler.h"
|
#include "util/Compiler.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#define PLAYLIST_FILE_SUFFIX ".m3u"
|
#define PLAYLIST_FILE_SUFFIX ".m3u"
|
||||||
|
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#ifndef MPD_MIX_RAMP_INFO_HXX
|
#ifndef MPD_MIX_RAMP_INFO_HXX
|
||||||
#define MPD_MIX_RAMP_INFO_HXX
|
#define MPD_MIX_RAMP_INFO_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
#include "util/Compiler.h"
|
#include "util/Compiler.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "MusicBuffer.hxx"
|
#include "MusicBuffer.hxx"
|
||||||
#include "MusicChunk.hxx"
|
#include "MusicChunk.hxx"
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "MusicChunk.hxx"
|
#include "MusicChunk.hxx"
|
||||||
#include "AudioFormat.hxx"
|
#include "AudioFormat.hxx"
|
||||||
#include "tag/Tag.hxx"
|
#include "tag/Tag.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "MusicChunkPtr.hxx"
|
#include "MusicChunkPtr.hxx"
|
||||||
#include "MusicBuffer.hxx"
|
#include "MusicBuffer.hxx"
|
||||||
|
|
||||||
|
@@ -20,8 +20,6 @@
|
|||||||
#ifndef MPD_MUSIC_CHUNK_PTR_HXX
|
#ifndef MPD_MUSIC_CHUNK_PTR_HXX
|
||||||
#define MPD_MUSIC_CHUNK_PTR_HXX
|
#define MPD_MUSIC_CHUNK_PTR_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
struct MusicChunk;
|
struct MusicChunk;
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "MusicPipe.hxx"
|
#include "MusicPipe.hxx"
|
||||||
#include "MusicChunk.hxx"
|
#include "MusicChunk.hxx"
|
||||||
|
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
#include "SingleMode.hxx"
|
#include "SingleMode.hxx"
|
||||||
#include "Chrono.hxx"
|
#include "Chrono.hxx"
|
||||||
#include "util/Compiler.h"
|
#include "util/Compiler.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
#ifndef MPD_PERMISSION_HXX
|
#ifndef MPD_PERMISSION_HXX
|
||||||
#define MPD_PERMISSION_HXX
|
#define MPD_PERMISSION_HXX
|
||||||
|
|
||||||
#include "check.h"
|
#include "config.h"
|
||||||
|
|
||||||
struct ConfigData;
|
struct ConfigData;
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "PlaylistDatabase.hxx"
|
#include "PlaylistDatabase.hxx"
|
||||||
#include "db/PlaylistVector.hxx"
|
#include "db/PlaylistVector.hxx"
|
||||||
#include "fs/io/TextFile.hxx"
|
#include "fs/io/TextFile.hxx"
|
||||||
|
@@ -20,8 +20,6 @@
|
|||||||
#ifndef MPD_PLAYLIST_DATABASE_HXX
|
#ifndef MPD_PLAYLIST_DATABASE_HXX
|
||||||
#define MPD_PLAYLIST_DATABASE_HXX
|
#define MPD_PLAYLIST_DATABASE_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
|
|
||||||
#define PLAYLIST_META_BEGIN "playlist_begin: "
|
#define PLAYLIST_META_BEGIN "playlist_begin: "
|
||||||
|
|
||||||
class PlaylistVector;
|
class PlaylistVector;
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "PlaylistError.hxx"
|
#include "PlaylistError.hxx"
|
||||||
#include "util/Domain.hxx"
|
#include "util/Domain.hxx"
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "PlaylistPrint.hxx"
|
#include "PlaylistPrint.hxx"
|
||||||
#include "PlaylistFile.hxx"
|
#include "PlaylistFile.hxx"
|
||||||
#include "PlaylistError.hxx"
|
#include "PlaylistError.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "RemoteTagCache.hxx"
|
#include "RemoteTagCache.hxx"
|
||||||
#include "RemoteTagCacheHandler.hxx"
|
#include "RemoteTagCacheHandler.hxx"
|
||||||
#include "input/ScanTags.hxx"
|
#include "input/ScanTags.hxx"
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#ifndef MPD_REMOTE_TAG_CACHE_HXX
|
#ifndef MPD_REMOTE_TAG_CACHE_HXX
|
||||||
#define MPD_REMOTE_TAG_CACHE_HXX
|
#define MPD_REMOTE_TAG_CACHE_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
#include "input/RemoteTagScanner.hxx"
|
#include "input/RemoteTagScanner.hxx"
|
||||||
#include "tag/Tag.hxx"
|
#include "tag/Tag.hxx"
|
||||||
#include "event/DeferEvent.hxx"
|
#include "event/DeferEvent.hxx"
|
||||||
|
@@ -20,8 +20,6 @@
|
|||||||
#ifndef MPD_REPLAY_GAIN_CONFIG_HXX
|
#ifndef MPD_REPLAY_GAIN_CONFIG_HXX
|
||||||
#define MPD_REPLAY_GAIN_CONFIG_HXX
|
#define MPD_REPLAY_GAIN_CONFIG_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
|
|
||||||
struct ReplayGainConfig {
|
struct ReplayGainConfig {
|
||||||
static constexpr bool DEFAULT_LIMIT = true;
|
static constexpr bool DEFAULT_LIMIT = true;
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ReplayGainGlobal.hxx"
|
#include "ReplayGainGlobal.hxx"
|
||||||
#include "ReplayGainConfig.hxx"
|
#include "ReplayGainConfig.hxx"
|
||||||
#include "config/Param.hxx"
|
#include "config/Param.hxx"
|
||||||
|
@@ -20,8 +20,6 @@
|
|||||||
#ifndef MPD_REPLAY_GAIN_GLOBAL_HXX
|
#ifndef MPD_REPLAY_GAIN_GLOBAL_HXX
|
||||||
#define MPD_REPLAY_GAIN_GLOBAL_HXX
|
#define MPD_REPLAY_GAIN_GLOBAL_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
|
|
||||||
struct ConfigData;
|
struct ConfigData;
|
||||||
struct ReplayGainConfig;
|
struct ReplayGainConfig;
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ReplayGainInfo.hxx"
|
#include "ReplayGainInfo.hxx"
|
||||||
#include "ReplayGainConfig.hxx"
|
#include "ReplayGainConfig.hxx"
|
||||||
|
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#ifndef MPD_REPLAY_GAIN_INFO_HXX
|
#ifndef MPD_REPLAY_GAIN_INFO_HXX
|
||||||
#define MPD_REPLAY_GAIN_INFO_HXX
|
#define MPD_REPLAY_GAIN_INFO_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
#include "util/Compiler.h"
|
#include "util/Compiler.h"
|
||||||
#include "ReplayGainMode.hxx"
|
#include "ReplayGainMode.hxx"
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "SongLoader.hxx"
|
#include "SongLoader.hxx"
|
||||||
#include "LocateUri.hxx"
|
#include "LocateUri.hxx"
|
||||||
#include "client/Client.hxx"
|
#include "client/Client.hxx"
|
||||||
@@ -25,6 +24,7 @@
|
|||||||
#include "storage/StorageInterface.hxx"
|
#include "storage/StorageInterface.hxx"
|
||||||
#include "song/DetachedSong.hxx"
|
#include "song/DetachedSong.hxx"
|
||||||
#include "PlaylistError.hxx"
|
#include "PlaylistError.hxx"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
@@ -20,8 +20,8 @@
|
|||||||
#ifndef MPD_SONG_LOADER_HXX
|
#ifndef MPD_SONG_LOADER_HXX
|
||||||
#define MPD_SONG_LOADER_HXX
|
#define MPD_SONG_LOADER_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
#include "util/Compiler.h"
|
#include "util/Compiler.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "SongPrint.hxx"
|
#include "SongPrint.hxx"
|
||||||
#include "song/LightSong.hxx"
|
#include "song/LightSong.hxx"
|
||||||
#include "Partition.hxx"
|
#include "Partition.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "SongSave.hxx"
|
#include "SongSave.hxx"
|
||||||
#include "AudioParser.hxx"
|
#include "AudioParser.hxx"
|
||||||
#include "db/plugins/simple/Song.hxx"
|
#include "db/plugins/simple/Song.hxx"
|
||||||
|
@@ -24,6 +24,7 @@
|
|||||||
#include "event/TimerEvent.hxx"
|
#include "event/TimerEvent.hxx"
|
||||||
#include "fs/AllocatedPath.hxx"
|
#include "fs/AllocatedPath.hxx"
|
||||||
#include "util/Compiler.h"
|
#include "util/Compiler.h"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "StateFileConfig.hxx"
|
#include "StateFileConfig.hxx"
|
||||||
#include "config/Data.hxx"
|
#include "config/Data.hxx"
|
||||||
|
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#ifndef MPD_STATE_FILE_CONFIG_HXX
|
#ifndef MPD_STATE_FILE_CONFIG_HXX
|
||||||
#define MPD_STATE_FILE_CONFIG_HXX
|
#define MPD_STATE_FILE_CONFIG_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
#include "fs/AllocatedPath.hxx"
|
#include "fs/AllocatedPath.hxx"
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "TagArchive.hxx"
|
#include "TagArchive.hxx"
|
||||||
#include "TagStream.hxx"
|
#include "TagStream.hxx"
|
||||||
#include "archive/ArchiveFile.hxx"
|
#include "archive/ArchiveFile.hxx"
|
||||||
|
@@ -20,8 +20,6 @@
|
|||||||
#ifndef MPD_TAG_ARCHIVE_HXX
|
#ifndef MPD_TAG_ARCHIVE_HXX
|
||||||
#define MPD_TAG_ARCHIVE_HXX
|
#define MPD_TAG_ARCHIVE_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
|
|
||||||
class ArchiveFile;
|
class ArchiveFile;
|
||||||
class TagHandler;
|
class TagHandler;
|
||||||
class TagBuilder;
|
class TagBuilder;
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "TagFile.hxx"
|
#include "TagFile.hxx"
|
||||||
#include "tag/Generic.hxx"
|
#include "tag/Generic.hxx"
|
||||||
#include "tag/Handler.hxx"
|
#include "tag/Handler.hxx"
|
||||||
|
@@ -20,8 +20,6 @@
|
|||||||
#ifndef MPD_TAG_FILE_HXX
|
#ifndef MPD_TAG_FILE_HXX
|
||||||
#define MPD_TAG_FILE_HXX
|
#define MPD_TAG_FILE_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
|
|
||||||
struct AudioFormat;
|
struct AudioFormat;
|
||||||
class Path;
|
class Path;
|
||||||
class TagHandler;
|
class TagHandler;
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "TagPrint.hxx"
|
#include "TagPrint.hxx"
|
||||||
#include "tag/Tag.hxx"
|
#include "tag/Tag.hxx"
|
||||||
#include "tag/Settings.hxx"
|
#include "tag/Settings.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "TagSave.hxx"
|
#include "TagSave.hxx"
|
||||||
#include "tag/Tag.hxx"
|
#include "tag/Tag.hxx"
|
||||||
#include "fs/io/BufferedOutputStream.hxx"
|
#include "fs/io/BufferedOutputStream.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "TagStream.hxx"
|
#include "TagStream.hxx"
|
||||||
#include "tag/Generic.hxx"
|
#include "tag/Generic.hxx"
|
||||||
#include "tag/Handler.hxx"
|
#include "tag/Handler.hxx"
|
||||||
|
@@ -20,8 +20,6 @@
|
|||||||
#ifndef MPD_TAG_STREAM_HXX
|
#ifndef MPD_TAG_STREAM_HXX
|
||||||
#define MPD_TAG_STREAM_HXX
|
#define MPD_TAG_STREAM_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
|
|
||||||
struct AudioFormat;
|
struct AudioFormat;
|
||||||
class InputStream;
|
class InputStream;
|
||||||
class TagHandler;
|
class TagHandler;
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "TimePrint.hxx"
|
#include "TimePrint.hxx"
|
||||||
#include "client/Response.hxx"
|
#include "client/Response.hxx"
|
||||||
#include "util/TimeISO8601.hxx"
|
#include "util/TimeISO8601.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Context.hxx"
|
#include "Context.hxx"
|
||||||
#include "java/Class.hxx"
|
#include "java/Class.hxx"
|
||||||
#include "java/File.hxx"
|
#include "java/File.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Environment.hxx"
|
#include "Environment.hxx"
|
||||||
#include "java/Class.hxx"
|
#include "java/Class.hxx"
|
||||||
#include "java/String.hxx"
|
#include "java/String.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "LogListener.hxx"
|
#include "LogListener.hxx"
|
||||||
#include "java/Class.hxx"
|
#include "java/Class.hxx"
|
||||||
#include "java/String.hxx"
|
#include "java/String.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h" /* must be first for large file support */
|
|
||||||
#include "ArchiveLookup.hxx"
|
#include "ArchiveLookup.hxx"
|
||||||
#include "ArchiveDomain.hxx"
|
#include "ArchiveDomain.hxx"
|
||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ArchivePlugin.hxx"
|
#include "ArchivePlugin.hxx"
|
||||||
#include "ArchiveFile.hxx"
|
#include "ArchiveFile.hxx"
|
||||||
#include "fs/Path.hxx"
|
#include "fs/Path.hxx"
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
* single bz2 archive handling (requires libbz2)
|
* single bz2 archive handling (requires libbz2)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Bzip2ArchivePlugin.hxx"
|
#include "Bzip2ArchivePlugin.hxx"
|
||||||
#include "../ArchivePlugin.hxx"
|
#include "../ArchivePlugin.hxx"
|
||||||
#include "../ArchiveFile.hxx"
|
#include "../ArchiveFile.hxx"
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
* iso archive handling (requires cdio, and iso9660)
|
* iso archive handling (requires cdio, and iso9660)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Iso9660ArchivePlugin.hxx"
|
#include "Iso9660ArchivePlugin.hxx"
|
||||||
#include "../ArchivePlugin.hxx"
|
#include "../ArchivePlugin.hxx"
|
||||||
#include "../ArchiveFile.hxx"
|
#include "../ArchiveFile.hxx"
|
||||||
|
@@ -21,7 +21,6 @@
|
|||||||
* zip archive handling (requires zziplib)
|
* zip archive handling (requires zziplib)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ZzipArchivePlugin.hxx"
|
#include "ZzipArchivePlugin.hxx"
|
||||||
#include "../ArchivePlugin.hxx"
|
#include "../ArchivePlugin.hxx"
|
||||||
#include "../ArchiveFile.hxx"
|
#include "../ArchiveFile.hxx"
|
||||||
|
47
src/check.h
47
src/check.h
@@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2003-2018 The Music Player Daemon Project
|
|
||||||
* http://www.musicpd.org
|
|
||||||
*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU General Public License along
|
|
||||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MPD_CHECK_H
|
|
||||||
#define MPD_CHECK_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
* All sources must include config.h on the first line to ensure that
|
|
||||||
* Large File Support is configured properly. This header checks
|
|
||||||
* whether this has happened.
|
|
||||||
*
|
|
||||||
* Usage: include this header before you use any of the above types.
|
|
||||||
* It will stop the compiler if something went wrong.
|
|
||||||
*
|
|
||||||
* This is Linux/glibc specific, and only enabled in the debug build,
|
|
||||||
* so bugs in this headers don't affect users with production builds.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef PACKAGE_VERSION
|
|
||||||
#error config.h missing
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__linux__) && !defined(NDEBUG) && defined(ENABLE_LARGEFILE) && \
|
|
||||||
defined(_FEATURES_H) && defined(__i386__) && \
|
|
||||||
!defined(__USE_FILE_OFFSET64)
|
|
||||||
/* on i386, check if LFS is enabled */
|
|
||||||
#error config.h was included too late
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
@@ -17,11 +17,11 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ClientInternal.hxx"
|
#include "ClientInternal.hxx"
|
||||||
#include "util/Domain.hxx"
|
|
||||||
#include "Partition.hxx"
|
#include "Partition.hxx"
|
||||||
#include "Instance.hxx"
|
#include "Instance.hxx"
|
||||||
|
#include "util/Domain.hxx"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
const Domain client_domain("client");
|
const Domain client_domain("client");
|
||||||
|
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#ifndef MPD_CLIENT_H
|
#ifndef MPD_CLIENT_H
|
||||||
#define MPD_CLIENT_H
|
#define MPD_CLIENT_H
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
#include "ClientMessage.hxx"
|
#include "ClientMessage.hxx"
|
||||||
#include "command/CommandListBuilder.hxx"
|
#include "command/CommandListBuilder.hxx"
|
||||||
#include "tag/Mask.hxx"
|
#include "tag/Mask.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Client.hxx"
|
#include "Client.hxx"
|
||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ClientInternal.hxx"
|
#include "ClientInternal.hxx"
|
||||||
#include "Log.hxx"
|
#include "Log.hxx"
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Client.hxx"
|
#include "Client.hxx"
|
||||||
#include "protocol/Ack.hxx"
|
#include "protocol/Ack.hxx"
|
||||||
#include "fs/Path.hxx"
|
#include "fs/Path.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ClientInternal.hxx"
|
#include "ClientInternal.hxx"
|
||||||
#include "config/Data.hxx"
|
#include "config/Data.hxx"
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ClientInternal.hxx"
|
#include "ClientInternal.hxx"
|
||||||
#include "Response.hxx"
|
#include "Response.hxx"
|
||||||
#include "Idle.hxx"
|
#include "Idle.hxx"
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#ifndef MPD_CLIENT_INTERNAL_HXX
|
#ifndef MPD_CLIENT_INTERNAL_HXX
|
||||||
#define MPD_CLIENT_INTERNAL_HXX
|
#define MPD_CLIENT_INTERNAL_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
#include "Client.hxx"
|
#include "Client.hxx"
|
||||||
#include "command/CommandResult.hxx"
|
#include "command/CommandResult.hxx"
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ClientList.hxx"
|
#include "ClientList.hxx"
|
||||||
#include "ClientInternal.hxx"
|
#include "ClientInternal.hxx"
|
||||||
#include "util/DeleteDisposer.hxx"
|
#include "util/DeleteDisposer.hxx"
|
||||||
|
@@ -35,10 +35,6 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBWRAP
|
|
||||||
#include <tcpd.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static constexpr char GREETING[] = "OK MPD " PROTOCOL_VERSION "\n";
|
static constexpr char GREETING[] = "OK MPD " PROTOCOL_VERSION "\n";
|
||||||
|
|
||||||
Client::Client(EventLoop &_loop, Partition &_partition,
|
Client::Client(EventLoop &_loop, Partition &_partition,
|
||||||
@@ -66,27 +62,6 @@ client_new(EventLoop &loop, Partition &partition,
|
|||||||
|
|
||||||
assert(fd.IsDefined());
|
assert(fd.IsDefined());
|
||||||
|
|
||||||
#ifdef HAVE_LIBWRAP
|
|
||||||
if (address.GetFamily() != AF_LOCAL) {
|
|
||||||
// TODO: shall we obtain the program name from argv[0]?
|
|
||||||
const char *progname = "mpd";
|
|
||||||
|
|
||||||
struct request_info req;
|
|
||||||
request_init(&req, RQ_FILE, fd.Get(), RQ_DAEMON, progname, 0);
|
|
||||||
|
|
||||||
fromhost(&req);
|
|
||||||
|
|
||||||
if (!hosts_access(&req)) {
|
|
||||||
/* tcp wrappers says no */
|
|
||||||
FormatWarning(client_domain,
|
|
||||||
"libwrap refused connection (libwrap=%s) from %s",
|
|
||||||
progname, remote.c_str());
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* HAVE_WRAP */
|
|
||||||
|
|
||||||
ClientList &client_list = *partition.instance.client_list;
|
ClientList &client_list = *partition.instance.client_list;
|
||||||
if (client_list.IsFull()) {
|
if (client_list.IsFull()) {
|
||||||
LogWarning(client_domain, "Max connections reached");
|
LogWarning(client_domain, "Max connections reached");
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ClientInternal.hxx"
|
#include "ClientInternal.hxx"
|
||||||
#include "protocol/Result.hxx"
|
#include "protocol/Result.hxx"
|
||||||
#include "command/AllCommands.hxx"
|
#include "command/AllCommands.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ClientInternal.hxx"
|
#include "ClientInternal.hxx"
|
||||||
#include "Partition.hxx"
|
#include "Partition.hxx"
|
||||||
#include "Instance.hxx"
|
#include "Instance.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ClientInternal.hxx"
|
#include "ClientInternal.hxx"
|
||||||
#include "Partition.hxx"
|
#include "Partition.hxx"
|
||||||
#include "Idle.hxx"
|
#include "Idle.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Client.hxx"
|
#include "Client.hxx"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@@ -17,12 +17,12 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Listener.hxx"
|
#include "Listener.hxx"
|
||||||
#include "Client.hxx"
|
#include "Client.hxx"
|
||||||
#include "Permission.hxx"
|
#include "Permission.hxx"
|
||||||
#include "net/UniqueSocketDescriptor.hxx"
|
#include "net/UniqueSocketDescriptor.hxx"
|
||||||
#include "net/SocketAddress.hxx"
|
#include "net/SocketAddress.hxx"
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
static unsigned
|
static unsigned
|
||||||
GetPermissions(SocketAddress address, int uid) noexcept
|
GetPermissions(SocketAddress address, int uid) noexcept
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#ifndef MPD_CLIENT_LISTENER_HXX
|
#ifndef MPD_CLIENT_LISTENER_HXX
|
||||||
#define MPD_CLIENT_LISTENER_HXX
|
#define MPD_CLIENT_LISTENER_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
#include "event/ServerSocket.hxx"
|
#include "event/ServerSocket.hxx"
|
||||||
|
|
||||||
struct Partition;
|
struct Partition;
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Response.hxx"
|
#include "Response.hxx"
|
||||||
#include "Client.hxx"
|
#include "Client.hxx"
|
||||||
#include "util/FormatString.hxx"
|
#include "util/FormatString.hxx"
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#ifndef MPD_RESPONSE_HXX
|
#ifndef MPD_RESPONSE_HXX
|
||||||
#define MPD_RESPONSE_HXX
|
#define MPD_RESPONSE_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
#include "protocol/Ack.hxx"
|
#include "protocol/Ack.hxx"
|
||||||
#include "util/Compiler.h"
|
#include "util/Compiler.h"
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "ClientCommands.hxx"
|
#include "ClientCommands.hxx"
|
||||||
#include "Request.hxx"
|
#include "Request.hxx"
|
||||||
#include "Permission.hxx"
|
#include "Permission.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "CommandListBuilder.hxx"
|
#include "CommandListBuilder.hxx"
|
||||||
#include "client/ClientInternal.hxx"
|
#include "client/ClientInternal.hxx"
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "DatabaseCommands.hxx"
|
#include "DatabaseCommands.hxx"
|
||||||
#include "Request.hxx"
|
#include "Request.hxx"
|
||||||
#include "db/DatabaseQueue.hxx"
|
#include "db/DatabaseQueue.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "MessageCommands.hxx"
|
#include "MessageCommands.hxx"
|
||||||
#include "Request.hxx"
|
#include "Request.hxx"
|
||||||
#include "client/Client.hxx"
|
#include "client/Client.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "NeighborCommands.hxx"
|
#include "NeighborCommands.hxx"
|
||||||
#include "Request.hxx"
|
#include "Request.hxx"
|
||||||
#include "client/Client.hxx"
|
#include "client/Client.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "OutputCommands.hxx"
|
#include "OutputCommands.hxx"
|
||||||
#include "Request.hxx"
|
#include "Request.hxx"
|
||||||
#include "output/Print.hxx"
|
#include "output/Print.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "PartitionCommands.hxx"
|
#include "PartitionCommands.hxx"
|
||||||
#include "Request.hxx"
|
#include "Request.hxx"
|
||||||
#include "Instance.hxx"
|
#include "Instance.hxx"
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#ifndef MPD_REQUEST_HXX
|
#ifndef MPD_REQUEST_HXX
|
||||||
#define MPD_REQUEST_HXX
|
#define MPD_REQUEST_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
#include "protocol/ArgParser.hxx"
|
#include "protocol/ArgParser.hxx"
|
||||||
#include "protocol/RangeArg.hxx"
|
#include "protocol/RangeArg.hxx"
|
||||||
#include "Chrono.hxx"
|
#include "Chrono.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "StickerCommands.hxx"
|
#include "StickerCommands.hxx"
|
||||||
#include "Request.hxx"
|
#include "Request.hxx"
|
||||||
#include "SongPrint.hxx"
|
#include "SongPrint.hxx"
|
||||||
|
@@ -209,12 +209,9 @@ handle_mount(Client &client, Request args, Response &r)
|
|||||||
instance.EmitIdle(IDLE_MOUNT);
|
instance.EmitIdle(IDLE_MOUNT);
|
||||||
|
|
||||||
#ifdef ENABLE_DATABASE
|
#ifdef ENABLE_DATABASE
|
||||||
Database *_db = instance.database;
|
if (auto *db = dynamic_cast<SimpleDatabase *>(instance.database)) {
|
||||||
if (_db != nullptr && _db->IsPlugin(simple_db_plugin)) {
|
|
||||||
SimpleDatabase &db = *(SimpleDatabase *)_db;
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
db.Mount(local_uri, remote_uri);
|
db->Mount(local_uri, remote_uri);
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
composite.Unmount(local_uri);
|
composite.Unmount(local_uri);
|
||||||
throw;
|
throw;
|
||||||
@@ -256,11 +253,8 @@ handle_unmount(Client &client, Request args, Response &r)
|
|||||||
destroy here */
|
destroy here */
|
||||||
instance.update->CancelMount(local_uri);
|
instance.update->CancelMount(local_uri);
|
||||||
|
|
||||||
Database *_db = instance.database;
|
if (auto *db = dynamic_cast<SimpleDatabase *>(instance.database)) {
|
||||||
if (_db != nullptr && _db->IsPlugin(simple_db_plugin)) {
|
if (db->Unmount(local_uri))
|
||||||
SimpleDatabase &db = *(SimpleDatabase *)_db;
|
|
||||||
|
|
||||||
if (db.Unmount(local_uri))
|
|
||||||
// TODO: call Instance::OnDatabaseModified()?
|
// TODO: call Instance::OnDatabaseModified()?
|
||||||
instance.EmitIdle(IDLE_DATABASE);
|
instance.EmitIdle(IDLE_DATABASE);
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "TagCommands.hxx"
|
#include "TagCommands.hxx"
|
||||||
#include "Request.hxx"
|
#include "Request.hxx"
|
||||||
#include "client/Client.hxx"
|
#include "client/Client.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Block.hxx"
|
#include "Block.hxx"
|
||||||
#include "Parser.hxx"
|
#include "Parser.hxx"
|
||||||
#include "Path.hxx"
|
#include "Path.hxx"
|
||||||
|
@@ -20,7 +20,6 @@
|
|||||||
#ifndef MPD_CONFIG_BLOCK_HXX
|
#ifndef MPD_CONFIG_BLOCK_HXX
|
||||||
#define MPD_CONFIG_BLOCK_HXX
|
#define MPD_CONFIG_BLOCK_HXX
|
||||||
|
|
||||||
#include "check.h"
|
|
||||||
#include "Param.hxx"
|
#include "Param.hxx"
|
||||||
#include "util/Compiler.h"
|
#include "util/Compiler.h"
|
||||||
|
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Check.hxx"
|
#include "Check.hxx"
|
||||||
#include "Data.hxx"
|
#include "Data.hxx"
|
||||||
#include "Domain.hxx"
|
#include "Domain.hxx"
|
||||||
|
@@ -17,7 +17,6 @@
|
|||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "Data.hxx"
|
#include "Data.hxx"
|
||||||
#include "Parser.hxx"
|
#include "Parser.hxx"
|
||||||
#include "fs/AllocatedPath.hxx"
|
#include "fs/AllocatedPath.hxx"
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user