Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear playlet lib arg #84

Merged
merged 2 commits into from
Jun 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- New preferences system
- Unified settings between TV and web app
- Web API allowing to import/export preferences (no UI for that yet)
- Added launch argument `clearPlayletLibUrls`
- If the dev menu is used to load a custom Playlet lib url, but the lib does not have a functionality to revert back, `curl -d '' "http://$ROKU_DEV_TARGET:8060/launch/dev?clearPlayletLibUrls=true"` can be used to remove the custom lib, and revert to using default.

### Changed

Expand Down
9 changes: 9 additions & 0 deletions playlet/src/source/Main.bs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ function Main(args as object) as void
screen.setMessagePort(m.port)
m.global = screen.getGlobalNode()

ClearPlayletLibUrlsIfNeeded(args)

scene = screen.CreateScene("BootstrapScene")
screen.show()

Expand Down Expand Up @@ -70,3 +72,10 @@ function Main(args as object) as void
end while

end function

function ClearPlayletLibUrlsIfNeeded(launchArgs as object) as void
if launchArgs = invalid or launchArgs.clearPlayletLibUrls = invalid
return
end if
DeleteRegistryKey("playlet_lib_urls", "Playlet")
end function