Get durations with one GET request
First of all, let me congratulate you for this very nice app! Very well done! I like it.
Just a minor thing that I would like to point out, is that the video durations can be retrieved with a single GET request, by providing the video IDs as a string of comma separated values, which will improve the performance of the app.
For example, given the following list of video IDs ("o8NPllzkFhE" "pQWj2Fgxdrc" "jYUZAF3ePFE")
, you can make the following GET request:
https://www.googleapis.com/youtube/v3/videos?id=o8NPllzkFhE,pQWj2Fgxdrc,jYUZAF3ePFE&key=[...]&part=contentDetails,statistics,snippet&prettyPrint=false
This is from YouTube's API reference:
The id parameter specifies a comma-separated list of the YouTube video ID(s) for the resource(s) that are being retrieved. In a video resource, the id property specifies the video's ID.
See: https://developers.google.com/youtube/v3/docs/videos/list