Move hacky link to Invidious
This commit is contained in:
1 parent
42101c5350
commit
38f03a838c
2 files changed
+12
-14
No files matched your search
@@ -23,19 +23,7 @@ end sub
|
||||
function GetVideoMetadata()
|
||||
videoId = m.top.getField("videoid")
|
||||
|
||||
videoMetadata = RokuYoutube.Services.Invidious.GetVideoMetadata(videoId)
|
||||
lastItag = videoMetadata.formatStreams[videoMetadata.formatStreams.Count() - 1].itag
|
||||
|
||||
' GetVideoUrl returns a url that redirects to the video stream
|
||||
' TODO: is this reliable?
|
||||
videoUrl = RokuYoutube.Services.Invidious.GetVideoUrl(videoId, lastItag, false)
|
||||
|
||||
videoMetadata.formatStreams.push({
|
||||
itag: lastItag,
|
||||
url: videoUrl
|
||||
})
|
||||
|
||||
return videoMetadata
|
||||
return RokuYoutube.Services.Invidious.GetVideoMetadata(videoId)
|
||||
end function
|
||||
|
||||
function GetVideoSponsorBlock()
|
||||
|
||||
@@ -73,7 +73,17 @@ namespace RokuYoutube.Services.Invidious
|
||||
|
||||
' TODO: handle 500 {"error":"This video is unavailable"}
|
||||
if response.statuscode = 200
|
||||
return response.json
|
||||
videoMetadata = response.json
|
||||
lastItag = videoMetadata.formatStreams[videoMetadata.formatStreams.Count() - 1].itag
|
||||
|
||||
' GetVideoUrl returns a url that redirects to the video stream
|
||||
' TODO: is this reliable?
|
||||
videoUrl = RokuYoutube.Services.Invidious.GetVideoUrl(videoId, lastItag, false)
|
||||
|
||||
videoMetadata.formatStreams.push({
|
||||
itag: lastItag,
|
||||
url: videoUrl
|
||||
})
|
||||
end if
|
||||
end function
|
||||
|
||||
|
||||
Reference in new issue
Block a user