mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Add a few more sort options (#223)
Adds parental rating, runtime, & play count sorting options Closes #198
This commit is contained in:
parent
72fb732e63
commit
2f56a3a114
2 changed files with 14 additions and 0 deletions
|
|
@ -30,6 +30,8 @@ val MovieSortOptions =
|
|||
ItemSortBy.DATE_PLAYED,
|
||||
ItemSortBy.COMMUNITY_RATING,
|
||||
ItemSortBy.CRITIC_RATING,
|
||||
ItemSortBy.OFFICIAL_RATING,
|
||||
ItemSortBy.RUNTIME,
|
||||
ItemSortBy.PLAY_COUNT,
|
||||
ItemSortBy.RANDOM,
|
||||
)
|
||||
|
|
@ -42,6 +44,7 @@ val SeriesSortOptions =
|
|||
ItemSortBy.DATE_LAST_CONTENT_ADDED,
|
||||
ItemSortBy.DATE_PLAYED,
|
||||
ItemSortBy.COMMUNITY_RATING,
|
||||
ItemSortBy.OFFICIAL_RATING,
|
||||
ItemSortBy.RANDOM,
|
||||
)
|
||||
|
||||
|
|
@ -51,6 +54,8 @@ val EpisodeSortOptions =
|
|||
ItemSortBy.DATE_CREATED,
|
||||
ItemSortBy.DATE_PLAYED,
|
||||
ItemSortBy.AIRED_EPISODE_ORDER,
|
||||
ItemSortBy.OFFICIAL_RATING,
|
||||
ItemSortBy.RUNTIME,
|
||||
ItemSortBy.RANDOM,
|
||||
)
|
||||
|
||||
|
|
@ -59,6 +64,8 @@ val VideoSortOptions =
|
|||
ItemSortBy.SORT_NAME,
|
||||
ItemSortBy.DATE_CREATED,
|
||||
ItemSortBy.DATE_PLAYED,
|
||||
ItemSortBy.RUNTIME,
|
||||
ItemSortBy.PLAY_COUNT,
|
||||
ItemSortBy.RANDOM,
|
||||
)
|
||||
|
||||
|
|
@ -68,17 +75,22 @@ fun getStringRes(sort: ItemSortBy): Int =
|
|||
ItemSortBy.SORT_NAME,
|
||||
ItemSortBy.SERIES_SORT_NAME,
|
||||
-> R.string.sort_by_name
|
||||
|
||||
ItemSortBy.PREMIERE_DATE -> R.string.sort_by_date_released
|
||||
ItemSortBy.DATE_CREATED -> R.string.sort_by_date_added
|
||||
ItemSortBy.DATE_LAST_CONTENT_ADDED -> R.string.sort_by_date_episode_added
|
||||
|
||||
ItemSortBy.DATE_PLAYED,
|
||||
ItemSortBy.SERIES_DATE_PLAYED,
|
||||
-> R.string.sort_by_date_played
|
||||
|
||||
ItemSortBy.RANDOM -> R.string.sort_by_random
|
||||
ItemSortBy.COMMUNITY_RATING -> R.string.community_rating
|
||||
ItemSortBy.CRITIC_RATING -> R.string.critic_rating
|
||||
ItemSortBy.OFFICIAL_RATING -> R.string.official_rating
|
||||
ItemSortBy.PLAY_COUNT -> R.string.play_count
|
||||
ItemSortBy.AIRED_EPISODE_ORDER -> R.string.aired_episode_order
|
||||
ItemSortBy.RUNTIME -> R.string.runtime_sort
|
||||
ItemSortBy.DEFAULT -> R.string.default_track
|
||||
else -> throw IllegalArgumentException("Unsupported sort option: $sort")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -150,6 +150,8 @@
|
|||
<string name="font">Font</string>
|
||||
<string name="background">Background</string>
|
||||
<string name="success">Success</string>
|
||||
<string name="official_rating">Parental Rating</string>
|
||||
<string name="runtime_sort">Runtime</string>
|
||||
|
||||
<plurals name="downloads">
|
||||
<item quantity="zero">%s downloads</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue