db/update: scan CUE playlist contents

This commit adds a PlaylistPlugin attribute "as_folder" which for now
is only enabled in the "CUE" playlist plugin (which handles separate
"*.cue" files).  If a playlist with this flag set is being scanned
during database update, it will be parsed and its contents will be
added to the database.  This allows clients to inspect them like
directories and its contents will be searchable.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/39
This commit is contained in:
Max Kellermann
2019-09-02 20:01:30 +02:00
parent 5fdb804a50
commit d63e2c2641
7 changed files with 100 additions and 1 deletions

View File

@@ -50,6 +50,9 @@ DeviceToTypeString(unsigned device) noexcept
case DEVICE_CONTAINER:
return "container";
case DEVICE_PLAYLIST:
return "playlist";
default:
return nullptr;
}
@@ -63,6 +66,8 @@ ParseTypeString(const char *type) noexcept
return DEVICE_INARCHIVE;
else if (StringIsEqual(type, "container"))
return DEVICE_CONTAINER;
else if (StringIsEqual(type, "playlist"))
return DEVICE_PLAYLIST;
else
return 0;
}