Add Channel support (#144)
* Add Channel support * Cross fade * add todo
This commit is contained in:
1 parent
38a054a46a
commit
f452bf23de
16 files changed
+347
-60
No files matched your search
@@ -16,6 +16,7 @@ namespace Invidious
|
||||
|
||||
const VIDEOS_ENDPOINT = "/api/v1/videos"
|
||||
const PLAYLISTS_ENDPOINT = "/api/v1/playlists"
|
||||
const CHANNELS_ENDPOINT = "/api/v1/channels"
|
||||
const HISTORY_ENDPOINT = "/api/v1/auth/history"
|
||||
|
||||
const SEARCH_SUGGEST_ENDPOINT = "/api/v1/search/suggestions"
|
||||
@@ -136,6 +137,17 @@ namespace Invidious
|
||||
return request.Await()
|
||||
end function
|
||||
|
||||
function GetChannel(authorId as string, cancellation = invalid as object) as object
|
||||
instance = m.GetInstance()
|
||||
url = `${instance}${Invidious.CHANNELS_ENDPOINT}/${authorId}`
|
||||
|
||||
request = HttpClient.Get(url)
|
||||
request.QueryParams(m.DefaultQueryParams())
|
||||
request.Cancellation(cancellation)
|
||||
|
||||
return request.Await()
|
||||
end function
|
||||
|
||||
function GetVideoStreamUrl(videoId as string) as string
|
||||
instance = m.GetInstance()
|
||||
return `${instance}/latest_version?id=${videoId}`
|
||||
|
||||
Reference in new issue
Block a user