Refactor format stream url
This commit is contained in:
1 parent
5c43bdf904
commit
b7e6a1ea83
3 files changed
+14
-12
No files matched your search
@@ -42,15 +42,24 @@ namespace Invidious
|
||||
return invalid
|
||||
end function
|
||||
|
||||
function GetVideoUrl(videoId as string, itag as string, local as boolean) as string
|
||||
function GetVideoStreamUrl(videoId as string, local as boolean) as string
|
||||
instance = InvidiousSettings.GetSelectedInstance()
|
||||
url = `${instance}/latest_version?id=${videoId}&itag=${itag}`
|
||||
url = `${instance}/latest_version?id=${videoId}`
|
||||
if local
|
||||
url = url + "&local=true"
|
||||
end if
|
||||
return url
|
||||
end function
|
||||
|
||||
function GetVideoDashUrl(videoId as string, local as boolean) as string
|
||||
instance = InvidiousSettings.GetSelectedInstance()
|
||||
url = `${instance}/api/manifest/dash/id/${videoId}`
|
||||
if local
|
||||
url = url + "?local=true"
|
||||
end if
|
||||
return url
|
||||
end function
|
||||
|
||||
function GetVideoMetadata(videoId as string) as object
|
||||
instance = InvidiousSettings.GetSelectedInstance()
|
||||
url = `${instance}${Invidious.VIDEOS_ENDPOINT}/${videoId}`
|
||||
|
||||
Reference in new issue
Block a user