mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update camera upload
This commit is contained in:
parent
50dc5c4d1b
commit
a2d603a31e
19 changed files with 404 additions and 141 deletions
|
@ -56,14 +56,6 @@
|
|||
|
||||
return appStorage.getItem('externalplayers') == 'true';
|
||||
},
|
||||
enableItemPreviews: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
update('enableItemPreviews', val.toString());
|
||||
}
|
||||
|
||||
return appStorage.getItem('enableItemPreviews') == 'true';
|
||||
},
|
||||
enableFullScreen: function (val) {
|
||||
|
||||
if (val != null) {
|
||||
|
|
|
@ -824,59 +824,6 @@
|
|||
return elem;
|
||||
}
|
||||
|
||||
function onCardClick(e) {
|
||||
|
||||
var targetElem = parentWithClass(e.target, 'mediaItem');
|
||||
|
||||
if (!targetElem) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isClickable(targetElem)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (targetElem.classList.contains('itemSelectionPanel') || this.querySelector('.itemSelectionPanel')) {
|
||||
return;
|
||||
}
|
||||
|
||||
var info = LibraryBrowser.getListItemInfo(this);
|
||||
var itemId = info.id;
|
||||
var context = info.context;
|
||||
|
||||
var card = this;
|
||||
|
||||
if (card.classList.contains('itemWithAction')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!card.classList.contains('card')) {
|
||||
card = $(card).parents('.card')[0];
|
||||
}
|
||||
|
||||
if (card.classList.contains('groupedCard')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (card.getAttribute('data-detailsmenu') != 'true') {
|
||||
return;
|
||||
}
|
||||
|
||||
var target = $(targetElem);
|
||||
if (target.parents('a').length || target.parents('button').length) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (AppSettings.enableItemPreviews()) {
|
||||
showItemsOverlay({
|
||||
ids: [itemId],
|
||||
context: context
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.createCardMenus = function (options) {
|
||||
|
||||
var preventHover = false;
|
||||
|
@ -981,9 +928,6 @@
|
|||
this.on("touchstart", '.card:not(.bannerCard) .cardContent', preventTouchHover);
|
||||
}
|
||||
|
||||
this.off('click', onCardClick);
|
||||
this.on('click', onCardClick);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
@ -1192,7 +1136,14 @@
|
|||
function playAllFromHere(index, itemsContainer, method) {
|
||||
|
||||
var ids = $('.mediaItem', itemsContainer).get().map(function (i) {
|
||||
return i.getAttribute('data-itemid') || i.parentNode.getAttribute('data-itemid') || i.parentNode.parentNode.getAttribute('data-itemid');
|
||||
|
||||
var node = i;
|
||||
var id = node.getAttribute('data-itemid');
|
||||
while (!id) {
|
||||
node = node.parentNode;
|
||||
id = node.getAttribute('data-itemid');
|
||||
}
|
||||
return id;
|
||||
});
|
||||
|
||||
ids = ids.slice(index);
|
||||
|
|
|
@ -1,18 +1,47 @@
|
|||
(function () {
|
||||
|
||||
var syncPromise;
|
||||
|
||||
window.LocalSync = {
|
||||
|
||||
isSupported: function () {
|
||||
return false;
|
||||
return AppInfo.isNativeApp;
|
||||
},
|
||||
|
||||
startSync: function () {
|
||||
|
||||
if (!syncPromise) {
|
||||
require(['multiserversync'], function () {
|
||||
|
||||
syncPromise = new MediaBrowser.MultiServerSync(ConnectionManager).sync().done(function () {
|
||||
|
||||
syncPromise = null;
|
||||
|
||||
}).fail(function () {
|
||||
|
||||
syncPromise = null;
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
getSyncStatus: function () {
|
||||
|
||||
if (syncPromise != null) {
|
||||
return 'Syncing';
|
||||
}
|
||||
return 'Idle';
|
||||
}
|
||||
};
|
||||
|
||||
Dashboard.ready(function () {
|
||||
if (LocalSync.isSupported) {
|
||||
setInterval(function () {
|
||||
|
||||
LocalSync.startSync();
|
||||
|
||||
}, 3600000);
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
|
@ -839,15 +839,23 @@
|
|||
|
||||
self.supportsDirectPlay = function (mediaSource) {
|
||||
|
||||
if (mediaSource.SupportsDirectPlay && mediaSource.Protocol == 'Http' && !mediaSource.RequiredHttpHeaders.length) {
|
||||
if (mediaSource.SupportsDirectPlay) {
|
||||
|
||||
// TODO: Need to verify the host is going to be reachable
|
||||
return true;
|
||||
}
|
||||
if (mediaSource.Protocol == 'Http' && !mediaSource.RequiredHttpHeaders.length) {
|
||||
|
||||
if (mediaSource.SupportsDirectPlay && mediaSource.Protocol == 'File') {
|
||||
// If this is the only way it can be played, then allow it
|
||||
if (!mediaSource.SupportsDirectStream && !mediaSource.SupportsTranscoding) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return FileSystemBridge.fileExists(mediaSource.Path);
|
||||
// TODO: Need to verify the host is going to be reachable
|
||||
return mediaSource.Path.toLowerCase().replace('https:', 'http').indexOf(ApiClient.serverAddress().toLowerCase().replace('https:', 'http').substring(0, 14)) == 0;
|
||||
}
|
||||
|
||||
if (mediaSource.Protocol == 'File') {
|
||||
|
||||
return FileSystemBridge.fileExists(mediaSource.Path);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -1095,7 +1095,7 @@
|
|||
|
||||
var requiresNativeControls = false;
|
||||
|
||||
if (self.currentMediaRenderer && !self.currentMediaRenderer.enableCustomVideoControls) {
|
||||
if (self.currentMediaRenderer && self.currentMediaRenderer.enableCustomVideoControls) {
|
||||
requiresNativeControls = self.currentMediaRenderer.enableCustomVideoControls();
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
ApiClient.ajax({
|
||||
type: "DELETE",
|
||||
url: ApiClient.getUrl('Auth/Keys/' + key)
|
||||
url: ApiClient.getUrl('Auth/Keys' + key)
|
||||
|
||||
}).done(function () {
|
||||
|
||||
|
@ -103,7 +103,7 @@
|
|||
|
||||
ApiClient.ajax({
|
||||
type: "POST",
|
||||
url: ApiClient.getUrl('Auth/Keys/', {
|
||||
url: ApiClient.getUrl('Auth/Keys', {
|
||||
|
||||
App: $('#txtAppName', form).val()
|
||||
|
||||
|
|
|
@ -1516,7 +1516,7 @@ var Dashboard = {
|
|||
SupportedLiveMediaTypes: ['Audio', 'Video']
|
||||
};
|
||||
|
||||
if (Dashboard.isRunningInCordova() && $.browser.android) {
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
caps.SupportsOfflineAccess = true;
|
||||
caps.SupportsSync = true;
|
||||
caps.SupportsContentUploading = true;
|
||||
|
@ -2148,6 +2148,12 @@ var AppInfo = {};
|
|||
define("offlineusersync", ["apiclient/sync/offlineusersync"]);
|
||||
define("mediasync", ["apiclient/sync/mediasync"]);
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
define("fileupload", ["cordova/fileupload"]);
|
||||
} else {
|
||||
define("fileupload", ["apiclient/fileupload"]);
|
||||
}
|
||||
|
||||
var deps = [];
|
||||
|
||||
if (!deviceId) {
|
||||
|
@ -2270,6 +2276,10 @@ var AppInfo = {};
|
|||
Dashboard.initPromiseDone = true;
|
||||
$.mobile.initializePage();
|
||||
deferred.resolve();
|
||||
|
||||
if (AppInfo.isNativeApp && !$.browser.android) {
|
||||
require(['localsync']);
|
||||
}
|
||||
}
|
||||
|
||||
function initCordovaWithDeviceId(deferred, deviceId) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue