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

update auto-organize

This commit is contained in:
Luke Pulverenti 2015-11-22 00:15:00 -05:00
parent 12bd0f2928
commit ffb022d13c
29 changed files with 733 additions and 387 deletions

View file

@ -99,7 +99,7 @@
return;
}
getBackdropItemIds(apiClient, Dashboard.getCurrentUserId(), type, parentId).done(function (images) {
getBackdropItemIds(apiClient, Dashboard.getCurrentUserId(), type, parentId).then(function (images) {
if (images.length) {

View file

@ -94,30 +94,7 @@ var WebNotifications = {
show: function (data) {
// Seeing crashes in android
if (window.cordova && window.cordova.plugins && window.cordova.plugins.notification) {
if (!WebNotifications.lastId) {
// Cordova plugin will crash on android with long. need an int
WebNotifications.lastId = new Date().getDate() + new Date().getMilliseconds();
}
WebNotifications.lastId++;
window.cordova.plugins.notification.local.schedule({
id: WebNotifications.lastId,
title: data.title,
text: data.body,
//firstAt: monday_9_am,
//every: "week",
//sound: "file://sounds/reminder.mp3",
//data: { meetingId: "123#fg8" },
icon: data.icon
});
}
else if (window.Notification) {
if (window.Notification) {
var level = Notification.permissionLevel ? Notification.permissionLevel() : Notification.permission;

View file

@ -2261,7 +2261,13 @@ var AppInfo = {};
deps.push('cryptojs-sha1');
}
if (!window.Promise) {
deps.push('bower_components/native-promise-only/lib/npo.src');
}
require(deps, function () {
loadImageCache();
$.extend(AppInfo, Dashboard.getAppInfo(appName, appVersion, deviceId, deviceName));
initAfterDependencies(deferred, capabilities);
@ -2395,9 +2401,17 @@ var AppInfo = {};
//require(['localsync']);
}
function initCordovaWithDeviceId(deferred, deviceId) {
function loadImageCache() {
require(['cordova/imagestore']);
if (navigator.webkitPersistentStorage) {
require(['components/imagestore']);
}
else if (Dashboard.isRunningInCordova()) {
require(['cordova/imagestore']);
}
}
function initCordovaWithDeviceId(deferred, deviceId) {
cordova.getAppVersion.getVersionNumber(function (appVersion) {
var capablities = Dashboard.capabilities();
@ -2434,6 +2448,7 @@ var AppInfo = {};
setDocumentClasses();
$(document).on('WebComponentsReady', function () {
if (Dashboard.isRunningInCordova()) {
initCordova(initDeferred);
} else {