Merge pull request #919 from ApexArray/straight-to-episode-listing-if-one-season
Add user setting: Go straight to episode listing (if only 1 season)
This commit is contained in:
commit
60de7a5b9c
|
@ -657,6 +657,16 @@
|
|||
<translation>Blur Unwatched Episodes</translation>
|
||||
<extracomment>Option Title in user setting screen</extracomment>
|
||||
</message>
|
||||
<message>
|
||||
<source>Skip Details for Single Seasons</source>
|
||||
<translation>Skip Details for Single Seasons</translation>
|
||||
<extracomment>Settings Menu - Title for option</extracomment>
|
||||
</message>
|
||||
<message>
|
||||
<source>If enabled, selecting a TV series with only one season will go straight to the episode list rather than the show details and season list.</source>
|
||||
<translation>If enabled, selecting a TV series with only one season will go straight to the episode list rather than the show details and season list.</translation>
|
||||
<extracomment>Settings Menu - Description for option</extracomment>
|
||||
</message>
|
||||
<message>
|
||||
<source>If enabled, images of unwatched episodes will be blurred.</source>
|
||||
<translation>If enabled, images of unwatched episodes will be blurred.</translation>
|
||||
|
|
|
@ -94,6 +94,13 @@
|
|||
"settingName": "ui.tvshows.blurunwatched",
|
||||
"type": "bool",
|
||||
"default": "false"
|
||||
},
|
||||
{
|
||||
"title": "Skip Details for Single Seasons",
|
||||
"description": "If enabled, selecting a TV series with only one season will go straight to the episode list rather than the show details and season list.",
|
||||
"settingName": "ui.tvshows.goStraightToEpisodeListing",
|
||||
"type": "bool",
|
||||
"default": "false"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -358,12 +358,18 @@ function CreateMovieDetailsGroup(movie)
|
|||
end function
|
||||
|
||||
function CreateSeriesDetailsGroup(series)
|
||||
' Get season data early in the function so we can check number of seasons.
|
||||
seasonData = TVSeasons(series.id)
|
||||
' Divert to season details if user setting goStraightToEpisodeListing is enabled and only one season exists.
|
||||
if get_user_setting("ui.tvshows.goStraightToEpisodeListing") = "true" and seasonData.Items.Count() = 1
|
||||
return CreateSeasonDetailsGroupByID(series.id, seasonData.Items[0].id)
|
||||
end if
|
||||
group = CreateObject("roSGNode", "TVShowDetails")
|
||||
group.optionsAvailable = false
|
||||
m.global.sceneManager.callFunc("pushScene", group)
|
||||
|
||||
group.itemContent = ItemMetaData(series.id)
|
||||
group.seasonData = TVSeasons(series.id)
|
||||
group.seasonData = seasonData ' Re-use variable from beginning of function
|
||||
|
||||
group.observeField("seasonSelected", m.port)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user