Commit 3d714739 authored by Max Kellermann's avatar Max Kellermann

Merge branch 'v0.21.x'

parents 3c5ef504 ca705e1e
......@@ -40,6 +40,15 @@ ver 0.22 (not yet released)
* switch to C++17
- GCC 7 or clang 4 (or newer) recommended
ver 0.21.25 (not yet released)
* protocol:
- fix crash when using "rangeid" while playing
* input
- file: detect premature end of file
- smbclient: don't send credentials to MPD clients
* Windows/Android:
- fix Boost detection after breaking change in Meson 0.54
ver 0.21.24 (2020/06/10)
* protocol
- "tagtypes" requires no permissions
......
......@@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.musicpd"
android:installLocation="auto"
android:versionCode="47"
android:versionName="0.21.24">
android:versionCode="48"
android:versionName="0.21.25">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28"/>
......
......@@ -91,7 +91,12 @@ def configure(toolchain, src, build, args=()):
'--cross-file', cross_file,
] + args
subprocess.check_call(configure, env=toolchain.env)
env = toolchain.env.copy()
# Meson 0.54 requires the BOOST_ROOT environment variable
env['BOOST_ROOT'] = toolchain.install_prefix
subprocess.check_call(configure, env=env)
class MesonProject(Project):
def __init__(self, url, md5, installed, configure_args=[],
......
......@@ -25,6 +25,8 @@
#include "io/FileDescriptor.hxx"
#include "util/RuntimeError.hxx"
#include <cinttypes> // for PRIu64 (PRIoffset)
#include <sys/stat.h>
#include <fcntl.h>
......@@ -97,6 +99,11 @@ FileInputStream::Read(std::unique_lock<Mutex> &,
nbytes = reader.Read(ptr, read_size);
}
if (nbytes == 0 && !IsEOF())
throw FormatRuntimeError("Unexpected end of file %s"
" at %" PRIoffset " of %" PRIoffset,
GetURI(), GetOffset(), GetSize());
offset += nbytes;
return nbytes;
}
......@@ -430,6 +430,8 @@ playlist::SetSongIdRange(PlayerControl &pc, unsigned id,
if (position < 0)
throw PlaylistError::NoSuchSong();
bool was_queued = false;
if (playing) {
if (position == current)
throw PlaylistError(PlaylistResult::DENIED,
......@@ -441,6 +443,10 @@ playlist::SetSongIdRange(PlayerControl &pc, unsigned id,
already; cancel that */
pc.LockCancel();
queued = -1;
/* schedule a call to UpdateQueuedSong() to
re-queue the song with its new range */
was_queued = true;
}
}
......@@ -463,7 +469,8 @@ playlist::SetSongIdRange(PlayerControl &pc, unsigned id,
song.SetEndTime(end);
/* announce the change to all interested subsystems */
UpdateQueuedSong(pc, nullptr);
if (was_queued)
UpdateQueuedSong(pc, nullptr);
queue.ModifyAtPosition(position);
OnModified();
}
......@@ -70,7 +70,12 @@ gcc_pure
static const char *
SkipUriScheme(const char *uri) noexcept
{
const char *const schemes[] = { "http://", "https://", "ftp://" };
static const char *const schemes[] = {
"http://", "https://",
"ftp://",
"smb://",
};
for (auto scheme : schemes) {
auto result = StringAfterPrefixCaseASCII(uri, scheme);
if (result != nullptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment