Merge pull request #1556 from cewert/fix-whatsnew

Fix what's new popup and show it for each user if enabled
This commit is contained in:
1hitsong 2023-12-06 20:11:09 -05:00 committed by GitHub
commit 0670ae3e69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 202 additions and 197 deletions

View File

@ -5,7 +5,7 @@ sub init()
m.top.id = "OKDialog"
m.top.height = 900
m.top.title = "What's New?"
m.top.title = m.global.app.version + " - " + tr("What's New?")
m.top.buttons = [tr("OK")]
dialogStyles = {
@ -21,7 +21,7 @@ sub init()
}
}
whatsNewList = ParseJSON(ReadAsciiFile("pkg:/source/static/whatsNew.json"))
whatsNewList = ParseJSON(ReadAsciiFile("pkg:/source/static/whatsNew/" + m.global.app.version.ToStr().trim() + ".json"))
for each item in whatsNewList
textLine = m.content.CreateChild("StdDlgMultiStyleTextItem")

View File

@ -1241,5 +1241,10 @@
<translation>Make the arrangement of the Roku home view sections match the web client's home screen. Jellyfin will need to be closed and reopened for change to take effect.</translation>
<extracomment>User Setting - Setting description</extracomment>
</message>
<message>
<source>What's New?</source>
<translation>What's New?</translation>
<extracomment>Popup title - Popup displays all the major changes to the app since the last version</extracomment>
</message>
</context>
</TS>

View File

@ -20,10 +20,8 @@ sub Main (args as dynamic) as void
m.wasMigrated = false
runGlobalMigrations()
runRegistryUserMigrations()
' update LastRunVersion now that migrations are finished
showWhatsNew = false
' update global LastRunVersion now that migrations are finished
if m.global.app.version <> m.global.app.lastRunVersion
showWhatsNew = true
set_setting("LastRunVersion", m.global.app.version)
end if
if m.wasMigrated then printRegistry()
@ -74,11 +72,16 @@ sub Main (args as dynamic) as void
end if
end if
' Show the Whats New popup
if showWhatsNew and m.global.session.user.settings["load.allowwhatsnew"]
dialog = createObject("roSGNode", "WhatsNewDialog")
m.scene.dialog = dialog
m.scene.dialog.observeField("buttonSelected", m.port)
' has the current user ran this version before?
usersLastRunVersion = m.global.session.user.settings.lastRunVersion
if not isValid(usersLastRunVersion) or not versionChecker(m.global.session.user.settings.lastRunVersion, m.global.app.version)
set_user_setting("LastRunVersion", m.global.app.version)
' show what's new popup
if m.global.session.user.settings["load.allowwhatsnew"]
dialog = createObject("roSGNode", "WhatsNewDialog")
m.scene.dialog = dialog
m.scene.dialog.observeField("buttonSelected", m.port)
end if
end if
' Handle input messages

View File

@ -71,7 +71,7 @@ sub runRegistryUserMigrations()
' app versions < 2.0.0 didn't save LastRunVersion at the user level
' fall back to using the apps lastRunVersion
lastRunVersion = m.global.app.lastRunVersion
registry_write("LastRunVersion", m.global.app.version, section)
registry_write("LastRunVersion", lastRunVersion, section)
end if
' BASE_MIGRATION

View File

