Skip playlists in lsinfo responses
Instead of merging the fields into other items.
This commit is contained in:
parent
0dc29a3e2d
commit
8121046be6
9
nncmpp.c
9
nncmpp.c
|
@ -2413,7 +2413,8 @@ enum
|
|||
LIBRARY_ROOT = '/', ///< Root entry
|
||||
LIBRARY_UP = '^', ///< Upper directory
|
||||
LIBRARY_DIR = 'd', ///< Directory
|
||||
LIBRARY_FILE = 'f' ///< File
|
||||
LIBRARY_FILE = 'f', ///< File
|
||||
LIBRARY_PLAYLIST = 'p', ///< Playlist (unsupported)
|
||||
};
|
||||
|
||||
struct library_tab_item
|
||||
|
@ -2482,12 +2483,18 @@ library_tab_header_type (const char *key)
|
|||
{
|
||||
if (!strcasecmp_ascii (key, "file")) return LIBRARY_FILE;
|
||||
if (!strcasecmp_ascii (key, "directory")) return LIBRARY_DIR;
|
||||
if (!strcasecmp_ascii (key, "playlist")) return LIBRARY_PLAYLIST;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
library_tab_chunk (char type, const char *path, struct str_map *map)
|
||||
{
|
||||
// CUE files appear once as a directory and another time as a playlist,
|
||||
// just skip them entirely
|
||||
if (type == LIBRARY_PLAYLIST)
|
||||
return;
|
||||
|
||||
const char *artist = str_map_find (map, "artist");
|
||||
const char *title = str_map_find (map, "title");
|
||||
char *name = (artist && title)
|
||||
|
|
Loading…
Reference in New Issue