Add playlist_directory to config command response

This commit is contained in:
jcorporation 2022-08-28 20:41:09 +02:00
parent b2fb920d28
commit 0439df05cc
2 changed files with 6 additions and 0 deletions

View File

@ -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:

View File

@ -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;
}