mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update ffmpeg with qsv-compatible version
This commit is contained in:
parent
2b091ce5de
commit
c08a709ad1
8 changed files with 107 additions and 80 deletions
|
@ -230,6 +230,7 @@
|
|||
|
||||
function downloadMedia(apiClient, jobItem, localItem) {
|
||||
|
||||
Logger.log('Begin downloadMedia');
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
|
||||
require(['localassetmanager'], function () {
|
||||
|
@ -259,6 +260,7 @@
|
|||
|
||||
function getImages(apiClient, jobItem, localItem) {
|
||||
|
||||
Logger.log('Begin getImages');
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
|
||||
getNextImage(0, apiClient, localItem, deferred);
|
||||
|
@ -268,13 +270,14 @@
|
|||
|
||||
function getNextImage(index, apiClient, localItem, deferred) {
|
||||
|
||||
Logger.log('Begin getNextImage');
|
||||
if (index >= 4) {
|
||||
|
||||
deferred.resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
var libraryItem = item.Item;
|
||||
var libraryItem = localItem.Item;
|
||||
|
||||
var serverId = libraryItem.ServerId;
|
||||
var itemId = null;
|
||||
|
@ -307,12 +310,7 @@
|
|||
break;
|
||||
}
|
||||
|
||||
if (!itemId) {
|
||||
deferred.resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!imageTag) {
|
||||
if (!itemId || !imageTag) {
|
||||
getNextImage(index + 1, apiClient, localItem, deferred);
|
||||
return;
|
||||
}
|
||||
|
@ -339,8 +337,8 @@
|
|||
}
|
||||
|
||||
var imageUrl = apiClient.getImageUrl(itemId, {
|
||||
Tag: imageTag,
|
||||
ImageType: imageType,
|
||||
tag: imageTag,
|
||||
type: imageType,
|
||||
api_key: apiClient.accessToken()
|
||||
});
|
||||
|
||||
|
@ -375,13 +373,13 @@
|
|||
|
||||
var mediaSource = jobItem.Item.MediaSources[0];
|
||||
|
||||
getNextSubtitle(files, 0, apiClient, jobItem, localItem, mediaSource);
|
||||
getNextSubtitle(files, 0, apiClient, jobItem, localItem, mediaSource, deferred);
|
||||
});
|
||||
|
||||
return deferred.promise();
|
||||
}
|
||||
|
||||
function getNextSubtitle(files, index, apiClient, jobItem, localItem, mediaSource) {
|
||||
function getNextSubtitle(files, index, apiClient, jobItem, localItem, mediaSource, deferred) {
|
||||
|
||||
var length = files.length;
|
||||
|
||||
|
@ -393,10 +391,10 @@
|
|||
|
||||
getItemSubtitle(file, apiClient, jobItem, localItem, mediaSource).done(function () {
|
||||
|
||||
getNextSubtitle(files, index + 1, apiClient, jobItem, localItem, mediaSource);
|
||||
getNextSubtitle(files, index + 1, apiClient, jobItem, localItem, mediaSource, deferred);
|
||||
|
||||
}).fail(function () {
|
||||
getNextSubtitle(files, index + 1, apiClient, jobItem, localItem, mediaSource);
|
||||
getNextSubtitle(files, index + 1, apiClient, jobItem, localItem, mediaSource, deferred);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -23,14 +23,14 @@
|
|||
"paper-styles": "polymerelements/paper-styles#^1.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"homepage": "https://github.com/PolymerElements/iron-flex-layout",
|
||||
"homepage": "https://github.com/polymerelements/iron-flex-layout",
|
||||
"_release": "1.0.3",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.3",
|
||||
"commit": "e6c2cfec18354973ac03e70dcd8afcc3c72d09b9"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-flex-layout.git",
|
||||
"_source": "git://github.com/polymerelements/iron-flex-layout.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-flex-layout"
|
||||
"_originalSource": "polymerelements/iron-flex-layout"
|
||||
}
|
|
@ -88,7 +88,6 @@
|
|||
ApiClient.uploadItemImage(currentItemId, imageType, file).done(function () {
|
||||
|
||||
$('#uploadImage', page).val('').trigger('change');
|
||||
$('#popupUpload', page).popup("close");
|
||||
Dashboard.hideLoadingMsg();
|
||||
processImageChangeResult(page);
|
||||
});
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(function (globalScope) {
|
||||
|
||||
function paperDialogHashHandler(dlg, hash) {
|
||||
function paperDialogHashHandler(dlg, hash, lockDocumentScroll) {
|
||||
|
||||
var isActive = true;
|
||||
|
||||
|
@ -21,7 +21,9 @@
|
|||
|
||||
function onDialogClosed() {
|
||||
|
||||
if (lockDocumentScroll !== false) {
|
||||
Dashboard.onPopupClose();
|
||||
}
|
||||
|
||||
dlg = null;
|
||||
$(window).off('navigate', onHashChange);
|
||||
|
@ -35,16 +37,19 @@
|
|||
|
||||
$(dlg).on('iron-overlay-closed', onDialogClosed);
|
||||
dlg.open();
|
||||
|
||||
if (lockDocumentScroll !== false) {
|
||||
Dashboard.onPopupOpen();
|
||||
}
|
||||
|
||||
window.location.hash = hash;
|
||||
|
||||
$(window).on('navigate', onHashChange);
|
||||
}
|
||||
|
||||
function openWithHash(dlg, hash) {
|
||||
function openWithHash(dlg, hash, lockDocumentScroll) {
|
||||
|
||||
new paperDialogHashHandler(dlg, hash);
|
||||
new paperDialogHashHandler(dlg, hash, lockDocumentScroll);
|
||||
}
|
||||
|
||||
globalScope.PaperDialogHelper = {
|
||||
|
|
30
dashboard-ui/cordova/localassetmanager.js
vendored
30
dashboard-ui/cordova/localassetmanager.js
vendored
|
@ -277,14 +277,19 @@
|
|||
|
||||
function addOrUpdateLocalItem(item) {
|
||||
|
||||
Logger.log('addOrUpdateLocalItem');
|
||||
|
||||
var deferred = DeferredBuilder.Deferred();
|
||||
|
||||
getOfflineItemsDb(function (db) {
|
||||
|
||||
db.transaction(function (tx) {
|
||||
|
||||
var values = [item.Id, item.ItemId, item.Item.Type, item.Item.MediaType, item.ServerId, item.LocalPath, item.UserIdsWithAccess.join(','), item.Item.AlbumId, item.Item.AlbumName, item.Item.SeriesId, item.Item.SeriesName, JSON.stringify(item)];
|
||||
var libraryItem = item.Item || {};
|
||||
|
||||
var values = [item.Id, item.ItemId, libraryItem.Type, libraryItem.MediaType, item.ServerId, item.LocalPath, (item.UserIdsWithAccess || []).join(','), libraryItem.AlbumId, libraryItem.AlbumName, libraryItem.SeriesId, libraryItem.SeriesName, JSON.stringify(item)];
|
||||
tx.executeSql("REPLACE INTO Items (Id, ItemId, ItemType, MediaType, ServerId, LocalPath, UserIdsWithAccess, AlbumId, AlbumName, SeriesId, SeriesName, Json) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)", values);
|
||||
deferred.resolve();
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -376,7 +381,7 @@
|
|||
|
||||
getFileSystem().done(function (fileSystem) {
|
||||
|
||||
var localPath = trimEnd(fileSystem.root.toURL()) + "/" + path.join('/');
|
||||
var localPath = fileSystem.root.toURL() + "/" + path.join('/');
|
||||
|
||||
item.LocalPath = localPath;
|
||||
|
||||
|
@ -397,18 +402,6 @@
|
|||
return deferred.promise();
|
||||
}
|
||||
|
||||
function trimEnd(str) {
|
||||
|
||||
var charEnd = '/';
|
||||
|
||||
if (str.charAt(str.length - 1) == charEnd) {
|
||||
|
||||
str = str.substring(0, str.length - 1);
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function getDirectoryPath(item, server) {
|
||||
|
||||
var parts = [];
|
||||
|
@ -470,16 +463,16 @@
|
|||
|
||||
getFileSystem().done(function (fileSystem) {
|
||||
|
||||
fileSystem.root.getFile(localPath.replace('file://', ''), {}, function (targetFile) {
|
||||
var targetFile = localPath;
|
||||
|
||||
var downloader = new BackgroundTransfer.BackgroundDownloader();
|
||||
// Create a new download operation.
|
||||
var download = downloader.createDownload(url, targetFile);
|
||||
// Start the download and persist the promise to be able to cancel the download.
|
||||
app.downloadPromise = download.startAsync().then(function () {
|
||||
var downloadPromise = download.startAsync().then(function () {
|
||||
|
||||
// on success
|
||||
var localUrl = normalizeReturnUrl(targetFile.toURL());
|
||||
var localUrl = localPath;
|
||||
|
||||
Logger.log('Downloaded local url: ' + localUrl);
|
||||
deferred.resolveWith(null, [localUrl]);
|
||||
|
@ -496,7 +489,6 @@
|
|||
Logger.log('download progress: ' + value);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
@ -598,7 +590,7 @@
|
|||
var deferred = DeferredBuilder.Deferred();
|
||||
|
||||
getFileSystem().done(function (fileSystem) {
|
||||
var path = trimEnd(fileSystem.root.toURL()) + "/emby/images/" + serverId + "/" + itemId + "/" + imageTag;
|
||||
var path = fileSystem.root.toURL() + "/emby/images/" + serverId + "/" + itemId + "/" + imageTag;
|
||||
|
||||
deferred.resolveWith(null, [path]);
|
||||
});
|
||||
|
|
|
@ -36,14 +36,15 @@
|
|||
|
||||
.remoteImageContainer {
|
||||
display: inline-block;
|
||||
margin: 8px;
|
||||
margin: 5px;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.remoteImageDetails {
|
||||
text-align: center;
|
||||
text-align: left;
|
||||
background: #282828;
|
||||
position: relative;
|
||||
padding: 5px 5px 2px;
|
||||
}
|
||||
|
||||
.remoteImageDetails paper-icon-button {
|
||||
|
@ -71,8 +72,8 @@
|
|||
}
|
||||
|
||||
.remotePosterImage {
|
||||
width: 150px;
|
||||
height: 225px;
|
||||
width: 140px;
|
||||
height: 210px;
|
||||
}
|
||||
|
||||
.remoteBackdropImage {
|
||||
|
@ -90,6 +91,37 @@
|
|||
height: 180px;
|
||||
}
|
||||
|
||||
@media all and (min-width: 600px) {
|
||||
|
||||
.remotePosterImage {
|
||||
width: 160px;
|
||||
height: 240px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-width: 1200px) {
|
||||
|
||||
.remotePosterImage {
|
||||
width: 200px;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.remoteBackdropImage {
|
||||
width: 320px;
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.remoteDiscImage {
|
||||
width: 240px;
|
||||
height: 240px;
|
||||
}
|
||||
|
||||
.remoteBannerImage {
|
||||
width: 544px;
|
||||
height: 100px;
|
||||
}
|
||||
}
|
||||
|
||||
.editorfieldDescription {
|
||||
color: #ccc;
|
||||
}
|
||||
|
@ -166,7 +198,6 @@
|
|||
|
||||
@media all and (min-width: 600px) {
|
||||
|
||||
|
||||
.remoteBannerImage {
|
||||
width: 450px;
|
||||
height: 83px;
|
||||
|
|
|
@ -2679,17 +2679,18 @@
|
|||
|
||||
dlg.setAttribute('with-backdrop', 'with-backdrop');
|
||||
dlg.setAttribute('role', 'alertdialog');
|
||||
// without this safari will scroll the background instead of the dialog contents
|
||||
|
||||
dlg.entryAnimation = 'scale-up-animation';
|
||||
dlg.entryAnimation = 'fade-in-animation';
|
||||
dlg.exitAnimation = 'fade-out-animation';
|
||||
|
||||
var html = '';
|
||||
|
||||
// There seems to be a bug with this in safari causing it to immediately roll up to 0 height
|
||||
var isScrollable = !$.browser.safari;
|
||||
// Have to disable this right now because it's causing the radio buttons to not function properly in other browsers besides chrome
|
||||
isScrollable = false;
|
||||
var isScrollable = false;
|
||||
if ($.browser.android) {
|
||||
isScrollable = true;
|
||||
}
|
||||
|
||||
html += '<h2>';
|
||||
html += Globalize.translate('HeaderSortBy');
|
||||
|
@ -2733,8 +2734,8 @@
|
|||
|
||||
require(['components/paperdialoghelper'], function () {
|
||||
|
||||
PaperDialogHelper.openWithHash(dlg, 'sortmenu');
|
||||
});
|
||||
//PaperDialogHelper.openWithHash(dlg, 'sortmenu');
|
||||
dlg.open();
|
||||
|
||||
$('.groupSortBy', dlg).on('iron-select', function () {
|
||||
options.query.SortBy = this.selected.replace('_', ',');
|
||||
|
@ -2754,6 +2755,7 @@
|
|||
options.callback();
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
getRatingHtml: function (item, metascore) {
|
||||
|
|
|
@ -419,7 +419,7 @@ var Dashboard = {
|
|||
var onclick = removeOnHide ? "$(\"#" + options.id + "\").trigger(\"notification.remove\").remove();" : "$(\"#" + options.id + "\").trigger(\"notification.hide\").hide();";
|
||||
|
||||
if (options.allowHide !== false) {
|
||||
options.html += "<span style='margin-left: 1em;'><button type='button' onclick='" + onclick + "' data-icon='delete' data-iconpos='notext' data-mini='true' data-inline='true' data-theme='b'>" + Globalize.translate('ButtonHide') + "</button></span>";
|
||||
options.html += "<span style='margin-left: 1em;'><paper-button class='submit' onclick='" + onclick + "'>" + Globalize.translate('ButtonHide') + "</paper-button></span>";
|
||||
}
|
||||
|
||||
if (options.forceShow) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue