fix: sort tv shows by date played (#741)
* Fix wrong "Date Played" sort for TV shows * fix: change sortby dateplayed to seriesdateplayed right before retrieving items --------- Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
This commit is contained in:
parent
0733bd2b21
commit
9379e60fc0
2 changed files with 2 additions and 1 deletions
|
@ -61,7 +61,7 @@ constructor(
|
|||
parentId = parentId,
|
||||
includeTypes = itemType,
|
||||
recursive = recursive,
|
||||
sortBy = sortBy,
|
||||
sortBy = if (libraryType == CollectionType.TvShows && sortBy == SortBy.DATE_PLAYED) SortBy.SERIES_DATE_PLAYED else sortBy, // Jellyfin uses a different enum for sorting series by data played
|
||||
sortOrder = sortOrder,
|
||||
).cachedIn(viewModelScope)
|
||||
_uiState.emit(UiState.Normal(items))
|
||||
|
|
|
@ -7,6 +7,7 @@ enum class SortBy(val sortString: String) {
|
|||
DATE_ADDED("DateCreated"),
|
||||
DATE_PLAYED("DatePlayed"),
|
||||
RELEASE_DATE("PremiereDate"),
|
||||
SERIES_DATE_PLAYED("SeriesDatePlayed"),
|
||||
;
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Reference in a new issue