diff --git a/doc/protocol.rst b/doc/protocol.rst index 2b55aa124..d73b63761 100644 --- a/doc/protocol.rst +++ b/doc/protocol.rst @@ -1599,6 +1599,7 @@ Reflection The following response attributes are available: - ``music_directory``: The absolute path of the music directory. + - ``playlist_directory``: The absolute path of the playlist directory. .. _command_commands: diff --git a/src/command/OtherCommands.cxx b/src/command/OtherCommands.cxx index 3c7adefa4..1aa151462 100644 --- a/src/command/OtherCommands.cxx +++ b/src/command/OtherCommands.cxx @@ -46,6 +46,7 @@ #include "Instance.hxx" #include "IdleFlags.hxx" #include "Log.hxx" +#include "Mapper.hxx" #ifdef ENABLE_DATABASE #include "DatabaseCommands.hxx" @@ -394,6 +395,10 @@ handle_config(Client &client, [[maybe_unused]] Request args, Response &r) } #endif + const auto spl_path = map_spl_path(); + if (!spl_path.IsNull()) + r.Fmt(FMT_STRING("playlist_directory: {}\n"), spl_path.ToUTF8()); + return CommandResult::OK; }