allow sorting by date added

This commit is contained in:
Benoît Dardenne 2020-07-10 23:11:28 +02:00 committed by dkanada
commit e8ef0b972d
10 changed files with 24 additions and 3 deletions

View file

@ -12,6 +12,7 @@ import com.dkanada.gramophone.model.Song;
import org.jellyfin.apiclient.interaction.Response;
import org.jellyfin.apiclient.model.dto.BaseItemDto;
import org.jellyfin.apiclient.model.dto.BaseItemType;
import org.jellyfin.apiclient.model.entities.SortOrder;
import org.jellyfin.apiclient.model.querying.ArtistsQuery;
import org.jellyfin.apiclient.model.querying.ItemFields;
import org.jellyfin.apiclient.model.querying.ItemQuery;
@ -221,6 +222,9 @@ public class QueryUtil {
case SortMethod.YEAR:
query.setSortBy(new String[]{"ProductionYear"});
break;
case SortMethod.ADDED:
query.setSortBy(new String[]{"DateCreated"});
break;
case SortMethod.RANDOM:
query.setSortBy(new String[]{"Random"});
break;