mirror of
https://github.com/BluemediaGER/muse.git
synced 2024-11-23 09:15:29 +01:00
Merge pull request #358 from Hellysonrp/fix-playlist-load
This commit is contained in:
commit
a8676e6ebd
|
@ -139,18 +139,20 @@ export default class {
|
||||||
// Start fetching extra details about videos
|
// Start fetching extra details about videos
|
||||||
videoDetailsPromises.push((async () => {
|
videoDetailsPromises.push((async () => {
|
||||||
// Unfortunately, package doesn't provide a method for this
|
// Unfortunately, package doesn't provide a method for this
|
||||||
const {items: videoDetailItems} = await this.cache.wrap(
|
const p = {
|
||||||
async () => got(
|
|
||||||
'https://www.googleapis.com/youtube/v3/videos',
|
|
||||||
{
|
|
||||||
searchParams: {
|
searchParams: {
|
||||||
part: 'contentDetails',
|
part: 'contentDetails',
|
||||||
id: items.map(item => item.contentDetails.videoId).join(','),
|
id: items.map(item => item.contentDetails.videoId).join(','),
|
||||||
key: this.youtubeKey,
|
key: this.youtubeKey,
|
||||||
responseType: 'json',
|
responseType: 'json',
|
||||||
},
|
},
|
||||||
},
|
};
|
||||||
|
const {items: videoDetailItems} = await this.cache.wrap(
|
||||||
|
async () => got(
|
||||||
|
'https://www.googleapis.com/youtube/v3/videos',
|
||||||
|
p,
|
||||||
).json() as Promise<{items: VideoDetailsResponse[]}>,
|
).json() as Promise<{items: VideoDetailsResponse[]}>,
|
||||||
|
p,
|
||||||
{
|
{
|
||||||
expiresIn: ONE_MINUTE_IN_SECONDS,
|
expiresIn: ONE_MINUTE_IN_SECONDS,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue