Merge pull request #142 from omarroth/fields-api

Only request published field from Invidious API
This commit is contained in:
Ajay Ramachandran
2019-08-31 17:14:31 -04:00
committed by GitHub

View File

@@ -376,7 +376,7 @@ function sponsorsLookup(id) {
//check if this video was uploaded recently
//use the invidious api to get the time published
sendRequestToCustomServer('GET', "https://invidio.us/api/v1/videos/" + id, function(xmlhttp, error) {
sendRequestToCustomServer('GET', "https://invidio.us/api/v1/videos/" + id + '?fields=published', function(xmlhttp, error) {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
let unixTimePublished = JSON.parse(xmlhttp.responseText).published;