Playlet decipher server (#691)
* Playlet decipher server * cache sts * wip * PoToken per video * remove unused param * potoken mandatory for videos * separate potoken option * logging * rename * /player with auth * Refactor rename * Fix rename * parse isloggedin tweak * TODO * get rid of hardcoded formats * Remove hardcoded formats in web app * refactor * no cache for sts request * [skip ci] todo * [skip ci] update PRVACY * No visitor data if we're using a profile * Cancellation * remove visitor data header for authed /player * iOS fallback for live videos * changelog * revert using dashUrl * refactor
This commit is contained in:
1 parent
f29f0b3654
commit
7518831b65
15 files changed
+408
-145
No files matched your search
@@ -43,10 +43,22 @@ function ExecuteJob() as void
|
||||
visitorData = message.getData()
|
||||
end if
|
||||
|
||||
accessToken = invalid
|
||||
onBehalfOfUser = invalid
|
||||
authToken = invidiousNode.authToken
|
||||
if authToken <> invalid and authToken.profileNode <> invalid and authToken.profileNode.type = "youtube" and not StringUtils.IsNullOrEmpty(authToken.token)
|
||||
accessToken = authToken.token
|
||||
onBehalfOfUser = authToken.activeIdentifyToken
|
||||
end if
|
||||
|
||||
metadata = InnertubeService.GetVideoMetadata(contentNode.videoId, {
|
||||
"cancellation": cancellation
|
||||
"credentialTransferToken": loungeServiceNode.credentialTransferToken
|
||||
"visitorData": visitorData
|
||||
"accessToken": accessToken
|
||||
"onBehalfOfUser": onBehalfOfUser
|
||||
"signatureTimestamp": true
|
||||
"poToken": true
|
||||
})
|
||||
else
|
||||
metadata = service.GetVideoMetadata(contentNode.videoId, { cancellation: m.top.cancellation })
|
||||
@@ -86,6 +98,7 @@ function ExecuteJob() as void
|
||||
playletStreamUrlIndex: 0
|
||||
})
|
||||
|
||||
LogDebug("Setting first url:", streamUrls[0])
|
||||
contentNode.url = streamUrls[0]
|
||||
|
||||
SetCaptions(metadata, service, contentNode)
|
||||
@@ -149,7 +162,7 @@ function AddDashUrls(streamUrls as object, metadata as object, preferredQuality
|
||||
' dynamically generating the DASH manifest, and filter quality
|
||||
dashUrl = UrlUtils.AppendQueryParams(`http://127.0.0.1:${playletServerPort}/api/dash`, {
|
||||
v: metadata.videoId
|
||||
ytjs: ValidBool(metadata.ytjs)
|
||||
hasDecodedDashUrls: ValidBool(metadata.hasDecodedDashUrls)
|
||||
})
|
||||
|
||||
dashUrlLocal = invalid
|
||||
|
||||
Reference in new issue
Block a user