mirror of
https://github.com/snobu/destreamer.git
synced 2026-03-17 01:15:59 +00:00
Fix group download, added 100 video limit
This commit is contained in:
@@ -23,7 +23,8 @@ async function extractGuids(url: string, client: ApiClient): Promise<Array<strin
|
|||||||
const videoNumber: number = await client.callApi(`groups/${groupMatch[1]}`, 'get')
|
const videoNumber: number = await client.callApi(`groups/${groupMatch[1]}`, 'get')
|
||||||
.then((response: AxiosResponse<any> | undefined) => response?.data.metrics.videos);
|
.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));
|
.then((response: AxiosResponse<any> | undefined) => response?.data.value.map((item: any) => item.id));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user