mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Updated thumbnailchecking
- Borrowing youtube 404 image for now if someone tries to trick the server to use other thumbnail than soundlcoud thumbnail when adding soundcloud song - Setting thumbnail in db even for youtube-videos, for more consistency
This commit is contained in:
@@ -372,7 +372,7 @@ var Search = {
|
||||
|
||||
if((!not_matched)){
|
||||
matched = true;
|
||||
Search.readySubmit(true, { id: data.id, title: data.snippet.title, source: "youtube", duration: duration, totalLength: totalNumber - 1});
|
||||
Search.readySubmit(true, { id: data.id, title: data.snippet.title, source: "youtube", thumbnail: "https://img.youtube.com/vi/" + data.id + "/mqdefault.jpg", duration: duration, totalLength: totalNumber - 1});
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -615,7 +615,7 @@ addVideos: function(ids){
|
||||
enc_title= song.snippet.title;//encodeURIComponent(song.snippet.title);
|
||||
//Search.submit(song.id, enc_title, duration, playlist, i);
|
||||
x += 1;
|
||||
Search.submitYouTubeArray.push({id: song.id, title: enc_title, duration: duration});
|
||||
Search.submitYouTubeArray.push({id: song.id, title: enc_title, duration: duration, source: "youtube", thumbnail: "https://img.youtube.com/vi/" + song.id + "/mqdefault.jpg"});
|
||||
}
|
||||
}
|
||||
if(more) Search.addVideos(next_ids);
|
||||
|
||||
Reference in New Issue
Block a user