From 81ef7e25313c863854c8d046bac1fd62bdadc3b9 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Wed, 6 Dec 2023 10:39:05 -0500 Subject: [PATCH 1/7] fix lastrunversion migration + make whats new show per user --- source/Main.bs | 18 ++++++++++-------- source/migrations.bs | 2 +- source/utils/session.bs | 5 +---- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/source/Main.bs b/source/Main.bs index 2eac42098..dd2b4716d 100644 --- a/source/Main.bs +++ b/source/Main.bs @@ -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,15 @@ 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? + if 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 diff --git a/source/migrations.bs b/source/migrations.bs index 1d4979110..29cb36a37 100644 --- a/source/migrations.bs +++ b/source/migrations.bs @@ -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 diff --git a/source/utils/session.bs b/source/utils/session.bs index a468a5605..71fe1fbf4 100644 --- a/source/utils/session.bs +++ b/source/utils/session.bs @@ -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 From 8e457a59238270dd5a5af7c7160b82ac5eb7bb9b Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Wed, 6 Dec 2023 11:04:22 -0500 Subject: [PATCH 2/7] show app version in whats new popup --- components/WhatsNewDialog.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/WhatsNewDialog.bs b/components/WhatsNewDialog.bs index 5718377b2..a0aa9c09d 100644 --- a/components/WhatsNewDialog.bs +++ b/components/WhatsNewDialog.bs @@ -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 = { From 074e7586e65957e96ae50067f9da9b0a9ae8fe63 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Wed, 6 Dec 2023 11:15:25 -0500 Subject: [PATCH 3/7] save whats new json file as app version --- components/WhatsNewDialog.bs | 2 +- source/static/whatsNew.json | 182 ------------------------------ source/static/whatsNew/2.0.0.json | 182 ++++++++++++++++++++++++++++++ 3 files changed, 183 insertions(+), 183 deletions(-) delete mode 100644 source/static/whatsNew.json create mode 100644 source/static/whatsNew/2.0.0.json diff --git a/components/WhatsNewDialog.bs b/components/WhatsNewDialog.bs index a0aa9c09d..b656ac7a9 100644 --- a/components/WhatsNewDialog.bs +++ b/components/WhatsNewDialog.bs @@ -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") diff --git a/source/static/whatsNew.json b/source/static/whatsNew.json deleted file mode 100644 index ebe5b135b..000000000 --- a/source/static/whatsNew.json +++ /dev/null @@ -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" - } -] \ No newline at end of file diff --git a/source/static/whatsNew/2.0.0.json b/source/static/whatsNew/2.0.0.json new file mode 100644 index 000000000..379cc60ff --- /dev/null +++ b/source/static/whatsNew/2.0.0.json @@ -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" + } +] From 7a53b4a4c7bf933f6d50528b38428f550d96e452 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Wed, 6 Dec 2023 11:26:55 -0500 Subject: [PATCH 4/7] fix crash with new users --- source/utils/session.bs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/utils/session.bs b/source/utils/session.bs index 71fe1fbf4..8ce892ef9 100644 --- a/source/utils/session.bs +++ b/source/utils/session.bs @@ -158,6 +158,9 @@ namespace session lastRunVersion = get_user_setting("LastRunVersion") if isValid(lastRunVersion) session.user.Update("LastRunVersion", lastRunVersion) + else + ' new user whos never ran the app before. update lastrunversion in registry + set_user_setting("LastRunVersion", m.global.app.lastRunVersion) end if ' update user session settings with values from registry From 83e6541d7560b25d647d7eef022d73faf40e942e Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Wed, 6 Dec 2023 15:15:32 -0500 Subject: [PATCH 5/7] make sure we use the current version of the app --- source/utils/session.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/utils/session.bs b/source/utils/session.bs index 8ce892ef9..aa020928a 100644 --- a/source/utils/session.bs +++ b/source/utils/session.bs @@ -160,7 +160,7 @@ namespace session session.user.Update("LastRunVersion", lastRunVersion) else ' new user whos never ran the app before. update lastrunversion in registry - set_user_setting("LastRunVersion", m.global.app.lastRunVersion) + set_user_setting("LastRunVersion", m.global.app.version) end if ' update user session settings with values from registry From 1c1dec72b18e0d06314d242e820d5c3b6d0cec66 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Wed, 6 Dec 2023 19:22:36 -0500 Subject: [PATCH 6/7] add "what's new?" to translation file --- locale/en_US/translations.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/locale/en_US/translations.ts b/locale/en_US/translations.ts index 1fe478489..6b8ff42f2 100644 --- a/locale/en_US/translations.ts +++ b/locale/en_US/translations.ts @@ -1241,5 +1241,10 @@ 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. User Setting - Setting description + + What's New? + What's New? + Popup title - Popup displays all the major changes to the app since the last version + \ No newline at end of file From ed9356d7c3a9e9bf4df092a78505a6ed2729f778 Mon Sep 17 00:00:00 2001 From: Charles Ewert Date: Wed, 6 Dec 2023 19:33:48 -0500 Subject: [PATCH 7/7] allow users lastrunversion to be invalid. update value and show whats new after login if value is invalid --- source/Main.bs | 3 ++- source/utils/session.bs | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/source/Main.bs b/source/Main.bs index dd2b4716d..2ef81455d 100644 --- a/source/Main.bs +++ b/source/Main.bs @@ -73,7 +73,8 @@ sub Main (args as dynamic) as void end if ' has the current user ran this version before? - if not versionChecker(m.global.session.user.settings.lastRunVersion, m.global.app.version) + 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"] diff --git a/source/utils/session.bs b/source/utils/session.bs index aa020928a..71fe1fbf4 100644 --- a/source/utils/session.bs +++ b/source/utils/session.bs @@ -158,9 +158,6 @@ namespace session lastRunVersion = get_user_setting("LastRunVersion") if isValid(lastRunVersion) session.user.Update("LastRunVersion", lastRunVersion) - else - ' new user whos never ran the app before. update lastrunversion in registry - set_user_setting("LastRunVersion", m.global.app.version) end if ' update user session settings with values from registry