mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-13 15:59:50 -04:00
Exclude radio station metadata from browse info. Not sure this is entirely correct. Should it be a config option?
This commit is contained in:
parent
c20b3e52e9
commit
d91ac3ff42
14
src/db-sql.c
14
src/db-sql.c
@ -1179,6 +1179,18 @@ int db_sql_enum_start(char **pe, DBQUERYINFO *pinfo) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* don't browse radio station metadata */
|
||||||
|
if(browse) {
|
||||||
|
if(have_clause) {
|
||||||
|
strcat(query_rest," and ");
|
||||||
|
} else {
|
||||||
|
strcpy(query_rest," where ");
|
||||||
|
have_clause = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
strcat(query_rest,"(data_kind = 0) ");
|
||||||
|
}
|
||||||
|
|
||||||
/* Apply the query/filter */
|
/* Apply the query/filter */
|
||||||
if(pinfo->pt) {
|
if(pinfo->pt) {
|
||||||
DPRINTF(E_DBG,L_DB,"Got query/filter\n");
|
DPRINTF(E_DBG,L_DB,"Got query/filter\n");
|
||||||
@ -1188,6 +1200,7 @@ int db_sql_enum_start(char **pe, DBQUERYINFO *pinfo) {
|
|||||||
strcat(query_rest," and ");
|
strcat(query_rest," and ");
|
||||||
} else {
|
} else {
|
||||||
strcpy(query_rest," where ");
|
strcpy(query_rest," where ");
|
||||||
|
have_clause=1;
|
||||||
}
|
}
|
||||||
strcat(query_rest,"(");
|
strcat(query_rest,"(");
|
||||||
strcat(query_rest,filter);
|
strcat(query_rest,filter);
|
||||||
@ -1206,6 +1219,7 @@ int db_sql_enum_start(char **pe, DBQUERYINFO *pinfo) {
|
|||||||
strcat(query_rest," and (");
|
strcat(query_rest," and (");
|
||||||
} else {
|
} else {
|
||||||
strcpy(query_rest," where (");
|
strcpy(query_rest," where (");
|
||||||
|
have_clause = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(pinfo->query_type) {
|
switch(pinfo->query_type) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user