summaryrefslogtreecommitdiff
path: root/src/command
AgeCommit message (Collapse)Author
2021-02-15command/queue: better error message for open-ended range with "move"Max Kellermann
The "move" command doesn't allow open-ended ranges because they don't make a lot of sense; moving an open-ended range is only possible if the destination index is before the range, and in that case, the client should be well aware how many songs there are. Closes https://github.com/MusicPlayerDaemon/MPD/pull/1057
2021-01-21protocol: add command "binarylimit"Max Kellermann
Increasing the protocol version to 0.22.4 to allow clients to detect this feature. Closes https://github.com/MusicPlayerDaemon/MPD/issues/1038
2021-01-21client/FileCommands: validate the given offsetMax Kellermann
2021-01-21command/Request: ParseUnsigned() returns unsignedMax Kellermann
Of course, it should do that!
2021-01-20command/file: use %zu to format a size_tMax Kellermann
`PRIoffset` was wrong, because it expects an `offset_type` (i.e. `uint64_t`). This broke on 32 bit machines where `size_t` has 32 bits. Closes https://github.com/MusicPlayerDaemon/MPD/issues/1058
2021-01-01copyright year 2021Max Kellermann
2020-11-15Fixes #994 - moveoutput: new AudioOutputControl created from copyMoving an ↵Stapper
output to a partition is now done via MultipleOutputs::AddCopy(),using a new AudioOutputControl constructor. Tags and always_on settings willpersist when moving outputs between partitions.
2020-09-17Merge branch 'v0.21.x' into masterMax Kellermann
2020-09-16command/file, storage/{nfs,smbclient}: use PathTraitsFS::IsSpecialFilename()Max Kellermann
Eliminate some duplicate code.
2020-07-06Merge branch 'v0.21.x'Max Kellermann
2020-07-06command/storage: automatically scan new mountsMax Kellermann
Closes https://github.com/MusicPlayerDaemon/MPD/issues/841
2020-07-06command/storage: check if storage is already mountedMax Kellermann
Mounting one storage URI twice on different mount points can lead to conflicts with the database cache file, and it doesn't make a lot of sense. But most importantly, our udisks storage plugin will unmount the disk from the kernel VFS, and if two exist, they will compete with each others. We could (and should) fix this in the udisks storage plugin, but for now, this workaround is good enough (and useful).
2020-07-06command/storage: check if mount point is busyMax Kellermann
When mounting something over a directory that is already a mount point, CompositeStorage::Mount() silently overwrites the previously mounted storage, disposing it. After that, SimpleDatabase::Mount() will fail and handle_mount() will roll back the CompositeStorage::Mount() command, effectively unmounting what was there before (and also leaking memory). Closes https://github.com/MusicPlayerDaemon/MPD/issues/918
2020-05-30use std chr functionsRosen Penev
The ones in std have overloads for const char/char. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-05Merge branch 'v0.21.x'Max Kellermann
2020-04-30command/all: "tagtypes" requires no permissionsMax Kellermann
The command is used to configure the client's connection, and this shouldn't require any permissions. The client should be able to do that before sending a password.
2020-04-08[cppcheck] convert several functions to use std::all_ofRosen Penev
std::all_of becomes constexpr in C++20. I'm not sure it results in better performance. Found with useStlAlgorithm Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-26Merge branch 'ucl' of git://github.com/neheb/MPD into v0.21.xMax Kellermann
2020-03-26[clang-tidy] change integer prefixes to uppercaseRosen Penev
Found with readability-uppercase-literal-suffix Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-25treewide: use boost::lround when std::round is unavailableRosen Penev
This is the case with uClibc-ng currently. Signed-off-by: Rosen Penev <rosenp@gmail.com> (cherry picked from commit 769cd0ee9f0cf8ceb026aa751b5d4a390bb5dbdc) (changed define to match master)
2020-03-16fix double promotionsRosen Penev
Found with -Wdouble-promotion Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16Merge remote-tracking branch 'neheb/h'Max Kellermann
2020-03-16remove gcc_unusedRosen Penev
[[maybe_unused]] (introduced in C++17) is standard C++. https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused says that this is equivalent to the GNU unused attribute. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-15treewide: use boost::lround when std::round is unavailableRosen Penev
This is the case with uClibc-ng currently. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-13fs/Traits: GetParent() returns std::string_viewMax Kellermann
2020-03-12replace inttypes.h with cinttypesRosen Penev
The former has been deprecated by C++14. They are also the same. From the standard: The contents and meaning of the header<cinttypes>are the same as the C standard library header<inttypes.h>, with the following changes: -The header<cinttypes>includes the header<cstdint>instead of<stdint.h>,and —if and only if the typeintmax_tdesignates an extended integer type (6.7.1), the following functionsignatures are added:intmax_t abs(intmax_t);imaxdiv_t div(intmax_t, intmax_t);which shall have the same semantics as the function signaturesintmax_t imaxabs(intmax_t)andimaxdiv_t imaxdiv(intmax_t, intmax_t), respectively. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12replace assert.h with cassertRosen Penev
The former was deprecated with C++14. According to the C++11 and C++17 standards, both files are identical. Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-16[clang-tidy] add ending namespace commentsRosen Penev
Found with llvm-namespace-comment Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-04[clang-tidy] change integer prefixes to uppercaseRosen Penev
Found with readability-uppercase-literal-suffix Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-02[clang-tidy] convert several functions to const &Rosen Penev
Found with performance-unnecessary-value-param Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-02Merge remote-tracking branches 'neheb/uniq', 'neheb/bool', 'neheb/loop', ↵Max Kellermann
'neheb/bool2', 'neheb/perf', 'neheb/void' and 'neheb/value'
2020-02-01[clang-tidy] convert several loops to range based onesRosen Penev
Found with modernize-loop-convert Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01[clang-tidy] use make_uniqueRosen Penev
Found with modernize-make-unique Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01*: use `auto`Max Kellermann
2020-01-20command/partition: add command "delpartition"Max Kellermann
2020-01-20command/partition: don't create null output in new partitionsMax Kellermann
No output at all is fine. If the partition needs an output, it must be moved there, but having just a null output isn't helpful.
2020-01-20output/multiple: add "client" field, replacing the "client" parameterMax Kellermann
By eliminating GetAnyClient(), we can have instances with no outputs at all.
2020-01-20Partition: add client listMax Kellermann
For efficient traversal within one partition, e.g. for distributing partition-local idle events.
2020-01-20command/message: make messages/subscriptions local to the current partitionMax Kellermann
2020-01-18command/player: show partition name in "status" responseMax Kellermann
2020-01-18command/player: add local Partition reference variableMax Kellermann
2020-01-18add "moveoutput" commandMax Kellermann
2020-01-18AudioFormat: move to pcm/Max Kellermann
2020-01-18copyright year 2020Max Kellermann
2020-01-03util/{Const,Writable}Buffer: drop "_type" from type namesMax Kellermann
Behave like STL.
2019-12-16util/Time*: move to time/Max Kellermann
2019-12-04command/fingerprint: fix inverted checkMax Kellermann
2019-08-21Merge tag 'v0.21.14'Max Kellermann
release v0.21.14
2019-08-20command/all: don't create new Response instance in exception handlerMax Kellermann
The new Response instance in the `catch` block didn't have the `command` attribute set, so the error response didn't indicate which command had failed, which however is required in the MPD protocol. Closes https://github.com/MusicPlayerDaemon/MPD/issues/628
2019-08-20client/Process, command/all: add `noexcept`Max Kellermann
Clarify that those can't throw, preparing for the next commit.