1
0
mirror of https://github.com/snobu/destreamer.git synced 2026-01-30 11:52:18 +00:00

Fix group download, now limited to first 100 videos

This commit is contained in:
snobu
2020-11-14 19:54:50 +02:00
parent ac0fdf5468
commit ad483f3eb7
2 changed files with 5 additions and 2 deletions

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);
let result: Array<string> = await client.callApi(`groups/${groupMatch[1]}/videos?$top=${videoNumber}&$orderby=publishedDate asc`, 'get')
// Anything over $top=100 will return a 400 Bad Request
let 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;