This commit adds a new protocol command to toggle protocol features

for a client connection. It works like the tag_mask and the associated
tagtypes command.

New commands:

- protocol
  Shows enabled protocol features.

- protocol available
  Show all available protocol features.

- protocol enable {feature...}
  Enables protocol features.

- protocol disable {feature...}
  Disables protocol features.

- protocol all
  Enables all available protocol features.

- protocol clear
  Disables all protocol features.

This commit adds also the first protocol feature.

hide_playlists_in_root
  Disables the listing of playlists in the root folder
  for the lsinfo command.
This commit is contained in:
jcorporation
2024-09-28 16:36:43 +02:00
parent 124c0e66ee
commit 23c2bba483
10 changed files with 322 additions and 2 deletions

View File

@@ -160,7 +160,7 @@ handle_lsinfo_relative(Client &client, Response &r, const char *uri)
(void)client;
#endif
if (isRootDirectory(uri)) {
if (!client.ProtocolFeatureEnabled(PF_HIDE_PLAYLISTS_IN_ROOT) && isRootDirectory(uri)) {
try {
print_spl_list(r, ListPlaylistFiles());
} catch (...) {