mirror of
https://github.com/SuperBFG7/ympd
synced 2024-12-25 10:30:26 +00:00
Fix: no sort and group tags in advanced search, if tags are disabled
This commit is contained in:
parent
53d959a144
commit
f9c5decfa5
@ -319,7 +319,7 @@ function appRoute() {
|
|||||||
if (settings.tags.includes('Title'))
|
if (settings.tags.includes('Title'))
|
||||||
sort = 'Title';
|
sort = 'Title';
|
||||||
else
|
else
|
||||||
sort = 'Filename';
|
sort = '';
|
||||||
document.getElementById('SearchList').setAttribute('data-sort', sort);
|
document.getElementById('SearchList').setAttribute('data-sort', sort);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2457,11 +2457,11 @@ int mympd_search_adv(char *buffer, char *expression, char *sort, bool sortdesc,
|
|||||||
RETURN_ERROR_AND_RECOVER("mpd_search_add_expression");
|
RETURN_ERROR_AND_RECOVER("mpd_search_add_expression");
|
||||||
|
|
||||||
if (strcmp(plist, "") == 0) {
|
if (strcmp(plist, "") == 0) {
|
||||||
if (sort != NULL && strcmp(sort, "") != 0) {
|
if (sort != NULL && strcmp(sort, "") != 0 && mpd.feat_tags == true) {
|
||||||
if (mpd_search_add_sort_name(mpd.conn, sort, sortdesc) == false)
|
if (mpd_search_add_sort_name(mpd.conn, sort, sortdesc) == false)
|
||||||
RETURN_ERROR_AND_RECOVER("mpd_search_add_sort_name");
|
RETURN_ERROR_AND_RECOVER("mpd_search_add_sort_name");
|
||||||
}
|
}
|
||||||
if (grouptag != NULL && strcmp(grouptag, "") != 0) {
|
if (grouptag != NULL && strcmp(grouptag, "") != 0 && mpd.feat_tags == true) {
|
||||||
if (mpd_search_add_group_tag(mpd.conn, mpd_tag_name_parse(grouptag)) == false)
|
if (mpd_search_add_group_tag(mpd.conn, mpd_tag_name_parse(grouptag)) == false)
|
||||||
RETURN_ERROR_AND_RECOVER("mpd_search_add_group_tag");
|
RETURN_ERROR_AND_RECOVER("mpd_search_add_group_tag");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user