mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Fix for suggestions not appearing
This commit is contained in:
@@ -2167,6 +2167,7 @@ nav ul li:hover, nav ul li.active {
|
||||
|
||||
#suggestions {
|
||||
padding-bottom: 20px;
|
||||
min-height: calc(100vh - 64px - 64px - 87px);
|
||||
}
|
||||
|
||||
.tabs_height{
|
||||
|
||||
@@ -309,6 +309,7 @@ var Player = {
|
||||
else s = Player.np.start;
|
||||
if(end) e = end;
|
||||
else e = Player.np.end;
|
||||
Suggestions.fetchYoutubeSuggests(id);
|
||||
if(chromecastAvailable){
|
||||
castSession.sendMessage("urn:x-cast:zoff.me", {start: s, end: e, type: "loadVideo", videoId: id, channel: chan.toLowerCase(), source: videoSource});
|
||||
chrome.cast.media.GenericMediaMetadata({metadataType: 0, title:song_title, image: 'https://img.youtube.com/vi/'+id+'/mqdefault.jpg', images: ['https://img.youtube.com/vi/'+id+'/mqdefault.jpg']});
|
||||
@@ -358,7 +359,7 @@ var Player = {
|
||||
else s = Player.np.start;
|
||||
if(end) e = end;
|
||||
else e = Player.np.end;
|
||||
|
||||
Suggestions.fetchYoutubeSuggests(id);
|
||||
if(videoSource == "soundcloud") {
|
||||
try {
|
||||
Player.player.stopVideo();
|
||||
|
||||
@@ -37,7 +37,13 @@ var Suggestions = {
|
||||
},
|
||||
|
||||
fetchYoutubeSuggests: function(id){
|
||||
if(videoSource == "soundcloud") return;
|
||||
if(videoSource == "soundcloud") {
|
||||
Helper.addClass(document.querySelector(".suggest-title-info"), "hide");
|
||||
Helper.addClass("#suggest-song-html", "hide");
|
||||
} else {
|
||||
Helper.removeClass(document.querySelector(".suggest-title-info"), "hide");
|
||||
Helper.removeClass("#suggest-song-html", "hide");
|
||||
}
|
||||
var get_url = "https://www.googleapis.com/youtube/v3/search?part=snippet&relatedToVideoId="+id+"&type=video&key="+api_key;
|
||||
var video_urls = "https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key="+api_key+"&id=";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user