mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
af2e209ce4
commit
d4f9f432a4
19 changed files with 130 additions and 113 deletions
|
@ -1,4 +1,5 @@
|
|||
define(['localassetmanager'], function (localAssetManager) {
|
||||
'use strict';
|
||||
|
||||
return function (connectionManager) {
|
||||
|
||||
|
@ -43,9 +44,9 @@
|
|||
|
||||
return uploadHistory.FilesUploaded.filter(function (u) {
|
||||
|
||||
return getUploadId(file) == u.Id;
|
||||
return getUploadId(file) === u.Id;
|
||||
|
||||
}).length == 0;
|
||||
}).length === 0;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
define(['localassetmanager'], function (LocalAssetManager) {
|
||||
'use strict';
|
||||
|
||||
return function () {
|
||||
|
||||
|
@ -248,55 +249,54 @@
|
|||
|
||||
// Just for now while media syncing gets worked out
|
||||
deferred.resolve();
|
||||
return;
|
||||
|
||||
var libraryItem = localItem.Item;
|
||||
//var libraryItem = localItem.Item;
|
||||
|
||||
var serverId = libraryItem.ServerId;
|
||||
var itemId = null;
|
||||
var imageTag = null;
|
||||
var imageType = "Primary";
|
||||
//var serverId = libraryItem.ServerId;
|
||||
//var itemId = null;
|
||||
//var imageTag = null;
|
||||
//var imageType = "Primary";
|
||||
|
||||
switch (index) {
|
||||
//switch (index) {
|
||||
|
||||
case 0:
|
||||
itemId = libraryItem.Id;
|
||||
imageType = "Primary";
|
||||
imageTag = (libraryItem.ImageTags || {})["Primary"];
|
||||
break;
|
||||
case 1:
|
||||
itemId = libraryItem.SeriesId;
|
||||
imageType = "Primary";
|
||||
imageTag = libraryItem.SeriesPrimaryImageTag;
|
||||
break;
|
||||
case 2:
|
||||
itemId = libraryItem.SeriesId;
|
||||
imageType = "Thumb";
|
||||
imageTag = libraryItem.SeriesPrimaryImageTag;
|
||||
break;
|
||||
case 3:
|
||||
itemId = libraryItem.AlbumId;
|
||||
imageType = "Primary";
|
||||
imageTag = libraryItem.AlbumPrimaryImageTag;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
// case 0:
|
||||
// itemId = libraryItem.Id;
|
||||
// imageType = "Primary";
|
||||
// imageTag = (libraryItem.ImageTags || {})["Primary"];
|
||||
// break;
|
||||
// case 1:
|
||||
// itemId = libraryItem.SeriesId;
|
||||
// imageType = "Primary";
|
||||
// imageTag = libraryItem.SeriesPrimaryImageTag;
|
||||
// break;
|
||||
// case 2:
|
||||
// itemId = libraryItem.SeriesId;
|
||||
// imageType = "Thumb";
|
||||
// imageTag = libraryItem.SeriesPrimaryImageTag;
|
||||
// break;
|
||||
// case 3:
|
||||
// itemId = libraryItem.AlbumId;
|
||||
// imageType = "Primary";
|
||||
// imageTag = libraryItem.AlbumPrimaryImageTag;
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
//}
|
||||
|
||||
if (!itemId || !imageTag) {
|
||||
getNextImage(index + 1, apiClient, localItem, deferred);
|
||||
return;
|
||||
}
|
||||
//if (!itemId || !imageTag) {
|
||||
// getNextImage(index + 1, apiClient, localItem, deferred);
|
||||
// return;
|
||||
//}
|
||||
|
||||
downloadImage(apiClient, serverId, itemId, imageTag, imageType).then(function () {
|
||||
//downloadImage(apiClient, serverId, itemId, imageTag, imageType).then(function () {
|
||||
|
||||
// For the sake of simplicity, limit to one image
|
||||
deferred.resolve();
|
||||
return;
|
||||
// // For the sake of simplicity, limit to one image
|
||||
// deferred.resolve();
|
||||
// return;
|
||||
|
||||
getNextImage(index + 1, apiClient, localItem, deferred);
|
||||
// getNextImage(index + 1, apiClient, localItem, deferred);
|
||||
|
||||
}, getOnFail(deferred));
|
||||
//}, getOnFail(deferred));
|
||||
}
|
||||
|
||||
function downloadImage(apiClient, serverId, itemId, imageTag, imageType) {
|
||||
|
@ -340,7 +340,7 @@
|
|||
}
|
||||
|
||||
var files = jobItem.AdditionalFiles.filter(function (f) {
|
||||
return f.Type == 'Subtitles';
|
||||
return f.Type === 'Subtitles';
|
||||
});
|
||||
|
||||
var mediaSource = jobItem.Item.MediaSources[0];
|
||||
|
@ -375,7 +375,7 @@
|
|||
var deferred = DeferredBuilder.Deferred();
|
||||
|
||||
var subtitleStream = mediaSource.MediaStreams.filter(function (m) {
|
||||
return m.Type == 'Subtitle' && m.Index == file.Index;
|
||||
return m.Type === 'Subtitle' && m.Index === file.Index;
|
||||
})[0];
|
||||
|
||||
if (!subtitleStream) {
|
||||
|
@ -445,7 +445,7 @@
|
|||
|
||||
var userIdsWithAccess = syncDataResult.ItemUserAccess[itemId];
|
||||
|
||||
if (userIdsWithAccess.join(',') == savedUserIdsWithAccess.join(',')) {
|
||||
if (userIdsWithAccess.join(',') === savedUserIdsWithAccess.join(',')) {
|
||||
// Hasn't changed, nothing to do
|
||||
deferred.resolve();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
define(['serversync'], function (ServerSync) {
|
||||
'use strict';
|
||||
|
||||
function syncNext(connectionManager, servers, index, options, resolve, reject) {
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
define(['localassetmanager'], function (localAssetManager) {
|
||||
'use strict';
|
||||
|
||||
function syncNext(users, index, resolve, reject, apiClient, server) {
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
define([], function () {
|
||||
'use strict';
|
||||
|
||||
return function (connectionManager) {
|
||||
|
||||
|
@ -20,7 +21,7 @@
|
|||
|
||||
return connectionManager.connectToServer(server, connectionOptions).then(function (result) {
|
||||
|
||||
if (result.State == MediaBrowser.ConnectionState.SignedIn) {
|
||||
if (result.State === MediaBrowser.ConnectionState.SignedIn) {
|
||||
return performSync(server, options);
|
||||
} else {
|
||||
console.log('Unable to connect to server id: ' + server.Id);
|
||||
|
@ -42,7 +43,7 @@
|
|||
|
||||
var uploadPhotos = options.uploadPhotos !== false;
|
||||
|
||||
if (options.cameraUploadServers && options.cameraUploadServers.indexOf(server.Id) == -1) {
|
||||
if (options.cameraUploadServers && options.cameraUploadServers.indexOf(server.Id) === -1) {
|
||||
uploadPhotos = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue