Add visitor data (#545)
* Add visitor data * Tweak * Changelog * Do not load video details in video queue view
This commit is contained in:
1 parent
6f74ee61f6
commit
f8988e9d13
27 files changed
+178
-17
No files matched your search
@@ -22,6 +22,7 @@
|
||||
<field id="player" type="node" />
|
||||
<field id="nowPlaying" type="node" />
|
||||
|
||||
<field id="innertube" type="node" />
|
||||
<field id="invidious" type="node" />
|
||||
<field id="notifications" type="node" />
|
||||
<field id="preferences" type="node" />
|
||||
|
||||
@@ -57,7 +57,11 @@ function OnContentSet() as void
|
||||
end if
|
||||
|
||||
AdjustFocus(videoCount)
|
||||
LoadVideoDetailsIfNeeded()
|
||||
' TODO:P1 LoadVideoDetailsIfNeeded is disabled for now.
|
||||
' Trying to fetch video info (especially one by one) can lead to rate limiting.
|
||||
' That would result in all videos being blocked. So for now, this is just a
|
||||
' nice to have, and should not be used.
|
||||
' LoadVideoDetailsIfNeeded()
|
||||
end function
|
||||
|
||||
function OnKeyEvent(key as string, press as boolean) as boolean
|
||||
@@ -143,6 +147,7 @@ function LoadVideoDetailsIfNeeded() as void
|
||||
|
||||
m.loadDetailsTask = AsyncTask.Start(Tasks.VideoQueueViewContentTask, {
|
||||
videoNodes: m.videosDetailsToLoad
|
||||
innertube: m.top.innertube
|
||||
invidious: m.top.invidious
|
||||
preferences: m.top.preferences
|
||||
index: indexInLoadingArray
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<field id="jumpToItem" type="integer" alias="queueList.jumpToItem" />
|
||||
<field id="videoQueue" type="node" />
|
||||
<field id="appController" type="node" />
|
||||
<field id="innertube" type="node" />
|
||||
<field id="invidious" type="node" />
|
||||
<field id="preferences" type="node" />
|
||||
<function name="Show" />
|
||||
|
||||
@@ -7,6 +7,7 @@ import "pkg:/source/utils/MathUtils.bs"
|
||||
@asynctask
|
||||
function VideoQueueViewContentTask(input as object) as object
|
||||
videoNodes = input.videoNodes
|
||||
innertubeNode = input.innertube
|
||||
invidiousNode = input.invidious
|
||||
preferencesNode = input.preferences
|
||||
service = new Invidious.InvidiousService(invidiousNode)
|
||||
@@ -22,6 +23,7 @@ function VideoQueueViewContentTask(input as object) as object
|
||||
cancellation: cancellation
|
||||
tryCount: 1
|
||||
fetchNext: false
|
||||
visitorData: innertubeNode.visitorData
|
||||
}
|
||||
|
||||
' TODO:P1: Use InnertubeService.GetVideoInfoBatched instead of loading each video individually
|
||||
|
||||
@@ -6,6 +6,7 @@ namespace VideoQueueViewUtils
|
||||
videoQueueView = CreateObject("roSGNode", "VideoQueueView")
|
||||
videoQueueView.videoQueue = videoQueue
|
||||
videoQueueView.appController = appController
|
||||
videoQueueView.innertube = videoQueue.innertube
|
||||
videoQueueView.invidious = videoQueue.invidious
|
||||
videoQueueView.preferences = videoQueue.preferences
|
||||
appController@.PushScreen(videoQueueView)
|
||||
|
||||
Reference in new issue
Block a user