Feature/optimize task imports (#257)
* Prune empty code files * delete file * Restore * refactor * fix warnings * Fix tasks * Add diag * tweak * Log load times * changelog
This commit is contained in:
1 parent
641c9ef5bf
commit
5335a0273b
26 files changed
+221
-256
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import "pkg:/components/Services/SponsorBlock/Notifications/SponsorBlockNotificationUtils.bs"
|
||||
import "pkg:/components/Services/SponsorBlock/SponsorBlockSegmentViewedTask.bs"
|
||||
import "pkg:/components/Services/SponsorBlock/SponsorBlockTask.bs"
|
||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||
import "pkg:/components/Services/SponsorBlock/SponsorBlockService.bs"
|
||||
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||
|
||||
namespace SponsorBlock
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace SponsorBlock
|
||||
m.sponsorBlockTask.cancel = true
|
||||
end if
|
||||
|
||||
m.sponsorBlockTask = StartAsyncTask(SponsorBlockTask, { metadata: metadata }, OnSponsorBlockTaskResults)
|
||||
m.sponsorBlockTask = AsyncTask.Start(Tasks.SponsorBlockTask, { metadata: metadata }, OnSponsorBlockTaskResults)
|
||||
end function
|
||||
|
||||
function OnSponsorBlockTaskResults(output as object) as void
|
||||
@@ -172,7 +172,7 @@ namespace SponsorBlock
|
||||
end function
|
||||
|
||||
function SendSkippedSectionEvent(segmentId as string)
|
||||
StartAsyncTask(SponsorBlockSegmentViewedTask, { segmentId: segmentId })
|
||||
AsyncTask.Start(Tasks.SponsorBlockSegmentViewedTask, { segmentId: segmentId })
|
||||
end function
|
||||
|
||||
end namespace
|
||||
@@ -1,11 +1,10 @@
|
||||
import "pkg:/components/Dialog/DialogUtils.bs"
|
||||
import "pkg:/components/Services/Invidious/InvidiousToContentNode.bs"
|
||||
import "pkg:/components/VideoPlayer/MarkVideoWatchedTask.bs"
|
||||
import "pkg:/components/VideoPlayer/SponsorBlock.bs"
|
||||
import "pkg:/components/VideoPlayer/VideoContentTask.bs"
|
||||
import "pkg:/components/VideoPlayer/VideoPlayerStyle.bs"
|
||||
import "pkg:/components/VideoPlayer/VideoUtils.bs"
|
||||
import "pkg:/source/asyncTask/asyncTask.bs"
|
||||
import "pkg:/source/AsyncTask/AsyncTask.bs"
|
||||
import "pkg:/source/AsyncTask/Tasks.bs"
|
||||
import "pkg:/source/utils/ErrorUtils.bs"
|
||||
import "pkg:/source/utils/Logging.bs"
|
||||
|
||||
@@ -77,7 +76,7 @@ function StartVideoContentTask(videoContentNode as object)
|
||||
|
||||
m.top.content = videoContentNode
|
||||
|
||||
m.videoContentTask = StartAsyncTask(VideoContentTask, {
|
||||
m.videoContentTask = AsyncTask.Start(Tasks.VideoContentTask, {
|
||||
content: videoContentNode
|
||||
invidious: m.top.invidious
|
||||
preferences: m.top.preferences
|
||||
@@ -118,7 +117,7 @@ end function
|
||||
|
||||
function MarkVideoWatched(videoId as string)
|
||||
if m.top.invidious.authToken <> invalid
|
||||
StartAsyncTask(MarkVideoWatchedTask, {
|
||||
AsyncTask.Start(Tasks.MarkVideoWatchedTask, {
|
||||
videoId: videoId
|
||||
invidious: m.top.invidious
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user