When a playlist request contains a query make the default sort S_ALBUM,

which should keep audiobooks organized better and be in line with iTunes.

This should fix #91, and I cross my fingers it does not have other
unintended consequences.
This commit is contained in:
ejurgensen 2015-05-05 21:46:56 +02:00
parent f6f584bf84
commit 475d5db573

View File

@ -687,6 +687,10 @@ get_query_params(struct evkeyvalq *query, int *sort_headers, struct query_params
qp->filter = daap_query_parse_sql(param);
if (!qp->filter)
DPRINTF(E_LOG, L_DAAP, "Ignoring improper DAAP query: %s\n", param);
/* iTunes seems to default to this when there is a query (which there is for audiobooks, but not for normal playlists) */
if (qp->sort == S_NONE)
qp->sort = S_ALBUM;
}
}