1
0
mirror of https://github.com/snobu/destreamer.git synced 2026-01-27 02:12:19 +00:00

Fix group download, added 100 video limit

This commit is contained in:
Adrian Calinescu
2020-11-14 19:56:59 +02:00
committed by GitHub
parent eacb2b63c1
commit 4a45c68943

View File

@@ -23,7 +23,8 @@ async function extractGuids(url: string, client: ApiClient): Promise<Array<strin
const videoNumber: number = await client.callApi(`groups/${groupMatch[1]}`, 'get')
.then((response: AxiosResponse<any> | undefined) => response?.data.metrics.videos);
const result: Array<string> = await client.callApi(`groups/${groupMatch[1]}/videos?$top=${videoNumber}&$orderby=publishedDate asc`, 'get')
// Anything above $top=100 results in 400 Bad Request
const result: Array<string> = await client.callApi(`groups/${groupMatch[1]}/videos?$top=100&$orderby=publishedDate asc`, 'get')
.then((response: AxiosResponse<any> | undefined) => response?.data.value.map((item: any) => item.id));
return result;