mirror of
https://github.com/SuperBFG7/ympd
synced 2025-11-16 05:07:20 +00:00
Central state change
This commit is contained in:
@@ -921,7 +921,7 @@ int mpd_put_browse(char *buffer, char *path, unsigned int offset, char *filter)
|
||||
case MPD_ENTITY_TYPE_SONG:
|
||||
song = mpd_entity_get_song(entity);
|
||||
entityName = mpd_get_title(song);
|
||||
if (strncmp(filter,"!",1) == 0 || strncasecmp(filter,entityName,1) == 0 ||
|
||||
if (strncmp(filter,"-",1) == 0 || strncasecmp(filter,entityName,1) == 0 ||
|
||||
( strncmp(filter,"0",1) == 0 && isalpha(*entityName) == 0 )
|
||||
) {
|
||||
entities_returned ++;
|
||||
@@ -950,7 +950,7 @@ int mpd_put_browse(char *buffer, char *path, unsigned int offset, char *filter)
|
||||
} else {
|
||||
dirName = strdup(entityName);
|
||||
}
|
||||
if (strncmp(filter,"!",1) == 0 || strncasecmp(filter,dirName,1) == 0 ||
|
||||
if (strncmp(filter,"-",1) == 0 || strncasecmp(filter,dirName,1) == 0 ||
|
||||
( strncmp(filter,"0",1) == 0 && isalpha(*dirName) == 0 )
|
||||
) {
|
||||
entities_returned ++;
|
||||
@@ -971,7 +971,7 @@ int mpd_put_browse(char *buffer, char *path, unsigned int offset, char *filter)
|
||||
} else {
|
||||
plName = strdup(entityName);
|
||||
}
|
||||
if (strncmp(filter,"!",1) == 0 || strncasecmp(filter,plName,1) == 0 ||
|
||||
if (strncmp(filter,"-",1) == 0 || strncasecmp(filter,plName,1) == 0 ||
|
||||
( strncmp(filter,"0",1) == 0 && isalpha(*plName) == 0 )
|
||||
) {
|
||||
entities_returned ++;
|
||||
@@ -1030,7 +1030,7 @@ int mympd_put_db_tag(char *buffer, unsigned int offset, char *mpdtagtype, char *
|
||||
while((pair = mpd_recv_pair_tag(mpd.conn, mpd_tag_name_parse(mpdtagtype))) != NULL) {
|
||||
entity_count ++;
|
||||
if(entity_count > offset && entity_count <= offset+MAX_ELEMENTS_PER_PAGE) {
|
||||
if (strncmp(filter,"!",1) == 0 || strncasecmp(filter,pair->value,1) == 0 ||
|
||||
if (strncmp(filter,"-",1) == 0 || strncasecmp(filter,pair->value,1) == 0 ||
|
||||
( strncmp(filter,"0",1) == 0 && isalpha(*pair->value) == 0 )
|
||||
) {
|
||||
entities_returned ++;
|
||||
@@ -1145,7 +1145,7 @@ int mympd_put_playlists(char *buffer, unsigned int offset, char *filter)
|
||||
entity_count ++;
|
||||
if(entity_count > offset && entity_count <= offset+MAX_ELEMENTS_PER_PAGE) {
|
||||
plpath = mpd_playlist_get_path(pl);
|
||||
if (strncmp(filter,"!",1) == 0 || strncasecmp(filter,plpath,1) == 0 ||
|
||||
if (strncmp(filter,"-",1) == 0 || strncasecmp(filter,plpath,1) == 0 ||
|
||||
( strncmp(filter,"0",1) == 0 && isalpha(*plpath) == 0 )
|
||||
) {
|
||||
entities_returned ++;
|
||||
|
||||
Reference in New Issue
Block a user