mirror of
https://github.com/jellyfin/jellyfin-androidtv.git
synced 2026-10-26 16:45:23 +00:00
Add Seasons and Series navigation rows to season browse page
When browsing a season, show a 'Seasons' row listing the other seasons of the same series and a 'Series' row linking back to the parent series, so users can navigate to sibling seasons or the show from within a season.
This commit is contained in:
1 parent
960b48bbee
commit
9b565d0183
1 file changed
+17
@@ -66,6 +66,23 @@ class GenericFolderFragment : EnhancedBrowseFragment() {
|
||||
if (mFolder.type == BaseItemKind.SEASON) {
|
||||
val specials = GetSpecialsRequest(mFolder.id)
|
||||
mRows.add(BrowseRowDef(getString(R.string.lbl_specials), specials))
|
||||
|
||||
val seriesId = mFolder.seriesId ?: mFolder.parentId
|
||||
if (seriesId != null) {
|
||||
val otherSeasons = GetItemsRequest(
|
||||
fields = ItemRepository.itemFields,
|
||||
parentId = seriesId,
|
||||
includeItemTypes = setOf(BaseItemKind.SEASON),
|
||||
excludeItemIds = setOf(mFolder.id),
|
||||
)
|
||||
mRows.add(BrowseRowDef(getString(R.string.lbl_seasons), otherSeasons, 100))
|
||||
|
||||
val series = GetItemsRequest(
|
||||
fields = ItemRepository.itemFields,
|
||||
ids = setOf(seriesId),
|
||||
)
|
||||
mRows.add(BrowseRowDef(getString(R.string.lbl_series), series, 100))
|
||||
}
|
||||
}
|
||||
|
||||
rowLoader.loadRows(mRows)
|
||||
|
||||
Reference in new issue
Block a user