Merge branch 'v0.20.x'
This commit is contained in:
commit
24874b8286
5
NEWS
5
NEWS
@ -31,6 +31,11 @@ ver 0.21 (not yet released)
|
||||
- opus: support for sending metadata using ogg stream chaining
|
||||
* require GCC 5.0
|
||||
|
||||
ver 0.20.21 (not yet released)
|
||||
* database
|
||||
- proxy: add "password" setting
|
||||
- proxy: support tags "ArtistSort", "AlbumArtistSort", "AlbumSort"
|
||||
|
||||
ver 0.20.20 (2018/05/22)
|
||||
* protocol
|
||||
- fix "modified-since" filter regression
|
||||
|
@ -2,8 +2,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.musicpd"
|
||||
android:installLocation="auto"
|
||||
android:versionCode="19"
|
||||
android:versionName="0.20.20">
|
||||
android:versionCode="20"
|
||||
android:versionName="0.20.21">
|
||||
|
||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17"/>
|
||||
|
||||
|
16
doc/user.xml
16
doc/user.xml
@ -2115,13 +2115,6 @@ run</programlisting>
|
||||
database.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Note that unless overridden by the below settings (e.g. by
|
||||
setting them to a blank value), general curl configuration
|
||||
from environment variables such as http_proxy or specified
|
||||
in ~/.curlrc will be in effect.
|
||||
</para>
|
||||
|
||||
<informaltable>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
@ -2149,6 +2142,15 @@ run</programlisting>
|
||||
<application>MPD</application> instance.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>
|
||||
<varname>password</varname>
|
||||
</entry>
|
||||
<entry>
|
||||
The password used to log in to the "master"
|
||||
<application>MPD</application> instance.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>
|
||||
<varname>keepalive</varname>
|
||||
|
@ -84,6 +84,7 @@ class ProxyDatabase final : public Database, SocketMonitor, IdleMonitor {
|
||||
DatabaseListener &listener;
|
||||
|
||||
const std::string host;
|
||||
const std::string password;
|
||||
const unsigned port;
|
||||
const bool keepalive;
|
||||
|
||||
@ -176,6 +177,13 @@ static constexpr struct {
|
||||
#if LIBMPDCLIENT_CHECK_VERSION(2,10,0)
|
||||
{ TAG_MUSICBRAINZ_RELEASETRACKID,
|
||||
MPD_TAG_MUSICBRAINZ_RELEASETRACKID },
|
||||
#endif
|
||||
#if LIBMPDCLIENT_CHECK_VERSION(2,11,0)
|
||||
{ TAG_ARTIST_SORT, MPD_TAG_ARTIST_SORT },
|
||||
{ TAG_ALBUM_ARTIST_SORT, MPD_TAG_ALBUM_ARTIST_SORT },
|
||||
#endif
|
||||
#if LIBMPDCLIENT_CHECK_VERSION(2,12,0)
|
||||
{ TAG_ALBUM_SORT, MPD_TAG_ALBUM_SORT },
|
||||
#endif
|
||||
{ TAG_NUM_OF_ITEM_TYPES, MPD_TAG_COUNT }
|
||||
};
|
||||
@ -371,6 +379,7 @@ ProxyDatabase::ProxyDatabase(EventLoop &_loop, DatabaseListener &_listener,
|
||||
SocketMonitor(_loop), IdleMonitor(_loop),
|
||||
listener(_listener),
|
||||
host(block.GetBlockValue("host", "")),
|
||||
password(block.GetBlockValue("password", "")),
|
||||
port(block.GetBlockValue("port", 0u)),
|
||||
keepalive(block.GetBlockValue("keepalive", false))
|
||||
{
|
||||
@ -415,6 +424,10 @@ ProxyDatabase::Connect()
|
||||
|
||||
try {
|
||||
CheckError(connection);
|
||||
|
||||
if (!password.empty() &&
|
||||
!mpd_run_password(connection, password.c_str()))
|
||||
ThrowError(connection);
|
||||
} catch (...) {
|
||||
mpd_connection_free(connection);
|
||||
connection = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user