Create Component Library (#43)
* Move src under playlet-lib * Update configuration * Update script * Update script * Working version * Vs code config WIP * Package lock sync * Lint fix * Fix images * Reuse config files * Kind of a working setup * Lock node version * Rename scripts to tools * Fix build scripts, lib url system * Lint fix * rale * Fix args and web server * Load fallbacks and build script cleanups * Remove unused method * no message * no message * Remove generic message field * Lint fix * no message * Use loading indicator on main app * Add playlet lib version to settings --------- Co-authored-by: github-action linter <githubaction@githubaction.com>
This commit is contained in:
1 parent
90df81df4b
commit
9d8a3d1cea
156 files changed
+3341
-213
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import "pkg:/source/services/SponsorBlock.bs"
|
||||
|
||||
@asynctask
|
||||
function SponsorBlockTask(input as object) as object
|
||||
videoId = input.videoId
|
||||
|
||||
sponsorBlockResponse = SponsorBlock.GetSkipSegmentsForVideo(videoId)
|
||||
barPath = invalid
|
||||
|
||||
skipSegments = []
|
||||
if sponsorBlockResponse <> invalid
|
||||
for each segment in sponsorBlockResponse
|
||||
if segment.videoDuration > 0
|
||||
skipSegments.push(segment)
|
||||
end if
|
||||
end for
|
||||
end if
|
||||
|
||||
if skipSegments.Count() = 0
|
||||
skipSegments = invalid
|
||||
end if
|
||||
|
||||
if skipSegments <> invalid
|
||||
barPath = `tmp:/sponsorblock_bar_${videoId}.png`
|
||||
SponsorBlock.GenerateProgressBarBackground(skipSegments, barPath)
|
||||
end if
|
||||
|
||||
return {
|
||||
videoId: videoId,
|
||||
skipSegments: skipSegments,
|
||||
barPath: barPath
|
||||
}
|
||||
end function
|
||||
Reference in new issue
Block a user