Move hacky link to Invidious

This commit is contained in:
Brahim Hadriche committed 2022-11-07 15:38:38 -05:00
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()
+11 -1
View File
@@ -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