New User Setting: Disable Unwatched Episode Count

This commit is contained in:
1hitsong 2023-02-04 18:16:36 -05:00
parent 3a4753ce5b
commit 94465f36c8
8 changed files with 55 additions and 26 deletions

View File

@ -43,10 +43,12 @@ sub itemContentChanged()
m.itemIcon.uri = itemData.iconUrl
m.itemText.text = itemData.Title
else if itemData.type = "Series"
if itemData?.json?.UserData?.UnplayedItemCount <> invalid
if itemData.json.UserData.UnplayedItemCount > 0
m.unplayedCount.visible = true
m.unplayedEpisodeCount.text = itemData.json.UserData.UnplayedItemCount
if get_user_setting("ui.tvshows.disableUnwatchedEpisodeCount", "false") = "false"
if itemData?.json?.UserData?.UnplayedItemCount <> invalid
if itemData.json.UserData.UnplayedItemCount > 0
m.unplayedCount.visible = true
m.unplayedEpisodeCount.text = itemData.json.UserData.UnplayedItemCount
end if
end if
end if

View File

@ -57,10 +57,12 @@ sub itemContentChanged() as void
itemData = m.top.itemContent
m.title.text = itemData.title
if itemData?.json?.UserData?.UnplayedItemCount <> invalid
if itemData.json.UserData.UnplayedItemCount > 0
m.unplayedCount.visible = true
m.unplayedEpisodeCount.text = itemData.json.UserData.UnplayedItemCount
if get_user_setting("ui.tvshows.disableUnwatchedEpisodeCount", "false") = "false"
if itemData?.json?.UserData?.UnplayedItemCount <> invalid
if itemData.json.UserData.UnplayedItemCount > 0
m.unplayedCount.visible = true
m.unplayedEpisodeCount.text = itemData.json.UserData.UnplayedItemCount
end if
end if
end if

View File

@ -38,10 +38,12 @@ sub itemContentChanged()
end if
if LCase(itemData.type) = "series"
if itemData?.json?.UserData?.UnplayedItemCount <> invalid
if itemData.json.UserData.UnplayedItemCount > 0
m.unplayedCount.visible = true
m.unplayedEpisodeCount.text = itemData.json.UserData.UnplayedItemCount
if get_user_setting("ui.tvshows.disableUnwatchedEpisodeCount", "false") = "false"
if itemData?.json?.UserData?.UnplayedItemCount <> invalid
if itemData.json.UserData.UnplayedItemCount > 0
m.unplayedCount.visible = true
m.unplayedEpisodeCount.text = itemData.json.UserData.UnplayedItemCount
end if
end if
end if
end if

View File

@ -17,10 +17,12 @@ sub setSeasonLoading()
end sub
sub updateSeason()
if m.top.seasonData?.UserData?.UnplayedItemCount <> invalid
if m.top.seasonData.UserData.UnplayedItemCount > 0
m.unplayedCount.visible = true
m.unplayedEpisodeCount.text = m.top.seasonData.UserData.UnplayedItemCount
if get_user_setting("ui.tvshows.disableUnwatchedEpisodeCount", "false") = "false"
if m.top.seasonData?.UserData?.UnplayedItemCount <> invalid
if m.top.seasonData.UserData.UnplayedItemCount > 0
m.unplayedCount.visible = true
m.unplayedEpisodeCount.text = m.top.seasonData.UserData.UnplayedItemCount
end if
end if
end if

View File

@ -15,10 +15,12 @@ sub itemContentChanged()
item = m.top.itemContent
itemData = item.json
if itemData?.UserData?.UnplayedItemCount <> invalid
if itemData.UserData.UnplayedItemCount > 0
m.unplayedCount.visible = true
m.unplayedEpisodeCount.text = itemData.UserData.UnplayedItemCount
if get_user_setting("ui.tvshows.disableUnwatchedEpisodeCount", "false") = "false"
if itemData?.UserData?.UnplayedItemCount <> invalid
if itemData.UserData.UnplayedItemCount > 0
m.unplayedCount.visible = true
m.unplayedEpisodeCount.text = itemData.UserData.UnplayedItemCount
end if
end if
end if

View File

@ -33,5 +33,6 @@
<field id="seasonSelected" alias="seasons.rowItemSelected" />
</interface>
<script type="text/brightscript" uri="pkg:/source/utils/misc.brs" />
<script type="text/brightscript" uri="pkg:/source/utils/config.brs" />
<script type="text/brightscript" uri="TVShowDetails.brs" />
</component>

View File

@ -1087,5 +1087,16 @@
<translation>Grid</translation>
<extracomment>Title of an option - name of grid view</extracomment>
</message>
<message>
<source>Disable Unwatched Episode Count</source>
<translation>Disable Unwatched Episode Count</translation>
<extracomment>Settings Menu - Title for option</extracomment>
</message>
<message>
<source>If enabled, the number of unwatched episodes in a series/season will be removed.</source>
<translation>If enabled, the number of unwatched episodes in a series/season will be removed.</translation>
<extracomment>Settings Menu - Description for option</extracomment>
</message>
</context>
</TS>

View File

@ -224,16 +224,23 @@
"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",
"title": "Disable Community Rating for Episodes",
"description": "If enabled, the star and community rating for episodes of a TV show will be removed. This is to prevent spoilers of an upcoming good/bad episode.",
"settingName": "ui.tvshows.disableCommunityRating",
"type": "bool",
"default": "false"
},
{
"title": "Disable Community Rating for Episodes",
"description": "If enabled, the star and community rating for episodes of a TV show will be removed. This is to prevent spoilers of an upcoming good/bad episode.",
"settingName": "ui.tvshows.disableCommunityRating",
"title": "Disable Unwatched Episode Count",
"description": "If enabled, the number of unwatched episodes in a series/season will be removed.",
"settingName": "ui.tvshows.disableUnwatchedEpisodeCount",
"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"
}