remove Recently Played, Frequently Played album sort orders for Jellyfin

This commit is contained in:
Drew Weymouth
2023-11-14 16:58:04 -08:00
parent ecfba0a463
commit aba2076894
2 changed files with 11 additions and 20 deletions
+6 -16
View File
@@ -10,21 +10,17 @@ import (
)
const (
AlbumSortRecentlyAdded string = "Recently Added"
AlbumSortRecentlyPlayed string = "Recently Played"
AlbumSortFrequentlyPlayed string = "Frequently Played"
AlbumSortRandom string = "Random"
AlbumSortTitleAZ string = "Title (A-Z)"
AlbumSortArtistAZ string = "Artist (A-Z)"
AlbumSortYearAscending string = "Year (ascending)"
AlbumSortYearDescending string = "Year (descending)"
AlbumSortRecentlyAdded string = "Recently Added"
AlbumSortRandom string = "Random"
AlbumSortTitleAZ string = "Title (A-Z)"
AlbumSortArtistAZ string = "Artist (A-Z)"
AlbumSortYearAscending string = "Year (ascending)"
AlbumSortYearDescending string = "Year (descending)"
)
func (j *jellyfinMediaProvider) AlbumSortOrders() []string {
return []string{
AlbumSortRecentlyAdded,
AlbumSortRecentlyPlayed,
AlbumSortFrequentlyPlayed,
AlbumSortRandom,
AlbumSortTitleAZ,
AlbumSortArtistAZ,
@@ -39,9 +35,6 @@ func (j *jellyfinMediaProvider) IterateAlbums(sortOrder string, filter mediaprov
case AlbumSortRecentlyAdded:
jfSort.Field = jellyfin.SortByDateCreated
jfSort.Mode = jellyfin.SortDesc
case AlbumSortFrequentlyPlayed:
jfSort.Field = jellyfin.SortByPlayCount
jfSort.Mode = jellyfin.SortDesc
case AlbumSortRandom:
jfSort.Field = jellyfin.SortByRandom
case AlbumSortArtistAZ:
@@ -50,9 +43,6 @@ func (j *jellyfinMediaProvider) IterateAlbums(sortOrder string, filter mediaprov
case AlbumSortTitleAZ:
jfSort.Field = jellyfin.SortByName
jfSort.Mode = jellyfin.SortAsc
case AlbumSortRecentlyPlayed:
jfSort.Field = jellyfin.SortByDatePlayed
jfSort.Mode = jellyfin.SortDesc
case AlbumSortYearAscending:
jfSort.Field = jellyfin.SortByYear
jfSort.Mode = jellyfin.SortAsc