Only removing channel-load on when loaded on mobile

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-15 15:52:33 +01:00
parent e6d9143fa8
commit b4dc90c3ea
2 changed files with 8 additions and 5 deletions

View File

@@ -172,11 +172,12 @@ function get_list_ajax() {
url: "/api/list/" + chan.toLowerCase(), url: "/api/list/" + chan.toLowerCase(),
success: function(response) { success: function(response) {
if(response.results.length > 0) { if(response.results.length > 0) {
$("#channel-load").remove();
if(response.status == 403) { if(response.status == 403) {
start_auth(); start_auth();
} }
if(client) {
$("#channel-load").remove(); $("#channel-load").remove();
}
List.populate_list(response.results); List.populate_list(response.results);
} }
}, },
@@ -188,7 +189,9 @@ function get_list_ajax() {
get_list_ajax(); get_list_ajax();
}, response.getResponseHeader("Retry-After") * 1000) }, response.getResponseHeader("Retry-After") * 1000)
} }
if(client) {
$("#channel-load").remove(); $("#channel-load").remove();
}
//List.populate_list(response.responseJSON.results); //List.populate_list(response.responseJSON.results);
} }
}); });

View File

@@ -288,12 +288,12 @@ var Player = {
if(embed && !autoplay) autoplay = true; if(embed && !autoplay) autoplay = true;
if(!window.MSStream) { if(!window.MSStream) {
$("#player").css("opacity", "1"); $("#player").css("opacity", "1");
if(!Helper.mobilecheck()) { //if(!Helper.mobilecheck()) {
$("#channel-load").css("display", "none"); $("#channel-load").css("display", "none");
/*if(Frontpage.winter && $("#snow").length == 0) { /*if(Frontpage.winter && $("#snow").length == 0) {
$("#video-container").prepend('<div id="snow" class="snow-channel"></div>'); $("#video-container").prepend('<div id="snow" class="snow-channel"></div>');
}*/ }*/
} //}
} }
playing = true; playing = true;
if(beginning && Helper.mobilecheck() && !chromecastAvailable){ if(beginning && Helper.mobilecheck() && !chromecastAvailable){