mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Adjust transcoding throttling
This commit is contained in:
parent
c9e79fdcdf
commit
c444daa6e8
8 changed files with 121 additions and 60 deletions
|
@ -1194,7 +1194,7 @@ a.itemTag:hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.itemsContainer .itemsListview {
|
.itemsContainer:not(.fullWidthItemsContainer) .itemsListview {
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,9 @@
|
||||||
<div class="detailSectionHeader">
|
<div class="detailSectionHeader">
|
||||||
<span id="childrenTitle"></span>
|
<span id="childrenTitle"></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="childrenContent" class="detailSectionContent"></div>
|
<div id="childrenContent" class="detailSectionContent">
|
||||||
|
<div class="childrenItemsContainer itemsContainer fullWidthItemsContainer" style="text-align:left;"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="additionalPartsCollapsible" class="detailSection hide">
|
<div id="additionalPartsCollapsible" class="detailSection hide">
|
||||||
<div class="detailSectionHeader">
|
<div class="detailSectionHeader">
|
||||||
|
|
|
@ -424,7 +424,8 @@
|
||||||
html = LibraryBrowser.getListViewHtml({
|
html = LibraryBrowser.getListViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
smallIcon: true,
|
smallIcon: true,
|
||||||
playFromHere: true
|
playFromHere: true,
|
||||||
|
defaultAction: 'playallfromhere'
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -433,8 +433,12 @@
|
||||||
attributes.push(createAttribute("Camera model", item.CameraModel));
|
attributes.push(createAttribute("Camera model", item.CameraModel));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Software) {
|
if (item.Altitude) {
|
||||||
attributes.push(createAttribute("Software", item.Software));
|
attributes.push(createAttribute("Altitude", item.Altitude.toFixed(1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.Aperture) {
|
||||||
|
attributes.push(createAttribute("Aperture", 'F' + item.Aperture.toFixed(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.ExposureTime) {
|
if (item.ExposureTime) {
|
||||||
|
@ -448,16 +452,28 @@
|
||||||
attributes.push(createAttribute("Focal length", item.FocalLength.toFixed(1) + ' mm'));
|
attributes.push(createAttribute("Focal length", item.FocalLength.toFixed(1) + ' mm'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.Aperture) {
|
if (item.ImageOrientation) {
|
||||||
attributes.push(createAttribute("Aperture", 'F' + item.Aperture.toFixed(1)));
|
attributes.push(createAttribute("Orientation", item.ImageOrientation));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.IsoSpeedRating) {
|
||||||
|
attributes.push(createAttribute("Iso Speed Rating", item.IsoSpeedRating));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.Latitude) {
|
||||||
|
attributes.push(createAttribute("Latitude", item.Latitude.toFixed(1)));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.Longitude) {
|
||||||
|
attributes.push(createAttribute("Longitude", item.Longitude.toFixed(1)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.ShutterSpeed) {
|
if (item.ShutterSpeed) {
|
||||||
attributes.push(createAttribute("ShutterSpeed", item.ShutterSpeed));
|
attributes.push(createAttribute("ShutterSpeed", item.ShutterSpeed));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.ImageOrientation) {
|
if (item.Software) {
|
||||||
attributes.push(createAttribute("Orientation", item.ImageOrientation));
|
attributes.push(createAttribute("Software", item.Software));
|
||||||
}
|
}
|
||||||
|
|
||||||
html += attributes.join('<br/>');
|
html += attributes.join('<br/>');
|
||||||
|
@ -691,8 +707,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var _childrenItemsQuery = null;
|
||||||
function renderChildren(page, item, user, context) {
|
function renderChildren(page, item, user, context) {
|
||||||
|
|
||||||
|
_childrenItemsQuery = null;
|
||||||
|
|
||||||
var fields = "ItemCounts,AudioInfo,PrimaryImageAspectRatio";
|
var fields = "ItemCounts,AudioInfo,PrimaryImageAspectRatio";
|
||||||
|
|
||||||
var query = {
|
var query = {
|
||||||
|
@ -726,26 +745,27 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_childrenItemsQuery = query;
|
||||||
promise = promise || ApiClient.getItems(Dashboard.getCurrentUserId(), query);
|
promise = promise || ApiClient.getItems(Dashboard.getCurrentUserId(), query);
|
||||||
|
|
||||||
promise.done(function (result) {
|
promise.done(function (result) {
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
|
||||||
if (item.Type == "MusicAlbum") {
|
if (item.Type == "MusicAlbum") {
|
||||||
|
|
||||||
$('#childrenContent', page).html(LibraryBrowser.getListViewHtml({
|
html = LibraryBrowser.getListViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
smallIcon: true,
|
smallIcon: true,
|
||||||
showIndex: true,
|
showIndex: true,
|
||||||
index: 'disc',
|
index: 'disc',
|
||||||
showIndexNumber: true
|
showIndexNumber: true,
|
||||||
|
playFromHere: true,
|
||||||
|
defaultAction: 'playallfromhere'
|
||||||
|
});
|
||||||
|
|
||||||
})).trigger('create').createCardMenus();
|
}
|
||||||
|
else if (item.Type == "Series") {
|
||||||
} else {
|
|
||||||
|
|
||||||
var html = '';
|
|
||||||
|
|
||||||
if (item.Type == "Series") {
|
|
||||||
html = LibraryBrowser.getPosterViewHtml({
|
html = LibraryBrowser.getPosterViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
shape: "detailPagePortrait",
|
shape: "detailPagePortrait",
|
||||||
|
@ -775,7 +795,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#childrenContent', page).html(html).trigger('create').createCardMenus();
|
$('.childrenItemsContainer', page).html(html).trigger('create').createCardMenus();
|
||||||
|
|
||||||
if (item.Type == "BoxSet") {
|
if (item.Type == "BoxSet") {
|
||||||
|
|
||||||
|
@ -789,7 +809,6 @@
|
||||||
|
|
||||||
renderCollectionItems(page, collectionItemTypes, result.Items, user, context);
|
renderCollectionItems(page, collectionItemTypes, result.Items, user, context);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (item.Type == "Season") {
|
if (item.Type == "Season") {
|
||||||
|
@ -1521,6 +1540,16 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.childrenItemsContainer', page).on('playallfromhere', function (e, index) {
|
||||||
|
|
||||||
|
LibraryBrowser.playAllFromHere(_childrenItemsQuery, index);
|
||||||
|
|
||||||
|
}).on('queueallfromhere', function (e, index) {
|
||||||
|
|
||||||
|
LibraryBrowser.queueAllFromHere(_childrenItemsQuery, index);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}).on('pageshow', "#itemDetailPage", function () {
|
}).on('pageshow', "#itemDetailPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
|
@ -601,8 +601,12 @@
|
||||||
cssClass += ' ' + LibraryBrowser.getUserDataCssClass(item.UserData.Key);
|
cssClass += ' ' + LibraryBrowser.getUserDataCssClass(item.UserData.Key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var href = LibraryBrowser.getHref(item, options.context);
|
var href = LibraryBrowser.getHref(item, options.context);
|
||||||
html += '<li class="' + cssClass + '"' + dataAttributes + ' data-index="' + index + '" data-itemid="' + item.Id + '" data-playlistitemid="' + (item.PlaylistItemId || '') + '" data-href="' + href + '"><a href="' + href + '">';
|
html += '<li class="' + cssClass + '"' + dataAttributes + ' data-index="' + index + '" data-itemid="' + item.Id + '" data-playlistitemid="' + (item.PlaylistItemId || '') + '" data-href="' + href + '">';
|
||||||
|
|
||||||
|
var onclick = options.defaultAction ? (' data-action="' + options.defaultAction + '" class="itemWithAction"') : '';
|
||||||
|
html += '<a' + onclick + ' href="' + href + '">';
|
||||||
|
|
||||||
var imgUrl;
|
var imgUrl;
|
||||||
|
|
||||||
|
|
|
@ -723,6 +723,28 @@
|
||||||
PlaylistManager.showPanel(selection);
|
PlaylistManager.showPanel(selection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onItemWithActionClick() {
|
||||||
|
|
||||||
|
var elem = this;
|
||||||
|
var action = elem.getAttribute('data-action');
|
||||||
|
var itemId = elem.parentNode.getAttribute('data-itemid');
|
||||||
|
|
||||||
|
if (action == 'play') {
|
||||||
|
MediaController.play(itemId);
|
||||||
|
}
|
||||||
|
else if (action == 'playallfromhere') {
|
||||||
|
|
||||||
|
var index = elem.parentNode.getAttribute('data-index');
|
||||||
|
var itemsContainer = $(elem).parents('.itemsContainer');
|
||||||
|
|
||||||
|
closeContextMenu();
|
||||||
|
|
||||||
|
itemsContainer.trigger('playallfromhere', [index]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
$(document).on('pageinit', ".libraryPage", function () {
|
$(document).on('pageinit', ".libraryPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
@ -762,6 +784,7 @@
|
||||||
toggleSelections(page);
|
toggleSelections(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.itemWithAction', this).on('click', onItemWithActionClick);
|
||||||
});
|
});
|
||||||
|
|
||||||
}).on('pagebeforeshow', ".libraryPage", function () {
|
}).on('pagebeforeshow', ".libraryPage", function () {
|
||||||
|
|
|
@ -76,7 +76,8 @@
|
||||||
title: item.Name,
|
title: item.Name,
|
||||||
showRemoveFromPlaylist: true,
|
showRemoveFromPlaylist: true,
|
||||||
smallIcon: true,
|
smallIcon: true,
|
||||||
playFromHere: true
|
playFromHere: true,
|
||||||
|
defaultAction: 'playallfromhere'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,8 @@
|
||||||
html += LibraryBrowser.getListViewHtml({
|
html += LibraryBrowser.getListViewHtml({
|
||||||
items: result.Items,
|
items: result.Items,
|
||||||
smallIcon: true,
|
smallIcon: true,
|
||||||
showIndex: true
|
showIndex: true,
|
||||||
|
defaultAction: 'play'
|
||||||
});
|
});
|
||||||
|
|
||||||
html += pagingHtml;
|
html += pagingHtml;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue