1
0
Fork 0
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:
Luke Pulverenti 2014-08-30 10:26:29 -04:00
parent c9e79fdcdf
commit c444daa6e8
8 changed files with 121 additions and 60 deletions

View file

@ -1194,7 +1194,7 @@ a.itemTag:hover {
}
.itemsContainer .itemsListview {
.itemsContainer:not(.fullWidthItemsContainer) .itemsListview {
max-width: 800px;
}

View file

@ -171,7 +171,9 @@
<div class="detailSectionHeader">
<span id="childrenTitle"></span>
</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 id="additionalPartsCollapsible" class="detailSection hide">
<div class="detailSectionHeader">

View file

@ -424,7 +424,8 @@
html = LibraryBrowser.getListViewHtml({
items: result.Items,
smallIcon: true,
playFromHere: true
playFromHere: true,
defaultAction: 'playallfromhere'
});
}

View file

@ -433,8 +433,12 @@
attributes.push(createAttribute("Camera model", item.CameraModel));
}
if (item.Software) {
attributes.push(createAttribute("Software", item.Software));
if (item.Altitude) {
attributes.push(createAttribute("Altitude", item.Altitude.toFixed(1)));
}
if (item.Aperture) {
attributes.push(createAttribute("Aperture", 'F' + item.Aperture.toFixed(1)));
}
if (item.ExposureTime) {
@ -448,16 +452,28 @@
attributes.push(createAttribute("Focal length", item.FocalLength.toFixed(1) + ' mm'));
}
if (item.Aperture) {
attributes.push(createAttribute("Aperture", 'F' + item.Aperture.toFixed(1)));
if (item.ImageOrientation) {
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) {
attributes.push(createAttribute("ShutterSpeed", item.ShutterSpeed));
}
if (item.ImageOrientation) {
attributes.push(createAttribute("Orientation", item.ImageOrientation));
if (item.Software) {
attributes.push(createAttribute("Software", item.Software));
}
html += attributes.join('<br/>');
@ -691,8 +707,11 @@
}
}
var _childrenItemsQuery = null;
function renderChildren(page, item, user, context) {
_childrenItemsQuery = null;
var fields = "ItemCounts,AudioInfo,PrimaryImageAspectRatio";
var query = {
@ -726,69 +745,69 @@
});
}
_childrenItemsQuery = query;
promise = promise || ApiClient.getItems(Dashboard.getCurrentUserId(), query);
promise.done(function (result) {
var html = '';
if (item.Type == "MusicAlbum") {
$('#childrenContent', page).html(LibraryBrowser.getListViewHtml({
html = LibraryBrowser.getListViewHtml({
items: result.Items,
smallIcon: true,
showIndex: true,
index: 'disc',
showIndexNumber: true
showIndexNumber: true,
playFromHere: true,
defaultAction: 'playallfromhere'
});
})).trigger('create').createCardMenus();
}
else if (item.Type == "Series") {
html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "detailPagePortrait",
showTitle: false,
centerText: true,
context: context,
overlayText: true
});
}
else if (item.Type == "Season") {
html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "detailPage169",
showTitle: true,
displayAsSpecial: item.Type == "Season" && item.IndexNumber,
context: context,
overlayText: true
});
}
else if (item.Type == "GameSystem") {
html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "auto",
showTitle: true,
centerText: true,
context: context
});
}
} else {
$('.childrenItemsContainer', page).html(html).trigger('create').createCardMenus();
var html = '';
if (item.Type == "BoxSet") {
if (item.Type == "Series") {
html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "detailPagePortrait",
showTitle: false,
centerText: true,
context: context,
overlayText: true
});
}
else if (item.Type == "Season") {
html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "detailPage169",
showTitle: true,
displayAsSpecial: item.Type == "Season" && item.IndexNumber,
context: context,
overlayText: true
});
}
else if (item.Type == "GameSystem") {
html = LibraryBrowser.getPosterViewHtml({
items: result.Items,
shape: "auto",
showTitle: true,
centerText: true,
context: context
});
}
var collectionItemTypes = [
{ name: 'Movies', type: 'Movie' },
{ name: 'Series', type: 'Series' },
{ name: 'Albums', type: 'MusicAlbum' },
{ name: 'Games', type: 'Game' },
{ name: 'Books', type: 'Book' }
];
$('#childrenContent', page).html(html).trigger('create').createCardMenus();
if (item.Type == "BoxSet") {
var collectionItemTypes = [
{ name: 'Movies', type: 'Movie' },
{ name: 'Series', type: 'Series' },
{ name: 'Albums', type: 'MusicAlbum' },
{ name: 'Games', type: 'Game' },
{ name: 'Books', type: 'Book' }
];
renderCollectionItems(page, collectionItemTypes, result.Items, user, context);
}
renderCollectionItems(page, collectionItemTypes, result.Items, user, context);
}
});
@ -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 () {
var page = this;

View file

@ -601,8 +601,12 @@
cssClass += ' ' + LibraryBrowser.getUserDataCssClass(item.UserData.Key);
}
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;

View file

@ -723,6 +723,28 @@
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 () {
var page = this;
@ -762,6 +784,7 @@
toggleSelections(page);
});
$('.itemWithAction', this).on('click', onItemWithActionClick);
});
}).on('pagebeforeshow', ".libraryPage", function () {

View file

@ -76,7 +76,8 @@
title: item.Name,
showRemoveFromPlaylist: true,
smallIcon: true,
playFromHere: true
playFromHere: true,
defaultAction: 'playallfromhere'
});
}

View file

@ -61,7 +61,8 @@
html += LibraryBrowser.getListViewHtml({
items: result.Items,
smallIcon: true,
showIndex: true
showIndex: true,
defaultAction: 'play'
});
html += pagingHtml;