1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

fix merge conflict

This commit is contained in:
Luke Pulverenti 2015-12-19 23:41:11 -05:00
parent cfafa28a87
commit 696351fddc

View file

@ -12,13 +12,6 @@
})(); })();
// Compatibility
window.Logger = {
log: function(msg) {
console.log(msg);
}
};
var Dashboard = { var Dashboard = {
filterHtml: function (html) { filterHtml: function (html) {
@ -895,6 +888,7 @@ var Dashboard = {
html += '</div>'; html += '</div>';
$('.content-primary', page).before(html); $('.content-primary', page).before(html);
Events.trigger(page, 'create');
} }
}, },
@ -1611,20 +1605,18 @@ var AppInfo = {};
apiClient.getDefaultImageQuality = Dashboard.getDefaultImageQuality; apiClient.getDefaultImageQuality = Dashboard.getDefaultImageQuality;
apiClient.normalizeImageOptions = Dashboard.normalizeImageOptions; apiClient.normalizeImageOptions = Dashboard.normalizeImageOptions;
Events.off(apiClient, 'websocketmessage', Dashboard.onWebSocketMessageReceived); $(apiClient).off("websocketmessage", Dashboard.onWebSocketMessageReceived).off('requestfail', Dashboard.onRequestFail);
Events.on(apiClient, 'websocketmessage', Dashboard.onWebSocketMessageReceived);
Events.off(apiClient, 'requestfail', Dashboard.onRequestFail); $(apiClient).on("websocketmessage", Dashboard.onWebSocketMessageReceived).on('requestfail', Dashboard.onRequestFail);
Events.on(apiClient, 'requestfail', Dashboard.onRequestFail);
} }
//localStorage.clear(); //localStorage.clear();
function createConnectionManager(credentialProviderFactory, capabilities) { function createConnectionManager(capabilities) {
var credentialKey = Dashboard.isConnectMode() ? null : 'servercredentials4'; var credentialKey = Dashboard.isConnectMode() ? null : 'servercredentials4';
var credentialProvider = new credentialProviderFactory(credentialKey); var credentialProvider = new MediaBrowser.CredentialProvider(credentialKey);
window.ConnectionManager = new MediaBrowser.ConnectionManager(credentialProvider, AppInfo.appName, AppInfo.appVersion, AppInfo.deviceName, AppInfo.deviceId, capabilities, window.devicePixelRatio); window.ConnectionManager = new MediaBrowser.ConnectionManager(Logger, credentialProvider, AppInfo.appName, AppInfo.appVersion, AppInfo.deviceName, AppInfo.deviceId, capabilities);
if (window.location.href.toLowerCase().indexOf('wizardstart.html') != -1) { if (window.location.href.toLowerCase().indexOf('wizardstart.html') != -1) {
window.ConnectionManager.clearData(); window.ConnectionManager.clearData();
@ -1661,14 +1653,12 @@ var AppInfo = {};
} else { } else {
require(['apiclient'], function(apiClientFactory) { var apiClient = new MediaBrowser.ApiClient(Logger, Dashboard.serverAddress(), AppInfo.appName, AppInfo.appVersion, AppInfo.deviceName, AppInfo.deviceId);
var apiClient = new apiClientFactory(Dashboard.serverAddress(), AppInfo.appName, AppInfo.appVersion, AppInfo.deviceName, AppInfo.deviceId, window.devicePixelRatio); apiClient.enableAutomaticNetworking = false;
apiClient.enableAutomaticNetworking = false; ConnectionManager.addApiClient(apiClient);
ConnectionManager.addApiClient(apiClient); Dashboard.importCss(apiClient.getUrl('Branding/Css'));
Dashboard.importCss(apiClient.getUrl('Branding/Css')); window.ApiClient = apiClient;
window.ApiClient = apiClient; resolve();
resolve();
});
} }
}); });
} }
@ -1760,8 +1750,8 @@ var AppInfo = {};
return; return;
} }
if (month == 11 && day >= 18 && day <= 26) { if (month == 11 && day >= 21 && day <= 26) {
//require(['themes/holiday/theme']); require(['themes/holiday/theme']);
return; return;
} }
} }
@ -1794,12 +1784,7 @@ var AppInfo = {};
masonry: bowerPath + '/masonry/dist/masonry.pkgd.min', masonry: bowerPath + '/masonry/dist/masonry.pkgd.min',
humanedate: 'components/humanedate', humanedate: 'components/humanedate',
jQuery: bowerPath + '/jquery/dist/jquery.min', jQuery: bowerPath + '/jquery/dist/jquery.min',
fastclick: bowerPath + '/fastclick/lib/fastclick', fastclick: bowerPath + '/fastclick/lib/fastclick'
events: apiClientBowerPath + '/events',
credentialprovider: apiClientBowerPath + '/credentials',
apiclient: apiClientBowerPath + '/apiclient',
connectionmanagerfactory: apiClientBowerPath + '/connectionmanager',
connectservice: apiClientBowerPath + '/connectservice'
}; };
paths.hlsjs = bowerPath + "/hls.js/dist/hls.min"; paths.hlsjs = bowerPath + "/hls.js/dist/hls.min";
@ -1926,8 +1911,13 @@ var AppInfo = {};
define("fileupload", [apiClientBowerPath + "/fileupload"]); define("fileupload", [apiClientBowerPath + "/fileupload"]);
} }
define("connectservice", [apiClientBowerPath + "/connectservice"]);
define("apiclient-store", [apiClientBowerPath + "/store"]); define("apiclient-store", [apiClientBowerPath + "/store"]);
define("apiclient-deferred", ["legacy/deferred"]); define("apiclient-events", [apiClientBowerPath + "/events"]);
define("apiclient-logger", [apiClientBowerPath + "/logger"]);
define("apiclient-credentials", [apiClientBowerPath + "/credentials"]);
define("apiclient-deferred", [apiClientBowerPath + "/deferred"]);
define("apiclient", [apiClientBowerPath + "/apiclient"]);
define("connectionmanager", [apiClientBowerPath + "/connectionmanager"]); define("connectionmanager", [apiClientBowerPath + "/connectionmanager"]);
define("contentuploader", [apiClientBowerPath + "/sync/contentuploader"]); define("contentuploader", [apiClientBowerPath + "/sync/contentuploader"]);
@ -1998,7 +1988,6 @@ var AppInfo = {};
define("buttonenabled", ["legacy/buttonenabled"]); define("buttonenabled", ["legacy/buttonenabled"]);
var deps = []; var deps = [];
deps.push('events');
if (!window.fetch) { if (!window.fetch) {
deps.push('fetch'); deps.push('fetch');
@ -2006,14 +1995,13 @@ var AppInfo = {};
deps.push('scripts/mediacontroller'); deps.push('scripts/mediacontroller');
deps.push('scripts/globalize'); deps.push('scripts/globalize');
deps.push('apiclient-events');
deps.push('jQuery'); deps.push('jQuery');
deps.push('paper-drawer-panel'); deps.push('paper-drawer-panel');
require(deps, function (events) { require(deps, function () {
window.Events = events;
for (var i in hostingAppInfo) { for (var i in hostingAppInfo) {
AppInfo[i] = hostingAppInfo[i]; AppInfo[i] = hostingAppInfo[i];
@ -2049,19 +2037,19 @@ var AppInfo = {};
} }
var deps = []; var deps = [];
deps.push('connectionmanagerfactory');
deps.push('credentialprovider'); if (AppInfo.isNativeApp && browserInfo.android) {
require(['cordova/android/logging']);
}
deps.push('appstorage'); deps.push('appstorage');
deps.push('scripts/mediaplayer'); deps.push('scripts/mediaplayer');
deps.push('scripts/appsettings'); deps.push('scripts/appsettings');
deps.push('apiclient');
deps.push('connectionmanager');
deps.push('apiclient-credentials');
require(deps, function (connectionManagerExports, credentialProviderFactory) { require(deps, function () {
window.MediaBrowser = window.MediaBrowser || {};
for (var i in connectionManagerExports) {
MediaBrowser[i] = connectionManagerExports[i];
}
// TODO: This needs to be deprecated, but it's used heavily // TODO: This needs to be deprecated, but it's used heavily
$.fn.checked = function (value) { $.fn.checked = function (value) {
@ -2111,7 +2099,8 @@ var AppInfo = {};
promises.push(getRequirePromise(deps)); promises.push(getRequirePromise(deps));
promises.push(Globalize.ensure()); promises.push(Globalize.ensure());
promises.push(createConnectionManager(credentialProviderFactory, capabilities)); promises.push(createConnectionManager(capabilities));
Promise.all(promises).then(function () { Promise.all(promises).then(function () {
@ -2433,6 +2422,7 @@ var AppInfo = {};
var initialDependencies = []; var initialDependencies = [];
initialDependencies.push('isMobile'); initialDependencies.push('isMobile');
initialDependencies.push('apiclient-logger');
initialDependencies.push('apiclient-store'); initialDependencies.push('apiclient-store');
initialDependencies.push('scripts/extensions'); initialDependencies.push('scripts/extensions');