@ -1,182 +0,0 @@
[
{
"description": "New Global Setting: Remember Me setting allowing users to toggle client auto-login",
"author": "cewert"
},
{
"description": "New Setting: Use Web Client's Home Section Arrangement",
"author": "1hitsong"
},
{
"description": "New Feature: Allow selection of TV Show versions",
"author": "jimdogx"
},
{
"description": "New Feature: Add support for TV show season extra features",
"author": "JarodTAerts"
},
{
"description": "New Feature: When connecting to a server, automatically attempt connection using default protocols and ports if not specified",
"author": "sevenrats"
},
{
"description": "New Feature: Fixed permissions when using search",
"author": "matty-r"
},
{
"description": "New Feature: Create video OSD with chapter skip, subtitle select, playback info - Press up, down, ok, or pause while video is playing",
"author": "1hitsong"
},
{
"description": "New Feature: Add support for Music Videos",
"author": "cewert"
},
{
"description": "New Feature: Add photo support to home screen",
"author": "cewert"
},
{
"description": "New Feature: Add quickplay support to entire app - Press play on your remote while highlighting something",
"author": "cewert"
},
{
"description": "New Feature: Update device profile when device capabilities change + enable all device events",
"author": "cewert"
},
{
"description": "New Feature: Enable support for saving user's credentials, and add \"Change User\" and \"Remember Me?\" options",
"author": "cewert"
},
{
"description": "New Feature: Use user's preferred audio language to select default audio track for TV Episodes",
"author": "jimdogx"
},
{
"description": "New Feature: Remove AV1 direct play setting and instead auto-detect device support",
"author": "cewert"
},
{
"description": "New View: Create Album Artists view for music library",
"author": "1hitsong"
},
{
"description": "Bug Fix: Rounded corner on unplayed episode count",
"author": "photonconvergence"
},
{
"description": "Bug Fix: Fix TV Guide bug that didn't allow going to same channel twice in a row",
"author": "jimdogx"
},
{
"description": "Bug Fix: Fix Live TV record button crash",
"author": "jimdogx"
},
{
"description": "Bug Fix: Don't show nextEpisode button if trickplay bar is shown",
"author": "1hitsong"
},
{
"description": "Bug Fix: Improve \"Next Episode\" button show logic",
"author": "cewert"
},
{
"description": "Bug Fix: Fix crash if bitrate limit is enabled and empty",
"author": "jimdogx"
},
{
"description": "Bug Fix: Fix crash when unplayed strms exist in season",
"author": "sevenrats"
},
{
"description": "Bug Fix: Update settings.json to fix double-entry of \"Disable Community Rating for Episodes\"",
"author": "alanazar"
},
{
"description": "Bug Fix: Fix crash when viewing Live TV",
"author": "jimdogx"
},
{
"description": "Bug Fix: Fix long movie options from getting cut off",
"author": "Klikini"
},
{
"description": "Bug Fix: Fix community rating not showing on movie detail page",
"author": "1hitsong"
},
{
"description": "Bug Fix: Fix default A-Z sorting for movies & music",
"author": "1hitsong"
},
{
"description": "Bug Fix: Order boxsets by release date by default",
"author": "1hitsong"
},
{
"description": "Bug Fix: Fix unplayedCount bug when applying filters",
"author": "ApexArray"
},
{
"description": "Bug Fix: Prevent crash by validating Filter Menu data",
"author": "cewert"
},
{
"description": "Bug Fix: Fixed several bugs that could crash the app based on Roku crash logs",
"author": "cewert"
},
{
"description": "Bug Fix: Fix VP9 codec support and downmix 6 channel videos if possible to allow direct play with stereo setups",
"author": "cewert"
},
{
"description": "General Improvement: Convert app to use one spinner and resize for consistency",
"author": "cewert"
},
{
"description": "General Improvement: Increase font size for unwatched episode count",
"author": "cewert"
},
{
"description": "General Improvement: On Home View, use TV Show thumbnail instead of Channel logo",
"author": "jimdogx"
},
{
"description": "General Improvement: Remove progressbar delay and speed up animation on home screen",
"author": "cewert"
},
{
"description": "General Improvement: Copy custom subtitle functionality into new Global Queue Player",
"author": "1hitsong"
},
{
"description": "General Improvement: Update settings page UI to create more space for long radio lists",
"author": "cewert"
},
{
"description": "General Improvement: Update api.sessions.get() + add tanscoding info for Direct Streaming",
"author": "candry7731"
},
{
"description": "General Improvement: Only create trailer button when needed",
"author": "cewert"
},
{
"description": "General Improvement: Update device profile - direct play, transcoding, and codec profiles",
"author": "cewert"
},
{
"description": "General Improvement: Wrap alpha menu",
"author": "1hitsong"
},
{
"description": "Code Cleanup: Create new code for device audio support",
"author": "sevenrats"
},
{
"description": "Code Cleanup: Remove Play Random button & functionality",
"author": "pau1h"
},
{
"description": "For full list of changes, visit our release page: ",
"author": "https://github.com/jellyfin/jellyfin-roku/releases"
}
]

View File

@ -0,0 +1,182 @@
[
{
"description": "New Global Setting: Remember Me setting allowing users to toggle client auto-login",
"author": "cewert"
},
{
"description": "New Setting: Use Web Client's Home Section Arrangement",
"author": "1hitsong"
},
{
"description": "New Feature: Allow selection of TV Show versions",
"author": "jimdogx"
},
{
"description": "New Feature: Add support for TV show season extra features",
"author": "JarodTAerts"
},
{
"description": "New Feature: When connecting to a server, automatically attempt connection using default protocols and ports if not specified",
"author": "sevenrats"
},
{
"description": "New Feature: Fixed permissions when using search",
"author": "matty-r"
},
{
"description": "New Feature: Create video OSD with chapter skip, subtitle select, playback info - Press up, down, ok, or pause while video is playing",
"author": "1hitsong"
},
{
"description": "New Feature: Add support for Music Videos",
"author": "cewert"
},
{
"description": "New Feature: Add photo support to home screen",
"author": "cewert"
},
{
"description": "New Feature: Add quickplay support to entire app - Press play on your remote while highlighting something",
"author": "cewert"
},
{
"description": "New Feature: Update device profile when device capabilities change + enable all device events",
"author": "cewert"
},
{
"description": "New Feature: Enable support for saving user's credentials, and add \"Change User\" and \"Remember Me?\" options",
"author": "cewert"
},
{
"description": "New Feature: Use user's preferred audio language to select default audio track for TV Episodes",
"author": "jimdogx"
},
{
"description": "New Feature: Remove AV1 direct play setting and instead auto-detect device support",
"author": "cewert"
},
{
"description": "New View: Create Album Artists view for music library",
"author": "1hitsong"
},
{
"description": "Bug Fix: Rounded corner on unplayed episode count",
"author": "photonconvergence"
},
{
"description": "Bug Fix: Fix TV Guide bug that didn't allow going to same channel twice in a row",
"author": "jimdogx"
},
{
"description": "Bug Fix: Fix Live TV record button crash",
"author": "jimdogx"
},
{
"description": "Bug Fix: Don't show nextEpisode button if trickplay bar is shown",
"author": "1hitsong"
},
{
"description": "Bug Fix: Improve \"Next Episode\" button show logic",
"author": "cewert"
},
{
"description": "Bug Fix: Fix crash if bitrate limit is enabled and empty",
"author": "jimdogx"
},
{
"description": "Bug Fix: Fix crash when unplayed strms exist in season",
"author": "sevenrats"
},
{
"description": "Bug Fix: Update settings.json to fix double-entry of \"Disable Community Rating for Episodes\"",
"author": "alanazar"
},
{
"description": "Bug Fix: Fix crash when viewing Live TV",
"author": "jimdogx"
},
{
"description": "Bug Fix: Fix long movie options from getting cut off",
"author": "Klikini"
},
{
"description": "Bug Fix: Fix community rating not showing on movie detail page",
"author": "1hitsong"
},
{
"description": "Bug Fix: Fix default A-Z sorting for movies & music",
"author": "1hitsong"
},
{
"description": "Bug Fix: Order boxsets by release date by default",
"author": "1hitsong"
},
{
"description": "Bug Fix: Fix unplayedCount bug when applying filters",
"author": "ApexArray"
},
{
"description": "Bug Fix: Prevent crash by validating Filter Menu data",
"author": "cewert"
},
{
"description": "Bug Fix: Fixed several bugs that could crash the app based on Roku crash logs",
"author": "cewert"
},
{
"description": "Bug Fix: Fix VP9 codec support and downmix 6 channel videos if possible to allow direct play with stereo setups",
"author": "cewert"
},
{
"description": "General Improvement: Convert app to use one spinner and resize for consistency",
"author": "cewert"
},
{
"description": "General Improvement: Increase font size for unwatched episode count",
"author": "cewert"
},
{
"description": "General Improvement: On Home View, use TV Show thumbnail instead of Channel logo",
"author": "jimdogx"
},
{
"description": "General Improvement: Remove progressbar delay and speed up animation on home screen",
"author": "cewert"
},
{
"description": "General Improvement: Copy custom subtitle functionality into new Global Queue Player",
"author": "1hitsong"
},
{
"description": "General Improvement: Update settings page UI to create more space for long radio lists",
"author": "cewert"
},
{
"description": "General Improvement: Update api.sessions.get() + add tanscoding info for Direct Streaming",
"author": "candry7731"
},
{
"description": "General Improvement: Only create trailer button when needed",
"author": "cewert"
},
{
"description": "General Improvement: Update device profile - direct play, transcoding, and codec profiles",
"author": "cewert"
},
{
"description": "General Improvement: Wrap alpha menu",
"author": "1hitsong"
},
{
"description": "Code Cleanup: Create new code for device audio support",
"author": "sevenrats"
},
{
"description": "Code Cleanup: Remove Play Random button & functionality",
"author": "pau1h"
},
{
"description": "For full list of changes, visit our release page: ",
"author": "https://github.com/jellyfin/jellyfin-roku/releases"
}
]

View File

@ -156,11 +156,8 @@ namespace session
' grab lastRunVersion for this user
lastRunVersion = get_user_setting("LastRunVersion")
if isValid(lastRunVersion) and lastRunVersion = m.global.app.version
' Don't update the registry, only update the global session
if isValid(lastRunVersion)
session.user.Update("LastRunVersion", lastRunVersion)
else
set_user_setting("LastRunVersion", m.global.app.version)
end if
' update user session settings with values from registry