[Spike] ytjs and botguard in web app (#638)
* [Spike] ytjs and boguard in web app * storyboards and captions * cache potoken * captions fix * Increase session data to 7 days * changelog * Fix missing timestamp issue
This commit is contained in:
1 parent
002307c45b
commit
03679b781c
12 files changed
+628
-20
No files matched your search
@@ -19,16 +19,19 @@ function VideoContentTask(input as object) as object
|
||||
end if
|
||||
|
||||
service = new Invidious.InvidiousService(invidiousNode)
|
||||
|
||||
backend = preferencesNode["backend.selected"]
|
||||
if backend = "playlet"
|
||||
metadata = InnertubeService.GetVideoMetadata(contentNode.videoId, {
|
||||
"cancellation": m.top.cancellation
|
||||
"credentialTransferToken": loungeServiceNode.credentialTransferToken
|
||||
"visitorData": innertubeNode.visitorData
|
||||
})
|
||||
else
|
||||
metadata = service.GetVideoMetadata(contentNode.videoId, { cancellation: m.top.cancellation })
|
||||
|
||||
metadata = contentNode.metadata
|
||||
if not IsAssociativeArray(metadata)
|
||||
if backend = "playlet"
|
||||
metadata = InnertubeService.GetVideoMetadata(contentNode.videoId, {
|
||||
"cancellation": m.top.cancellation
|
||||
"credentialTransferToken": loungeServiceNode.credentialTransferToken
|
||||
"visitorData": innertubeNode.visitorData
|
||||
})
|
||||
else
|
||||
metadata = service.GetVideoMetadata(contentNode.videoId, { cancellation: m.top.cancellation })
|
||||
end if
|
||||
end if
|
||||
|
||||
if metadata = invalid
|
||||
@@ -140,7 +143,11 @@ end function
|
||||
function AddDashUrls(streamUrls as object, metadata as object, preferredQuality as string, backend as string, proxyVideos as string, playletServerPort as integer) as void
|
||||
' Redirect to Playet's local web server, where will will be
|
||||
' dynamically generating the DASH manifest, and filter quality
|
||||
dashUrl = UrlUtils.AppendQueryParams(`http://127.0.0.1:${playletServerPort}/api/dash`, { v: metadata.videoId })
|
||||
dashUrl = UrlUtils.AppendQueryParams(`http://127.0.0.1:${playletServerPort}/api/dash`, {
|
||||
v: metadata.videoId
|
||||
ytjs: ValidBool(metadata.ytjs)
|
||||
})
|
||||
|
||||
dashUrlLocal = invalid
|
||||
dashUrlFiltered = invalid
|
||||
dashUrlFilteredLocal = invalid
|
||||
|
||||
@@ -138,6 +138,10 @@ function PlayWithContent(contentNode as object)
|
||||
if not StringUtils.IsNullOrEmpty(contentNode._author)
|
||||
videoContentNode.secondaryTitle = contentNode._author
|
||||
end if
|
||||
metadata = contentNode.metadata
|
||||
if IsAssociativeArray(metadata)
|
||||
videoContentNode.AddFields({ metadata: metadata })
|
||||
end if
|
||||
|
||||
StartVideoContentTask(videoContentNode)
|
||||
Lounge.SendNowPlayingLoading(contentNode.videoId)
|
||||
|
||||
Reference in new issue
Block a user