Skip to content

Commit

Permalink
fix issue when youtube quota have been used
Browse files Browse the repository at this point in the history
  • Loading branch information
hugurp committed Aug 26, 2020
1 parent d0b77c5 commit 7efa541
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/utils/youtube-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ const fetchTrackAvailability = async function (ytid) {
// let data = await fetchYoutubeTrack(ytid, 'items(id,status)&part=status')
let data = await fetchYoutubeTrack(ytid, 'items(id,snippet(title))&part=snippet')

return Boolean(data.items.length)
if (!data.error) {
return Boolean(data.items.length)
}
return true
}

export {fetchTitle, fetchTrackAvailability};

0 comments on commit 7efa541

Please sign in to comment.