ignore sort preference if query already has sort method applied
This commit is contained in:
parent
a0dc794755
commit
569813ae73
5 changed files with 22 additions and 56 deletions
|
|
@ -98,6 +98,7 @@ public class MusicUtil {
|
|||
public static String getReadableDurationString(long songDurationMillis) {
|
||||
long minutes = (songDurationMillis / 1000) / 60;
|
||||
long seconds = (songDurationMillis / 1000) % 60;
|
||||
|
||||
if (minutes < 60) {
|
||||
return String.format(Locale.getDefault(), "%01d:%02d", minutes, seconds);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -199,6 +199,9 @@ public class QueryUtil {
|
|||
}
|
||||
|
||||
private static void applySortMethod(ItemQuery query, String method) {
|
||||
// album activity will always sort by track number
|
||||
if (query.getSortBy() != null) return;
|
||||
|
||||
switch (method) {
|
||||
case SortMethod.NAME:
|
||||
query.setSortBy(new String[]{"SortName"});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue