mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update logging
This commit is contained in:
parent
4c0ac8e795
commit
0b318b6cb2
20 changed files with 85 additions and 85 deletions
|
@ -91,7 +91,7 @@
|
||||||
|
|
||||||
function downloadToFile(url, dir, filename, callback, errorCallback) {
|
function downloadToFile(url, dir, filename, callback, errorCallback) {
|
||||||
|
|
||||||
Logger.log('Downloading ' + url);
|
console.log('Downloading ' + url);
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open('GET', url, true);
|
xhr.open('GET', url, true);
|
||||||
|
@ -146,7 +146,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
var errorCallback = function (e) {
|
var errorCallback = function (e) {
|
||||||
Logger.log('Imagestore error: ' + e.name);
|
console.log('Imagestore error: ' + e.name);
|
||||||
reject();
|
reject();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
};
|
};
|
||||||
reader.onabort = function () {
|
reader.onabort = function () {
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
Logger.log('File read cancelled');
|
console.log('File read cancelled');
|
||||||
};
|
};
|
||||||
|
|
||||||
// Closure to capture the file information.
|
// Closure to capture the file information.
|
||||||
|
|
|
@ -69,7 +69,7 @@ define(function () {
|
||||||
|
|
||||||
var stylesheet = stylesheets[i];
|
var stylesheet = stylesheets[i];
|
||||||
|
|
||||||
Logger.log('Unloading stylesheet: ' + stylesheet.href);
|
console.log('Unloading stylesheet: ' + stylesheet.href);
|
||||||
stylesheet.parentNode.removeChild(stylesheet);
|
stylesheet.parentNode.removeChild(stylesheet);
|
||||||
removeFromLoadHistory(stylesheet.href);
|
removeFromLoadHistory(stylesheet.href);
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
// Subtract to avoid getting programs that are starting when the grid ends
|
// Subtract to avoid getting programs that are starting when the grid ends
|
||||||
var nextDay = new Date(date.getTime() + msPerDay - 2000);
|
var nextDay = new Date(date.getTime() + msPerDay - 2000);
|
||||||
|
|
||||||
Logger.log(nextDay);
|
console.log(nextDay);
|
||||||
channelsPromise.then(function (channelsResult) {
|
channelsPromise.then(function (channelsResult) {
|
||||||
|
|
||||||
ApiClient.getLiveTvPrograms({
|
ApiClient.getLiveTvPrograms({
|
||||||
|
|
|
@ -48,7 +48,7 @@
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
|
|
||||||
Logger.log('Found backdrop id list in cache. Key: ' + key)
|
console.log('Found backdrop id list in cache. Key: ' + key)
|
||||||
data = JSON.parse(data);
|
data = JSON.parse(data);
|
||||||
deferred.resolveWith(null, [data]);
|
deferred.resolveWith(null, [data]);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -82,7 +82,7 @@
|
||||||
this.sessionListener.bind(this),
|
this.sessionListener.bind(this),
|
||||||
this.receiverListener.bind(this));
|
this.receiverListener.bind(this));
|
||||||
|
|
||||||
Logger.log('chromecast.initialize');
|
console.log('chromecast.initialize');
|
||||||
|
|
||||||
chrome.cast.initialize(apiConfig, this.onInitSuccess.bind(this), this.errorHandler);
|
chrome.cast.initialize(apiConfig, this.onInitSuccess.bind(this), this.errorHandler);
|
||||||
|
|
||||||
|
@ -93,14 +93,14 @@
|
||||||
*/
|
*/
|
||||||
CastPlayer.prototype.onInitSuccess = function () {
|
CastPlayer.prototype.onInitSuccess = function () {
|
||||||
this.isInitialized = true;
|
this.isInitialized = true;
|
||||||
Logger.log("chromecast init success");
|
console.log("chromecast init success");
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic error callback function
|
* Generic error callback function
|
||||||
*/
|
*/
|
||||||
CastPlayer.prototype.onError = function () {
|
CastPlayer.prototype.onError = function () {
|
||||||
Logger.log("chromecast error");
|
console.log("chromecast error");
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
this.session = e;
|
this.session = e;
|
||||||
if (this.session) {
|
if (this.session) {
|
||||||
|
|
||||||
Logger.log('sessionListener ' + JSON.stringify(e));
|
console.log('sessionListener ' + JSON.stringify(e));
|
||||||
|
|
||||||
if (this.session.media[0]) {
|
if (this.session.media[0]) {
|
||||||
this.onMediaDiscovered('activeSession', this.session.media[0]);
|
this.onMediaDiscovered('activeSession', this.session.media[0]);
|
||||||
|
@ -165,11 +165,11 @@
|
||||||
CastPlayer.prototype.receiverListener = function (e) {
|
CastPlayer.prototype.receiverListener = function (e) {
|
||||||
|
|
||||||
if (e === 'available') {
|
if (e === 'available') {
|
||||||
Logger.log("chromecast receiver found");
|
console.log("chromecast receiver found");
|
||||||
this.hasReceivers = true;
|
this.hasReceivers = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Logger.log("chromecast receiver list empty");
|
console.log("chromecast receiver list empty");
|
||||||
this.hasReceivers = false;
|
this.hasReceivers = false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -179,7 +179,7 @@
|
||||||
*/
|
*/
|
||||||
CastPlayer.prototype.sessionUpdateListener = function (isAlive) {
|
CastPlayer.prototype.sessionUpdateListener = function (isAlive) {
|
||||||
|
|
||||||
Logger.log('sessionUpdateListener alive: ' + isAlive);
|
console.log('sessionUpdateListener alive: ' + isAlive);
|
||||||
|
|
||||||
if (isAlive) {
|
if (isAlive) {
|
||||||
}
|
}
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
this.deviceState = DEVICE_STATE.IDLE;
|
this.deviceState = DEVICE_STATE.IDLE;
|
||||||
this.castPlayerState = PLAYER_STATE.IDLE;
|
this.castPlayerState = PLAYER_STATE.IDLE;
|
||||||
|
|
||||||
Logger.log('sessionUpdateListener: setting currentMediaSession to null');
|
console.log('sessionUpdateListener: setting currentMediaSession to null');
|
||||||
this.currentMediaSession = null;
|
this.currentMediaSession = null;
|
||||||
|
|
||||||
MediaController.removeActivePlayer(PlayerName);
|
MediaController.removeActivePlayer(PlayerName);
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
* session request in opt_sessionRequest.
|
* session request in opt_sessionRequest.
|
||||||
*/
|
*/
|
||||||
CastPlayer.prototype.launchApp = function () {
|
CastPlayer.prototype.launchApp = function () {
|
||||||
Logger.log("chromecast launching app...");
|
console.log("chromecast launching app...");
|
||||||
chrome.cast.requestSession(this.onRequestSessionSuccess.bind(this), this.onLaunchError.bind(this));
|
chrome.cast.requestSession(this.onRequestSessionSuccess.bind(this), this.onLaunchError.bind(this));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -211,7 +211,7 @@
|
||||||
*/
|
*/
|
||||||
CastPlayer.prototype.onRequestSessionSuccess = function (e) {
|
CastPlayer.prototype.onRequestSessionSuccess = function (e) {
|
||||||
|
|
||||||
Logger.log("chromecast session success: " + e.sessionId);
|
console.log("chromecast session success: " + e.sessionId);
|
||||||
this.onSessionConnected(e);
|
this.onSessionConnected(e);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -238,7 +238,7 @@
|
||||||
*/
|
*/
|
||||||
CastPlayer.prototype.sessionMediaListener = function (e) {
|
CastPlayer.prototype.sessionMediaListener = function (e) {
|
||||||
|
|
||||||
Logger.log('sessionMediaListener');
|
console.log('sessionMediaListener');
|
||||||
this.currentMediaSession = e;
|
this.currentMediaSession = e;
|
||||||
this.currentMediaSession.addUpdateListener(this.mediaStatusUpdateHandler);
|
this.currentMediaSession.addUpdateListener(this.mediaStatusUpdateHandler);
|
||||||
};
|
};
|
||||||
|
@ -247,7 +247,7 @@
|
||||||
* Callback function for launch error
|
* Callback function for launch error
|
||||||
*/
|
*/
|
||||||
CastPlayer.prototype.onLaunchError = function () {
|
CastPlayer.prototype.onLaunchError = function () {
|
||||||
Logger.log("chromecast launch error");
|
console.log("chromecast launch error");
|
||||||
this.deviceState = DEVICE_STATE.ERROR;
|
this.deviceState = DEVICE_STATE.ERROR;
|
||||||
|
|
||||||
//Dashboard.alert({
|
//Dashboard.alert({
|
||||||
|
@ -276,11 +276,11 @@
|
||||||
* Callback function for stop app success
|
* Callback function for stop app success
|
||||||
*/
|
*/
|
||||||
CastPlayer.prototype.onStopAppSuccess = function (message) {
|
CastPlayer.prototype.onStopAppSuccess = function (message) {
|
||||||
Logger.log(message);
|
console.log(message);
|
||||||
this.deviceState = DEVICE_STATE.IDLE;
|
this.deviceState = DEVICE_STATE.IDLE;
|
||||||
this.castPlayerState = PLAYER_STATE.IDLE;
|
this.castPlayerState = PLAYER_STATE.IDLE;
|
||||||
|
|
||||||
Logger.log('onStopAppSuccess: setting currentMediaSession to null');
|
console.log('onStopAppSuccess: setting currentMediaSession to null');
|
||||||
this.currentMediaSession = null;
|
this.currentMediaSession = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@
|
||||||
CastPlayer.prototype.loadMedia = function (options, command) {
|
CastPlayer.prototype.loadMedia = function (options, command) {
|
||||||
|
|
||||||
if (!this.session) {
|
if (!this.session) {
|
||||||
Logger.log("no session");
|
console.log("no session");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -370,13 +370,13 @@
|
||||||
CastPlayer.prototype.sendMessageInternal = function (message) {
|
CastPlayer.prototype.sendMessageInternal = function (message) {
|
||||||
|
|
||||||
message = JSON.stringify(message);
|
message = JSON.stringify(message);
|
||||||
//Logger.log(message);
|
//console.log(message);
|
||||||
|
|
||||||
this.session.sendMessage(messageNamespace, message, this.onPlayCommandSuccess.bind(this), this.errorHandler);
|
this.session.sendMessage(messageNamespace, message, this.onPlayCommandSuccess.bind(this), this.errorHandler);
|
||||||
};
|
};
|
||||||
|
|
||||||
CastPlayer.prototype.onPlayCommandSuccess = function () {
|
CastPlayer.prototype.onPlayCommandSuccess = function () {
|
||||||
Logger.log('Message was sent to receiver ok.');
|
console.log('Message was sent to receiver ok.');
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -385,7 +385,7 @@
|
||||||
*/
|
*/
|
||||||
CastPlayer.prototype.onMediaDiscovered = function (how, mediaSession) {
|
CastPlayer.prototype.onMediaDiscovered = function (how, mediaSession) {
|
||||||
|
|
||||||
Logger.log("chromecast new media session ID:" + mediaSession.mediaSessionId + ' (' + how + ')');
|
console.log("chromecast new media session ID:" + mediaSession.mediaSessionId + ' (' + how + ')');
|
||||||
this.currentMediaSession = mediaSession;
|
this.currentMediaSession = mediaSession;
|
||||||
|
|
||||||
if (how == 'loadMedia') {
|
if (how == 'loadMedia') {
|
||||||
|
@ -408,7 +408,7 @@
|
||||||
if (e == false) {
|
if (e == false) {
|
||||||
this.castPlayerState = PLAYER_STATE.IDLE;
|
this.castPlayerState = PLAYER_STATE.IDLE;
|
||||||
}
|
}
|
||||||
Logger.log("chromecast updating media: " + e);
|
console.log("chromecast updating media: " + e);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -418,7 +418,7 @@
|
||||||
CastPlayer.prototype.setReceiverVolume = function (mute, vol) {
|
CastPlayer.prototype.setReceiverVolume = function (mute, vol) {
|
||||||
|
|
||||||
if (!this.currentMediaSession) {
|
if (!this.currentMediaSession) {
|
||||||
Logger.log('this.currentMediaSession is null');
|
console.log('this.currentMediaSession is null');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -446,7 +446,7 @@
|
||||||
* Callback function for media command success
|
* Callback function for media command success
|
||||||
*/
|
*/
|
||||||
CastPlayer.prototype.mediaCommandSuccessCallback = function (info, e) {
|
CastPlayer.prototype.mediaCommandSuccessCallback = function (info, e) {
|
||||||
Logger.log(info);
|
console.log(info);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Create Cast Player
|
// Create Cast Player
|
||||||
|
@ -487,14 +487,14 @@
|
||||||
|
|
||||||
MediaController.setActivePlayer(PlayerName, self.getCurrentTargetInfo());
|
MediaController.setActivePlayer(PlayerName, self.getCurrentTargetInfo());
|
||||||
|
|
||||||
Logger.log('cc: connect');
|
console.log('cc: connect');
|
||||||
// Reset this so the next query doesn't make it appear like content is playing.
|
// Reset this so the next query doesn't make it appear like content is playing.
|
||||||
self.lastPlayerData = {};
|
self.lastPlayerData = {};
|
||||||
});
|
});
|
||||||
|
|
||||||
Events.on(castPlayer, "playbackstart", function (e, data) {
|
Events.on(castPlayer, "playbackstart", function (e, data) {
|
||||||
|
|
||||||
Logger.log('cc: playbackstart');
|
console.log('cc: playbackstart');
|
||||||
|
|
||||||
castPlayer.initializeCastPlayer();
|
castPlayer.initializeCastPlayer();
|
||||||
|
|
||||||
|
@ -504,7 +504,7 @@
|
||||||
|
|
||||||
Events.on(castPlayer, "playbackstop", function (e, data) {
|
Events.on(castPlayer, "playbackstop", function (e, data) {
|
||||||
|
|
||||||
Logger.log('cc: playbackstop');
|
console.log('cc: playbackstop');
|
||||||
var state = self.getPlayerStateInternal(data);
|
var state = self.getPlayerStateInternal(data);
|
||||||
|
|
||||||
Events.trigger(self, "playbackstop", [state]);
|
Events.trigger(self, "playbackstop", [state]);
|
||||||
|
@ -515,7 +515,7 @@
|
||||||
|
|
||||||
Events.on(castPlayer, "playbackprogress", function (e, data) {
|
Events.on(castPlayer, "playbackprogress", function (e, data) {
|
||||||
|
|
||||||
Logger.log('cc: positionchange');
|
console.log('cc: positionchange');
|
||||||
var state = self.getPlayerStateInternal(data);
|
var state = self.getPlayerStateInternal(data);
|
||||||
|
|
||||||
Events.trigger(self, "positionchange", [state]);
|
Events.trigger(self, "positionchange", [state]);
|
||||||
|
@ -825,7 +825,7 @@
|
||||||
data = data || self.lastPlayerData;
|
data = data || self.lastPlayerData;
|
||||||
self.lastPlayerData = data;
|
self.lastPlayerData = data;
|
||||||
|
|
||||||
Logger.log(JSON.stringify(data));
|
console.log(JSON.stringify(data));
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1090,7 +1090,7 @@
|
||||||
|
|
||||||
var page = $.mobile.activePage;
|
var page = $.mobile.activePage;
|
||||||
|
|
||||||
Logger.log('Item updated - reloading metadata');
|
console.log('Item updated - reloading metadata');
|
||||||
reload(page);
|
reload(page);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -383,7 +383,7 @@
|
||||||
|
|
||||||
$('.sliderValue', elem).html(tooltext);
|
$('.sliderValue', elem).html(tooltext);
|
||||||
|
|
||||||
Logger.log("slidin", pct, self.currentDurationTicks, time);
|
console.log("slidin", pct, self.currentDurationTicks, time);
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,14 +30,14 @@
|
||||||
|
|
||||||
var requestUrl = url + "?v=" + AppInfo.appVersion;
|
var requestUrl = url + "?v=" + AppInfo.appVersion;
|
||||||
|
|
||||||
Logger.log('Requesting ' + requestUrl);
|
console.log('Requesting ' + requestUrl);
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.open('GET', requestUrl, true);
|
xhr.open('GET', requestUrl, true);
|
||||||
|
|
||||||
var onError = function () {
|
var onError = function () {
|
||||||
|
|
||||||
Logger.log('Dictionary not found. Reverting to english');
|
console.log('Dictionary not found. Reverting to english');
|
||||||
|
|
||||||
// Grab the english version
|
// Grab the english version
|
||||||
var xhr2 = new XMLHttpRequest();
|
var xhr2 = new XMLHttpRequest();
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
|
|
||||||
xhr.onload = function (e) {
|
xhr.onload = function (e) {
|
||||||
|
|
||||||
Logger.log('Globalize response status: ' + this.status);
|
console.log('Globalize response status: ' + this.status);
|
||||||
|
|
||||||
if (this.status < 400) {
|
if (this.status < 400) {
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
var currentCulture = 'en-US';
|
var currentCulture = 'en-US';
|
||||||
function setCulture(value) {
|
function setCulture(value) {
|
||||||
|
|
||||||
Logger.log('Setting culture to ' + value);
|
console.log('Setting culture to ' + value);
|
||||||
currentCulture = value;
|
currentCulture = value;
|
||||||
|
|
||||||
return Promise.all([loadDictionary('html', value), loadDictionary('javascript', value)]);
|
return Promise.all([loadDictionary('html', value), loadDictionary('javascript', value)]);
|
||||||
|
@ -105,13 +105,13 @@
|
||||||
|
|
||||||
} else if (AppInfo.supportsUserDisplayLanguageSetting) {
|
} else if (AppInfo.supportsUserDisplayLanguageSetting) {
|
||||||
|
|
||||||
Logger.log('AppInfo.supportsUserDisplayLanguageSetting is true');
|
console.log('AppInfo.supportsUserDisplayLanguageSetting is true');
|
||||||
|
|
||||||
resolve(AppSettings.displayLanguage());
|
resolve(AppSettings.displayLanguage());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Logger.log('Getting culture from document');
|
console.log('Getting culture from document');
|
||||||
resolve(document.documentElement.getAttribute('data-culture'));
|
resolve(document.documentElement.getAttribute('data-culture'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -120,7 +120,7 @@
|
||||||
|
|
||||||
function ensure() {
|
function ensure() {
|
||||||
|
|
||||||
Logger.log('Entering Globalize.ensure');
|
console.log('Entering Globalize.ensure');
|
||||||
|
|
||||||
return getDeviceCulture().then(function (culture) {
|
return getDeviceCulture().then(function (culture) {
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
|
|
||||||
var elem = e.target;
|
var elem = e.target;
|
||||||
var errorCode = elem.error ? elem.error.code : '';
|
var errorCode = elem.error ? elem.error.code : '';
|
||||||
Logger.log('Media element error code: ' + errorCode);
|
console.log('Media element error code: ' + errorCode);
|
||||||
|
|
||||||
showStatusBar();
|
showStatusBar();
|
||||||
Events.trigger(self, 'error');
|
Events.trigger(self, 'error');
|
||||||
|
@ -296,7 +296,7 @@
|
||||||
hlsPlayer.destroy();
|
hlsPlayer.destroy();
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
Logger.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
hlsPlayer = null;
|
hlsPlayer = null;
|
||||||
|
@ -515,7 +515,7 @@
|
||||||
|
|
||||||
self.setCurrentTrackElement = function (trackIndex) {
|
self.setCurrentTrackElement = function (trackIndex) {
|
||||||
|
|
||||||
Logger.log('Setting new text track index to: ' + trackIndex);
|
console.log('Setting new text track index to: ' + trackIndex);
|
||||||
|
|
||||||
var allTracks = mediaElement.textTracks; // get list of tracks
|
var allTracks = mediaElement.textTracks; // get list of tracks
|
||||||
|
|
||||||
|
@ -531,7 +531,7 @@
|
||||||
mode = 0; // hide all other tracks
|
mode = 0; // hide all other tracks
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger.log('Setting track ' + i + ' mode to: ' + mode);
|
console.log('Setting track ' + i + ' mode to: ' + mode);
|
||||||
|
|
||||||
// Safari uses integers for the mode property
|
// Safari uses integers for the mode property
|
||||||
// http://www.jwplayer.com/html5/scripting/
|
// http://www.jwplayer.com/html5/scripting/
|
||||||
|
@ -568,7 +568,7 @@
|
||||||
track.removeCue(track.cues[0]);
|
track.removeCue(track.cues[0]);
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Logger.log('Error removing cue from textTrack');
|
console.log('Error removing cue from textTrack');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NavHelper.isBack()) {
|
if (NavHelper.isBack()) {
|
||||||
Logger.log('Not refreshing data because IsBack=true');
|
console.log('Not refreshing data because IsBack=true');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((now - last) < cacheDuration) {
|
if ((now - last) < cacheDuration) {
|
||||||
Logger.log('Not refreshing data due to age');
|
console.log('Not refreshing data due to age');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,11 +385,11 @@
|
||||||
|
|
||||||
if (isFirstLoad) {
|
if (isFirstLoad) {
|
||||||
|
|
||||||
Logger.log('selected tab is null, checking query string');
|
console.log('selected tab is null, checking query string');
|
||||||
|
|
||||||
var selected = parseInt(getParameterByName('tab') || '0');
|
var selected = parseInt(getParameterByName('tab') || '0');
|
||||||
|
|
||||||
Logger.log('selected tab will be ' + selected);
|
console.log('selected tab will be ' + selected);
|
||||||
|
|
||||||
if (LibraryBrowser.enableFullPaperTabs()) {
|
if (LibraryBrowser.enableFullPaperTabs()) {
|
||||||
|
|
||||||
|
@ -3364,7 +3364,7 @@
|
||||||
miscInfo.push(text);
|
miscInfo.push(text);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
Logger.log("Error parsing date: " + item.PremiereDate);
|
console.log("Error parsing date: " + item.PremiereDate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3383,7 +3383,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
Logger.log("Error parsing date: " + item.PremiereDate);
|
console.log("Error parsing date: " + item.PremiereDate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3409,7 +3409,7 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
Logger.log("Error parsing date: " + item.EndDate);
|
console.log("Error parsing date: " + item.EndDate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3430,7 +3430,7 @@
|
||||||
miscInfo.push(text);
|
miscInfo.push(text);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
Logger.log("Error parsing date: " + item.PremiereDate);
|
console.log("Error parsing date: " + item.PremiereDate);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@
|
||||||
airDate = parseISO8601Date(airDate, { toLocal: true }).toLocaleDateString();
|
airDate = parseISO8601Date(airDate, { toLocal: true }).toLocaleDateString();
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
Logger.log("Error parsing date: " + airDate);
|
console.log("Error parsing date: " + airDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,7 @@
|
||||||
|
|
||||||
if (bypass()) return;
|
if (bypass()) return;
|
||||||
|
|
||||||
Logger.log("keyCode", e.keyCode);
|
console.log("keyCode", e.keyCode);
|
||||||
|
|
||||||
if (keyResult[e.keyCode]) {
|
if (keyResult[e.keyCode]) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -307,7 +307,7 @@
|
||||||
currentPlayer = player;
|
currentPlayer = player;
|
||||||
currentTargetInfo = targetInfo;
|
currentTargetInfo = targetInfo;
|
||||||
|
|
||||||
Logger.log('Active player: ' + JSON.stringify(currentTargetInfo));
|
console.log('Active player: ' + JSON.stringify(currentTargetInfo));
|
||||||
|
|
||||||
triggerPlayerChange(player, targetInfo);
|
triggerPlayerChange(player, targetInfo);
|
||||||
};
|
};
|
||||||
|
@ -336,7 +336,7 @@
|
||||||
currentPlayer = player;
|
currentPlayer = player;
|
||||||
currentTargetInfo = targetInfo;
|
currentTargetInfo = targetInfo;
|
||||||
|
|
||||||
Logger.log('Active player: ' + JSON.stringify(currentTargetInfo));
|
console.log('Active player: ' + JSON.stringify(currentTargetInfo));
|
||||||
|
|
||||||
triggerPlayerChange(player, targetInfo);
|
triggerPlayerChange(player, targetInfo);
|
||||||
});
|
});
|
||||||
|
@ -720,7 +720,7 @@
|
||||||
|
|
||||||
// Full list
|
// Full list
|
||||||
// https://github.com/MediaBrowser/MediaBrowser/blob/master/MediaBrowser.Model/Session/GeneralCommand.cs#L23
|
// https://github.com/MediaBrowser/MediaBrowser/blob/master/MediaBrowser.Model/Session/GeneralCommand.cs#L23
|
||||||
Logger.log('MediaController received command: ' + cmd.Name);
|
console.log('MediaController received command: ' + cmd.Name);
|
||||||
switch (cmd.Name) {
|
switch (cmd.Name) {
|
||||||
|
|
||||||
case 'SetRepeatMode':
|
case 'SetRepeatMode':
|
||||||
|
@ -950,7 +950,7 @@
|
||||||
require(['localassetmanager'], function () {
|
require(['localassetmanager'], function () {
|
||||||
|
|
||||||
LocalAssetManager.fileExists(mediaSource.Path).then(function (exists) {
|
LocalAssetManager.fileExists(mediaSource.Path).then(function (exists) {
|
||||||
Logger.log('LocalAssetManager.fileExists: path: ' + mediaSource.Path + ' result: ' + exists);
|
console.log('LocalAssetManager.fileExists: path: ' + mediaSource.Path + ' result: ' + exists);
|
||||||
deferred.resolveWith(null, [exists]);
|
deferred.resolveWith(null, [exists]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1061,7 +1061,7 @@
|
||||||
LocalAssetManager.translateFilePath(resultInfo.url).then(function (path) {
|
LocalAssetManager.translateFilePath(resultInfo.url).then(function (path) {
|
||||||
|
|
||||||
resultInfo.url = path;
|
resultInfo.url = path;
|
||||||
Logger.log('LocalAssetManager.translateFilePath: path: ' + resultInfo.url + ' result: ' + path);
|
console.log('LocalAssetManager.translateFilePath: path: ' + resultInfo.url + ' result: ' + path);
|
||||||
deferred.resolveWith(null, [resultInfo]);
|
deferred.resolveWith(null, [resultInfo]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1103,7 +1103,7 @@
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ApiClient.detectBitrate().then(function (bitrate) {
|
ApiClient.detectBitrate().then(function (bitrate) {
|
||||||
Logger.log('Max bitrate auto detected to ' + bitrate);
|
console.log('Max bitrate auto detected to ' + bitrate);
|
||||||
self.lastBitrateDetections[bitrateDetectionKey] = new Date().getTime();
|
self.lastBitrateDetections[bitrateDetectionKey] = new Date().getTime();
|
||||||
AppSettings.maxStreamingBitrate(bitrate);
|
AppSettings.maxStreamingBitrate(bitrate);
|
||||||
|
|
||||||
|
@ -1312,7 +1312,7 @@
|
||||||
|
|
||||||
if (newItem) {
|
if (newItem) {
|
||||||
|
|
||||||
Logger.log('playing next track');
|
console.log('playing next track');
|
||||||
|
|
||||||
self.playInternal(newItem, 0, function () {
|
self.playInternal(newItem, 0, function () {
|
||||||
self.setPlaylistState(newIndex);
|
self.setPlaylistState(newIndex);
|
||||||
|
@ -1450,7 +1450,7 @@
|
||||||
|
|
||||||
if (self.currentMediaRenderer) {
|
if (self.currentMediaRenderer) {
|
||||||
|
|
||||||
Logger.log('MediaPlayer toggling mute');
|
console.log('MediaPlayer toggling mute');
|
||||||
|
|
||||||
if (self.volume()) {
|
if (self.volume()) {
|
||||||
self.mute();
|
self.mute();
|
||||||
|
@ -1479,7 +1479,7 @@
|
||||||
|
|
||||||
if (self.currentMediaRenderer) {
|
if (self.currentMediaRenderer) {
|
||||||
|
|
||||||
Logger.log('MediaPlayer setting volume to ' + val);
|
console.log('MediaPlayer setting volume to ' + val);
|
||||||
self.currentMediaRenderer.volume(val / 100);
|
self.currentMediaRenderer.volume(val / 100);
|
||||||
|
|
||||||
self.onVolumeChanged(self.currentMediaRenderer);
|
self.onVolumeChanged(self.currentMediaRenderer);
|
||||||
|
@ -1784,7 +1784,7 @@
|
||||||
|
|
||||||
self.onPlaybackStopped = function () {
|
self.onPlaybackStopped = function () {
|
||||||
|
|
||||||
Logger.log('playback stopped');
|
console.log('playback stopped');
|
||||||
|
|
||||||
document.body.classList.remove('bodyWithPopupOpen');
|
document.body.classList.remove('bodyWithPopupOpen');
|
||||||
|
|
||||||
|
@ -1968,7 +1968,7 @@
|
||||||
|
|
||||||
Events.off(mediaRenderer, "playing", onPlayingOnce);
|
Events.off(mediaRenderer, "playing", onPlayingOnce);
|
||||||
|
|
||||||
Logger.log('audio element event: playing');
|
console.log('audio element event: playing');
|
||||||
|
|
||||||
// For some reason this is firing at the start, so don't bind until playback has begun
|
// For some reason this is firing at the start, so don't bind until playback has begun
|
||||||
Events.on(mediaRenderer, 'ended', self.onPlaybackStopped);
|
Events.on(mediaRenderer, 'ended', self.onPlaybackStopped);
|
||||||
|
@ -2000,7 +2000,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function onVolumeChange() {
|
function onVolumeChange() {
|
||||||
Logger.log('audio element event: pause');
|
console.log('audio element event: pause');
|
||||||
|
|
||||||
self.onPlaystateChange(this);
|
self.onPlaystateChange(this);
|
||||||
|
|
||||||
|
@ -2010,7 +2010,7 @@
|
||||||
|
|
||||||
function onPause() {
|
function onPause() {
|
||||||
|
|
||||||
Logger.log('audio element event: pause');
|
console.log('audio element event: pause');
|
||||||
|
|
||||||
self.onPlaystateChange(this);
|
self.onPlaystateChange(this);
|
||||||
|
|
||||||
|
@ -2019,7 +2019,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPlaying() {
|
function onPlaying() {
|
||||||
Logger.log('audio element event: playing');
|
console.log('audio element event: playing');
|
||||||
|
|
||||||
self.onPlaystateChange(this);
|
self.onPlaystateChange(this);
|
||||||
|
|
||||||
|
|
|
@ -537,7 +537,7 @@
|
||||||
|
|
||||||
function onPlaybackStart(e, state) {
|
function onPlaybackStart(e, state) {
|
||||||
|
|
||||||
Logger.log('nowplaying event: ' + e.type);
|
console.log('nowplaying event: ' + e.type);
|
||||||
|
|
||||||
var player = this;
|
var player = this;
|
||||||
|
|
||||||
|
@ -565,7 +565,7 @@
|
||||||
|
|
||||||
function onPlaybackStopped(e, state) {
|
function onPlaybackStopped(e, state) {
|
||||||
|
|
||||||
Logger.log('nowplaying event: ' + e.type);
|
console.log('nowplaying event: ' + e.type);
|
||||||
var player = this;
|
var player = this;
|
||||||
|
|
||||||
player.endPlayerUpdates();
|
player.endPlayerUpdates();
|
||||||
|
@ -575,7 +575,7 @@
|
||||||
|
|
||||||
function onStateChanged(e, state) {
|
function onStateChanged(e, state) {
|
||||||
|
|
||||||
//Logger.log('nowplaying event: ' + e.type);
|
//console.log('nowplaying event: ' + e.type);
|
||||||
var player = this;
|
var player = this;
|
||||||
|
|
||||||
if (player.isDefaultPlayer && state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video') {
|
if (player.isDefaultPlayer && state.NowPlayingItem && state.NowPlayingItem.MediaType == 'Video') {
|
||||||
|
|
|
@ -74,7 +74,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
options.callback(review);
|
options.callback(review);
|
||||||
} else Logger.log("No callback function provided");
|
} else console.log("No callback function provided");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
@ -98,7 +98,7 @@
|
||||||
id: id,
|
id: id,
|
||||||
rating: rating,
|
rating: rating,
|
||||||
callback: function (review) {
|
callback: function (review) {
|
||||||
Logger.log(review);
|
console.log(review);
|
||||||
dialog.close();
|
dialog.close();
|
||||||
|
|
||||||
ApiClient.createPackageReview(review).then(function () {
|
ApiClient.createPackageReview(review).then(function () {
|
||||||
|
|
|
@ -360,7 +360,7 @@
|
||||||
}
|
}
|
||||||
else if (msg.MessageType === "SessionEnded") {
|
else if (msg.MessageType === "SessionEnded") {
|
||||||
|
|
||||||
Logger.log("Server reports another session ended");
|
console.log("Server reports another session ended");
|
||||||
|
|
||||||
if (MediaController.getPlayerInfo().id == msg.Data.Id) {
|
if (MediaController.getPlayerInfo().id == msg.Data.Id) {
|
||||||
MediaController.setDefaultPlayerActive();
|
MediaController.setDefaultPlayerActive();
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
function onSharingSuccess(options) {
|
function onSharingSuccess(options) {
|
||||||
|
|
||||||
Logger.log('share success. shareId: ' + options.share.Id);
|
console.log('share success. shareId: ' + options.share.Id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
var shareId = options.share.Id;
|
var shareId = options.share.Id;
|
||||||
|
|
||||||
Logger.log('share cancelled. shareId: ' + shareId);
|
console.log('share cancelled. shareId: ' + shareId);
|
||||||
|
|
||||||
// Delete the share since it was cancelled
|
// Delete the share since it was cancelled
|
||||||
ApiClient.ajax({
|
ApiClient.ajax({
|
||||||
|
|
|
@ -1060,7 +1060,7 @@ var Dashboard = {
|
||||||
case 'SetRepeatMode':
|
case 'SetRepeatMode':
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Logger.log('Unrecognized command: ' + cmd.Name);
|
console.log('Unrecognized command: ' + cmd.Name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2577,7 +2577,7 @@ pageClassOn('pageshow', "page", function () {
|
||||||
|
|
||||||
if (!isConnectMode && this.id !== "loginPage" && !page.classList.contains('forgotPasswordPage') && !page.classList.contains('forgotPasswordPinPage') && !page.classList.contains('wizardPage') && this.id !== 'publicSharedItemPage') {
|
if (!isConnectMode && this.id !== "loginPage" && !page.classList.contains('forgotPasswordPage') && !page.classList.contains('forgotPasswordPinPage') && !page.classList.contains('wizardPage') && this.id !== 'publicSharedItemPage') {
|
||||||
|
|
||||||
Logger.log('Not logged into server. Redirecting to login.');
|
console.log('Not logged into server. Redirecting to login.');
|
||||||
Dashboard.logout();
|
Dashboard.logout();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2604,7 +2604,7 @@ window.addEventListener("beforeunload", function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!localActivePlayers.length) {
|
if (!localActivePlayers.length) {
|
||||||
Logger.log('Sending close web socket command');
|
console.log('Sending close web socket command');
|
||||||
apiClient.closeWebSocket();
|
apiClient.closeWebSocket();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
var url = "http://mb3admin.com/admin/service/supporter/linkKeys";
|
var url = "http://mb3admin.com/admin/service/supporter/linkKeys";
|
||||||
Logger.log(url);
|
console.log(url);
|
||||||
$.post(url, info).then(function (res) {
|
$.post(url, info).then(function (res) {
|
||||||
var result = JSON.parse(res);
|
var result = JSON.parse(res);
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
} else {
|
} else {
|
||||||
Dashboard.alert(result.ErrorMessage);
|
Dashboard.alert(result.ErrorMessage);
|
||||||
}
|
}
|
||||||
Logger.log(result);
|
console.log(result);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
var email = $('#txtEmail', form).val();
|
var email = $('#txtEmail', form).val();
|
||||||
|
|
||||||
var url = "http://mb3admin.com/admin/service/supporter/retrievekey?email=" + email;
|
var url = "http://mb3admin.com/admin/service/supporter/retrievekey?email=" + email;
|
||||||
Logger.log(url);
|
console.log(url);
|
||||||
$.post(url).then(function (res) {
|
$.post(url).then(function (res) {
|
||||||
var result = JSON.parse(res);
|
var result = JSON.parse(res);
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
|
@ -111,7 +111,7 @@
|
||||||
} else {
|
} else {
|
||||||
Dashboard.alert(result.ErrorMessage);
|
Dashboard.alert(result.ErrorMessage);
|
||||||
}
|
}
|
||||||
Logger.log(result);
|
console.log(result);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue