@@ -183,6 +183,9 @@ export default function youTubeSource(uw, opts = {}) {
183183 const playlistItems = [ ] ;
184184 try {
185185 do {
186+ // This `await` is OK since we need to fetch this page to find out how
187+ // to fetch the next.
188+ // eslint-disable-next-line no-await-in-loop
186189 const res = await getPlaylistPage ( playlistID , page ) ;
187190 page = res . nextPage ;
188191 playlistItems . push ( ...res . items ) ;
@@ -291,6 +294,9 @@ export default function youTubeSource(uw, opts = {}) {
291294 const playlists = [ ] ;
292295 let page ;
293296 do {
297+ // This `await` is OK since we need to fetch this page to find out how
298+ // to fetch the next.
299+ // eslint-disable-next-line no-await-in-loop
294300 const res = await getChannelPlaylistsPage ( channelID , page ) ;
295301 page = res . nextPage ;
296302 playlists . push ( ...res . items ) ;
@@ -332,23 +338,23 @@ export default function youTubeSource(uw, opts = {}) {
332338
333339 async function doImport ( ctx , name , playlistID ) {
334340 const items = await getPlaylistItems ( playlistID ) ;
335- return await ctx . createPlaylist ( name , items ) ;
341+ return ctx . createPlaylist ( name , items ) ;
336342 }
337343
338344 return {
339345 search,
340346 get : get , // eslint-disable-line object-shorthand
341347 async import ( ctx , action ) {
342348 if ( action . action === 'channel' ) {
343- return await getPlaylistMetasForUser ( action . url ) ;
349+ return getPlaylistMetasForUser ( action . url ) ;
344350 }
345351 if ( action . action === 'playlist' ) {
346352 const importable = await getImportablePlaylist ( action . url ) ;
347353 importable . items = ctx . source . addSourceType ( importable . items ) ;
348354 return importable ;
349355 }
350356 if ( action . action === 'importplaylist' ) {
351- return await doImport ( ctx , action . name , action . id ) ;
357+ return doImport ( ctx , action . name , action . id ) ;
352358 }
353359
354360 throw new TypeError ( `Unknown action "${ action } "` ) ;
0 commit comments