SponsorBlock categories (#634)

* SponsorBlock categories

* perf

* remove todo

* tweak

* UI is working

* Lint fix

* changelog

* Bug fix

* Restore timer

* Locale

* Comment

* tweaks

* web app

* remove unsued svelte ignore

* lint web app

---------

Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
Brahim Hadricheandgithub-action linter authored and GitHub committed 2025-06-01 15:30:58 -04:00
1 parent 0bc5ab6117
commit fcae05a0da
34 files changed
+1039 -422

No files matched your search

@@ -1,4 +1,5 @@
import "pkg:/components/Services/SponsorBlock/SponsorBlockService.bs"
import "pkg:/components/VideoPlayer/SponsorBlockSegmentAction.bs"
function Init()
m.categoryLabel = m.top.findNode("categoryLabel")
@@ -13,16 +14,7 @@ function Init()
m.service = SponsorBlock.SponsorBlockService()
end function
function OnActionSet()
action = m.top.action
category = m.top.segment.category
categoryTitle = Tr(ValidString(m.service.SegmentShortTitle(category)))
if action = "AutoSkip"
m.categoryLabel.text = Tr(Locale.SponsorBlock.Skipped) + `\n` + categoryTitle
else
m.categoryLabel.text = categoryTitle
end if
function OnDoShow() as void
AnimateIn()
end function