1
0
Fork 0
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:
Luke Pulverenti 2015-09-18 13:50:24 -04:00
parent 2b091ce5de
commit c08a709ad1
8 changed files with 107 additions and 80 deletions

View file

@ -230,6 +230,7 @@
function downloadMedia(apiClient, jobItem, localItem) { function downloadMedia(apiClient, jobItem, localItem) {
Logger.log('Begin downloadMedia');
var deferred = DeferredBuilder.Deferred(); var deferred = DeferredBuilder.Deferred();
require(['localassetmanager'], function () { require(['localassetmanager'], function () {
@ -259,6 +260,7 @@
function getImages(apiClient, jobItem, localItem) { function getImages(apiClient, jobItem, localItem) {
Logger.log('Begin getImages');
var deferred = DeferredBuilder.Deferred(); var deferred = DeferredBuilder.Deferred();
getNextImage(0, apiClient, localItem, deferred); getNextImage(0, apiClient, localItem, deferred);
@ -268,13 +270,14 @@
function getNextImage(index, apiClient, localItem, deferred) { function getNextImage(index, apiClient, localItem, deferred) {
Logger.log('Begin getNextImage');
if (index >= 4) { if (index >= 4) {
deferred.resolve(); deferred.resolve();
return; return;
} }
var libraryItem = item.Item; var libraryItem = localItem.Item;
var serverId = libraryItem.ServerId; var serverId = libraryItem.ServerId;
var itemId = null; var itemId = null;
@ -307,12 +310,7 @@
break; break;
} }
if (!itemId) { if (!itemId || !imageTag) {
deferred.resolve();
return;
}
if (!imageTag) {
getNextImage(index + 1, apiClient, localItem, deferred); getNextImage(index + 1, apiClient, localItem, deferred);
return; return;
} }
@ -339,8 +337,8 @@
} }
var imageUrl = apiClient.getImageUrl(itemId, { var imageUrl = apiClient.getImageUrl(itemId, {
Tag: imageTag, tag: imageTag,
ImageType: imageType, type: imageType,
api_key: apiClient.accessToken() api_key: apiClient.accessToken()
}); });
@ -375,13 +373,13 @@
var mediaSource = jobItem.Item.MediaSources[0]; var mediaSource = jobItem.Item.MediaSources[0];
getNextSubtitle(files, 0, apiClient, jobItem, localItem, mediaSource); getNextSubtitle(files, 0, apiClient, jobItem, localItem, mediaSource, deferred);
}); });
return deferred.promise(); return deferred.promise();
} }
function getNextSubtitle(files, index, apiClient, jobItem, localItem, mediaSource) { function getNextSubtitle(files, index, apiClient, jobItem, localItem, mediaSource, deferred) {
var length = files.length; var length = files.length;
@ -393,10 +391,10 @@
getItemSubtitle(file, apiClient, jobItem, localItem, mediaSource).done(function () { 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 () { }).fail(function () {
getNextSubtitle(files, index + 1, apiClient, jobItem, localItem, mediaSource); getNextSubtitle(files, index + 1, apiClient, jobItem, localItem, mediaSource, deferred);
}); });
} }

View file

@ -23,14 +23,14 @@
"paper-styles": "polymerelements/paper-styles#^1.0.0", "paper-styles": "polymerelements/paper-styles#^1.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.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", "_release": "1.0.3",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.3", "tag": "v1.0.3",
"commit": "e6c2cfec18354973ac03e70dcd8afcc3c72d09b9" "commit": "e6c2cfec18354973ac03e70dcd8afcc3c72d09b9"
}, },
"_source": "git://github.com/PolymerElements/iron-flex-layout.git", "_source": "git://github.com/polymerelements/iron-flex-layout.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "PolymerElements/iron-flex-layout" "_originalSource": "polymerelements/iron-flex-layout"
} }

View file

@ -88,7 +88,6 @@
ApiClient.uploadItemImage(currentItemId, imageType, file).done(function () { ApiClient.uploadItemImage(currentItemId, imageType, file).done(function () {
$('#uploadImage', page).val('').trigger('change'); $('#uploadImage', page).val('').trigger('change');
$('#popupUpload', page).popup("close");
Dashboard.hideLoadingMsg(); Dashboard.hideLoadingMsg();
processImageChangeResult(page); processImageChangeResult(page);
}); });

View file

@ -1,6 +1,6 @@
(function (globalScope) { (function (globalScope) {
function paperDialogHashHandler(dlg, hash) { function paperDialogHashHandler(dlg, hash, lockDocumentScroll) {
var isActive = true; var isActive = true;
@ -21,7 +21,9 @@
function onDialogClosed() { function onDialogClosed() {
if (lockDocumentScroll !== false) {
Dashboard.onPopupClose(); Dashboard.onPopupClose();
}
dlg = null; dlg = null;
$(window).off('navigate', onHashChange); $(window).off('navigate', onHashChange);
@ -35,16 +37,19 @@
$(dlg).on('iron-overlay-closed', onDialogClosed); $(dlg).on('iron-overlay-closed', onDialogClosed);
dlg.open(); dlg.open();
if (lockDocumentScroll !== false) {
Dashboard.onPopupOpen(); Dashboard.onPopupOpen();
}
window.location.hash = hash; window.location.hash = hash;
$(window).on('navigate', onHashChange); $(window).on('navigate', onHashChange);
} }
function openWithHash(dlg, hash) { function openWithHash(dlg, hash, lockDocumentScroll) {
new paperDialogHashHandler(dlg, hash); new paperDialogHashHandler(dlg, hash, lockDocumentScroll);
} }
globalScope.PaperDialogHelper = { globalScope.PaperDialogHelper = {

View file

@ -277,14 +277,19 @@
function addOrUpdateLocalItem(item) { function addOrUpdateLocalItem(item) {
Logger.log('addOrUpdateLocalItem');
var deferred = DeferredBuilder.Deferred(); var deferred = DeferredBuilder.Deferred();
getOfflineItemsDb(function (db) { getOfflineItemsDb(function (db) {
db.transaction(function (tx) { 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); 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) { getFileSystem().done(function (fileSystem) {
var localPath = trimEnd(fileSystem.root.toURL()) + "/" + path.join('/'); var localPath = fileSystem.root.toURL() + "/" + path.join('/');
item.LocalPath = localPath; item.LocalPath = localPath;
@ -397,18 +402,6 @@
return deferred.promise(); 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) { function getDirectoryPath(item, server) {
var parts = []; var parts = [];
@ -470,16 +463,16 @@
getFileSystem().done(function (fileSystem) { getFileSystem().done(function (fileSystem) {
fileSystem.root.getFile(localPath.replace('file://', ''), {}, function (targetFile) { var targetFile = localPath;
var downloader = new BackgroundTransfer.BackgroundDownloader(); var downloader = new BackgroundTransfer.BackgroundDownloader();
// Create a new download operation. // Create a new download operation.
var download = downloader.createDownload(url, targetFile); var download = downloader.createDownload(url, targetFile);
// Start the download and persist the promise to be able to cancel the download. // 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 // on success
var localUrl = normalizeReturnUrl(targetFile.toURL()); var localUrl = localPath;
Logger.log('Downloaded local url: ' + localUrl); Logger.log('Downloaded local url: ' + localUrl);
deferred.resolveWith(null, [localUrl]); deferred.resolveWith(null, [localUrl]);
@ -496,7 +489,6 @@
Logger.log('download progress: ' + value); Logger.log('download progress: ' + value);
}); });
});
}); });
@ -598,7 +590,7 @@
var deferred = DeferredBuilder.Deferred(); var deferred = DeferredBuilder.Deferred();
getFileSystem().done(function (fileSystem) { 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]); deferred.resolveWith(null, [path]);
}); });

View file

@ -36,14 +36,15 @@
.remoteImageContainer { .remoteImageContainer {
display: inline-block; display: inline-block;
margin: 8px; margin: 5px;
vertical-align: top; vertical-align: top;
} }
.remoteImageDetails { .remoteImageDetails {
text-align: center; text-align: left;
background: #282828; background: #282828;
position: relative; position: relative;
padding: 5px 5px 2px;
} }
.remoteImageDetails paper-icon-button { .remoteImageDetails paper-icon-button {
@ -71,8 +72,8 @@
} }
.remotePosterImage { .remotePosterImage {
width: 150px; width: 140px;
height: 225px; height: 210px;
} }
.remoteBackdropImage { .remoteBackdropImage {
@ -90,6 +91,37 @@
height: 180px; 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 { .editorfieldDescription {
color: #ccc; color: #ccc;
} }
@ -166,7 +198,6 @@
@media all and (min-width: 600px) { @media all and (min-width: 600px) {
.remoteBannerImage { .remoteBannerImage {
width: 450px; width: 450px;
height: 83px; height: 83px;

View file

@ -2679,17 +2679,18 @@
dlg.setAttribute('with-backdrop', 'with-backdrop'); dlg.setAttribute('with-backdrop', 'with-backdrop');
dlg.setAttribute('role', 'alertdialog'); 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'; dlg.exitAnimation = 'fade-out-animation';
var html = ''; var html = '';
// There seems to be a bug with this in safari causing it to immediately roll up to 0 height // 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 // 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 += '<h2>';
html += Globalize.translate('HeaderSortBy'); html += Globalize.translate('HeaderSortBy');
@ -2733,8 +2734,8 @@
require(['components/paperdialoghelper'], function () { require(['components/paperdialoghelper'], function () {
PaperDialogHelper.openWithHash(dlg, 'sortmenu'); //PaperDialogHelper.openWithHash(dlg, 'sortmenu');
}); dlg.open();
$('.groupSortBy', dlg).on('iron-select', function () { $('.groupSortBy', dlg).on('iron-select', function () {
options.query.SortBy = this.selected.replace('_', ','); options.query.SortBy = this.selected.replace('_', ',');
@ -2754,6 +2755,7 @@
options.callback(); options.callback();
} }
}); });
});
}, },
getRatingHtml: function (item, metascore) { getRatingHtml: function (item, metascore) {

View file

@ -419,7 +419,7 @@ var Dashboard = {
var onclick = removeOnHide ? "$(\"#" + options.id + "\").trigger(\"notification.remove\").remove();" : "$(\"#" + options.id + "\").trigger(\"notification.hide\").hide();"; var onclick = removeOnHide ? "$(\"#" + options.id + "\").trigger(\"notification.remove\").remove();" : "$(\"#" + options.id + "\").trigger(\"notification.hide\").hide();";
if (options.allowHide !== false) { 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) { if (options.forceShow) {