SponsorBlock Notification (#47)
* SponsorBlock Notification * Lint fix * Reuse animation for multiple skips * Small change * Rename color utils * Lint fix --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
1 parent
9697ac58d0
commit
e0020ffa66
17 files changed
+460
-62
No files matched your search
@@ -1,9 +1,13 @@
|
||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||
import "pkg:/components/VideoPlayer/SponsorBlockTask.bs"
|
||||
import "pkg:/components/VideoPlayer/SponsorBlockTrackingTask.bs"
|
||||
import "pkg:/components/SponsorBlockNotification/SponsorBlockNotificationManager.bs"
|
||||
|
||||
function SetupSponsorBlock()
|
||||
PositionChapterLabel()
|
||||
|
||||
SponsorBlockNotifcationSetVisible(m.videoContainer.fullscreen)
|
||||
|
||||
m.timeLabel = FindTimeLabel()
|
||||
m.top.trickPlayBar.observeField("visible", "OnTrickPlayBarVisible")
|
||||
m.chapterLabelTimer = m.top.findNode("chapterLabelTimer")
|
||||
@@ -123,6 +127,7 @@ function OnPositionChangeSkipSponsorBlockSections() as void
|
||||
' TODO: if segmentEnd is at the end of the video, close video
|
||||
m.top.seek = segmentEnd
|
||||
print("Skipping section:" + segment["category"])
|
||||
ShowSponsorBlockNotifcation(segment)
|
||||
SendSkippedSectionEvent(segment.UUID)
|
||||
return
|
||||
end if
|
||||
|
||||
Reference in new issue
Block a user