mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
disable chunked encoding for images
This commit is contained in:
parent
433cee5164
commit
b23a0a14c1
14 changed files with 196 additions and 130 deletions
|
@ -47,6 +47,8 @@
|
|||
|
||||
var idInfo = profile.Identification || {};
|
||||
|
||||
renderIdentificationHeaders(page, idInfo.Headers || []);
|
||||
|
||||
$('#txtInfoFriendlyName', page).val(profile.FriendlyName || '');
|
||||
$('#txtInfoModelName', page).val(profile.ModelName || '');
|
||||
$('#txtInfoModelNumber', page).val(profile.ModelNumber || '');
|
||||
|
@ -97,6 +99,76 @@
|
|||
renderSubProfiles(page, profile);
|
||||
}
|
||||
|
||||
function renderIdentificationHeaders(page, headers) {
|
||||
|
||||
var index = 0;
|
||||
|
||||
var html = '<ul data-role="listview" data-inset="true" data-split-icon="delete">' + headers.map(function (h) {
|
||||
|
||||
var li = '<li>';
|
||||
|
||||
li += '<a href="#">';
|
||||
|
||||
li += '<div style="font-weight:normal;">' + h.Name + ': ' + (h.Value || '') + '</div>';
|
||||
li += '<div style="font-weight:normal;">' + (h.Match || '') + '</div>';
|
||||
|
||||
li += '</a>';
|
||||
|
||||
li += '<a class="btnDeleteIdentificationHeader" href="#" data-index="' + index + '"></a>';
|
||||
|
||||
li += '</li>';
|
||||
|
||||
index++;
|
||||
|
||||
return li;
|
||||
|
||||
}).join('') + '</ul>';
|
||||
|
||||
var elem = $('.httpHeaderIdentificationList', page).html(html).trigger('create');
|
||||
|
||||
$('.btnDeleteIdentificationHeader', elem).on('click', function () {
|
||||
|
||||
var itemIndex = parseInt(this.getAttribute('data-index'));
|
||||
|
||||
currentProfile.Identification.Headers.splice(itemIndex, 1);
|
||||
|
||||
renderIdentificationHeaders(page, currentProfile.Identification.Headers);
|
||||
});
|
||||
}
|
||||
|
||||
function editIdentificationHeader(page, header) {
|
||||
|
||||
isSubProfileNew = header == null;
|
||||
header = header || {};
|
||||
currentSubProfile = header;
|
||||
|
||||
var popup = $('#identificationHeaderPopup', page);
|
||||
|
||||
$('#txtIdentificationHeaderName', popup).val(header.Name || '');
|
||||
$('#txtIdentificationHeaderValue', popup).val(header.Value || '');
|
||||
$('#selectMatchType', popup).val(header.Match || 'Equals').selectmenu('refresh');
|
||||
|
||||
popup.popup('open');
|
||||
}
|
||||
|
||||
function saveIdentificationHeader(page) {
|
||||
|
||||
currentSubProfile.Name = $('#txtIdentificationHeaderName', page).val();
|
||||
currentSubProfile.Value = $('#txtIdentificationHeaderValue', page).val();
|
||||
currentSubProfile.Match = $('#selectMatchType', page).val();
|
||||
|
||||
if (isSubProfileNew) {
|
||||
|
||||
currentProfile.Identification.Headers.push(currentSubProfile);
|
||||
}
|
||||
|
||||
renderIdentificationHeaders(page, currentProfile.Identification.Headers);
|
||||
|
||||
currentSubProfile = null;
|
||||
|
||||
$('#identificationHeaderPopup', page).popup('close');
|
||||
}
|
||||
|
||||
function renderSubProfiles(page, profile) {
|
||||
|
||||
renderDirectPlayProfiles(page, profile.DirectPlayProfiles);
|
||||
|
@ -816,6 +888,11 @@
|
|||
|
||||
});
|
||||
|
||||
$('.btnAddIdentificationHttpHeader', page).on('click', function () {
|
||||
|
||||
editIdentificationHeader(page);
|
||||
});
|
||||
|
||||
}).on('pageshow', "#dlnaProfilePage", function () {
|
||||
|
||||
var page = this;
|
||||
|
@ -890,6 +967,16 @@
|
|||
|
||||
saveResponseProfile(page);
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
onIdentificationHeaderFormSubmit: function() {
|
||||
|
||||
var form = this;
|
||||
var page = $(form).parents('.page');
|
||||
|
||||
saveIdentificationHeader(page);
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
|
||||
var options = {
|
||||
|
||||
Limit: screenWidth >= 2400 ? 24 : (screenWidth >= 1920 ? 20 : (screenWidth >= 1440 ? 12 : (screenWidth >= 800 ? 9 : 8))),
|
||||
Limit: screenWidth >= 2400 ? 24 : (screenWidth >= 1600 ? 20 : (screenWidth >= 1440 ? 12 : (screenWidth >= 800 ? 9 : 8))),
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
IsPlayed: false,
|
||||
IsFolder: false
|
||||
|
@ -164,7 +164,7 @@
|
|||
|
||||
var options = {
|
||||
|
||||
Limit: screenWidth >= 2400 ? 10 : (screenWidth >= 1920 ? 10 : (screenWidth >= 1440 ? 8 : (screenWidth >= 800 ? 7 : 6))),
|
||||
Limit: screenWidth >= 2400 ? 10 : (screenWidth >= 1600 ? 10 : (screenWidth >= 1440 ? 8 : (screenWidth >= 800 ? 7 : 6))),
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Filters: "IsUnplayed",
|
||||
UserId: userId
|
||||
|
@ -279,7 +279,7 @@
|
|||
SortOrder: "Descending",
|
||||
MediaTypes: "Video",
|
||||
Filters: "IsResumable",
|
||||
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1200 ? 9 : 6),
|
||||
Limit: screenWidth >= 1600 ? 8 : (screenWidth >= 1200 ? 9 : 6),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
CollapseBoxSetItems: false,
|
||||
|
@ -356,7 +356,7 @@
|
|||
|
||||
var options = {
|
||||
|
||||
Limit: screenWidth >= 1920 ? 5 : (screenWidth >= 1440 ? 5 : (screenWidth >= 800 ? 6 : 6)),
|
||||
Limit: screenWidth >= 1600 ? 5 : (screenWidth >= 1440 ? 5 : (screenWidth >= 800 ? 6 : 6)),
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
Filters: "IsUnplayed",
|
||||
UserId: Dashboard.getCurrentUserId(),
|
||||
|
|
|
@ -1185,11 +1185,6 @@
|
|||
$("#pause", videoElement).hide().removeClass("fadeOut");
|
||||
}, 300);
|
||||
|
||||
// Pause stop timer
|
||||
self.pauseStop = setTimeout(function () {
|
||||
self.stop();
|
||||
}, 5 * 60 * 1000); // 5 minutes
|
||||
|
||||
}).on("playing.mediaplayerevent", function (e) {
|
||||
|
||||
$('#video-playButton', videoControls).hide();
|
||||
|
@ -1199,9 +1194,6 @@
|
|||
$("#play", videoElement).hide().removeClass("fadeOut");
|
||||
}, 300);
|
||||
|
||||
// Remove pause setop timer
|
||||
self.clearPauseStop();
|
||||
|
||||
}).on("timeupdate.mediaplayerevent", function () {
|
||||
|
||||
if (!isPositionSliderActive) {
|
||||
|
@ -1248,7 +1240,7 @@
|
|||
|
||||
unbindEventsForPlayback();
|
||||
|
||||
}).on('ended.playnext', self.playNextAfterEnded);
|
||||
}).one('ended.playnext', self.playNextAfterEnded);
|
||||
|
||||
bindEventsForPlayback();
|
||||
|
||||
|
|
|
@ -53,19 +53,8 @@
|
|||
return playerTime;
|
||||
};
|
||||
|
||||
self.clearPauseStop = function () {
|
||||
|
||||
if (self.pauseStop) {
|
||||
console.log('clearing pause stop timer');
|
||||
window.clearTimeout(self.pauseStop);
|
||||
self.pauseStop = null;
|
||||
}
|
||||
};
|
||||
|
||||
self.playNextAfterEnded = function () {
|
||||
|
||||
$(this).off('ended.playnext');
|
||||
|
||||
self.nextTrack();
|
||||
};
|
||||
|
||||
|
@ -177,7 +166,7 @@
|
|||
|
||||
self.updateCanClientSeek(this);
|
||||
|
||||
$(this).on('ended.playbackstopped', self.onPlaybackStopped).on('ended.playnext', self.playNextAfterEnded);
|
||||
$(this).on('ended.playbackstopped', self.onPlaybackStopped).one('ended.playnext', self.playNextAfterEnded);
|
||||
|
||||
self.startProgressInterval();
|
||||
sendProgressUpdate();
|
||||
|
@ -595,6 +584,7 @@
|
|||
var newItem = self.playlist[newIndex];
|
||||
|
||||
if (newItem) {
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
||||
self.playInternal(newItem, 0, user);
|
||||
|
@ -899,6 +889,7 @@
|
|||
$(this).remove();
|
||||
}
|
||||
|
||||
elem.src = null;
|
||||
elem.src = "";
|
||||
self.currentMediaElement = null;
|
||||
self.currentItem = null;
|
||||
|
@ -1077,8 +1068,6 @@
|
|||
|
||||
$('body').removeClass('bodyWithPopupOpen');
|
||||
|
||||
self.clearPauseStop();
|
||||
|
||||
var playerElement = this;
|
||||
|
||||
$(playerElement).off('.mediaplayerevent').off('ended.playbackstopped');
|
||||
|
@ -1256,7 +1245,7 @@
|
|||
|
||||
self.setCurrentTime(self.getCurrentTicks(this));
|
||||
|
||||
}).on("ended.playbackstopped", self.onPlaybackStopped).on('ended.playnext', self.playNextAfterEnded)[0];
|
||||
}).on("ended.playbackstopped", self.onPlaybackStopped).one('ended.playnext', self.playNextAfterEnded)[0];
|
||||
};
|
||||
|
||||
function canPlayAudioStreamDirect(audioStream) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
var options = {
|
||||
|
||||
IncludeItemTypes: "Movie",
|
||||
Limit: screenWidth >= 1920 ? 28 : (screenWidth >= 1440 ? 30 : (screenWidth >= 800 ? 28 : 18)),
|
||||
Limit: screenWidth >= 1600 ? 28 : (screenWidth >= 1440 ? 30 : (screenWidth >= 800 ? 28 : 18)),
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
ParentId: parentId,
|
||||
IsPlayed: false
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Movie",
|
||||
Filters: "IsResumable",
|
||||
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1200 ? 6 : 3),
|
||||
Limit: screenWidth >= 1600 ? 8 : (screenWidth >= 1200 ? 6 : 3),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
CollapseBoxSetItems: false,
|
||||
|
@ -81,7 +81,7 @@
|
|||
|
||||
userId: Dashboard.getCurrentUserId(),
|
||||
categoryLimit: screenWidth >= 1200 ? 4 : 3,
|
||||
ItemLimit: screenWidth >= 1920 ? 7 : (screenWidth >= 1200 ? 6 : 5),
|
||||
ItemLimit: screenWidth >= 1600 ? 7 : (screenWidth >= 1200 ? 6 : 5),
|
||||
Fields: "PrimaryImageAspectRatio"
|
||||
});
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
var options = {
|
||||
IncludeItemTypes: "Audio",
|
||||
Limit: screenWidth >= 1920 ? 18 : (screenWidth >= 1200 ? 10 : 12),
|
||||
Limit: screenWidth >= 1600 ? 18 : (screenWidth >= 1200 ? 10 : 12),
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
ParentId: parentId
|
||||
};
|
||||
|
@ -34,7 +34,7 @@
|
|||
SortBy: "DatePlayed",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Audio",
|
||||
Limit: screenWidth >= 1920 ? 6 : (screenWidth >= 1200 ? 5 : 6),
|
||||
Limit: screenWidth >= 1600 ? 6 : (screenWidth >= 1200 ? 5 : 6),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,AudioInfo",
|
||||
Filters: "IsPlayed",
|
||||
|
@ -64,7 +64,7 @@
|
|||
SortBy: "PlayCount",
|
||||
SortOrder: "Descending",
|
||||
IncludeItemTypes: "Audio",
|
||||
Limit: screenWidth >= 1920 ? 12 : (screenWidth >= 1200 ? 10 : 12),
|
||||
Limit: screenWidth >= 1600 ? 12 : (screenWidth >= 1200 ? 10 : 12),
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,AudioInfo",
|
||||
Filters: "IsPlayed",
|
||||
|
|
|
@ -33,35 +33,30 @@
|
|||
|
||||
self.showNotificationsFlyout = function () {
|
||||
|
||||
var context = this;
|
||||
var html = '<div data-role="panel" data-position="right" data-display="overlay" class="notificationsFlyout" data-position-fixed="true" data-theme="a">';
|
||||
|
||||
var html = '<div data-role="popup" class="notificationsFlyout" style="min-width:250px;margin-top:30px;margin-right:20px;" data-theme="a">';
|
||||
html += '<h1 style="margin: .25em 0;">';
|
||||
html += '<span style="vertical-align:middle;">' + Globalize.translate('HeaderNotifications') + '</span>';
|
||||
html += '<a data-role="button" data-inline="true" data-icon="arrow-r" href="notificationlist.html" data-iconpos="notext" style="vertical-align:middle;margin-left:.5em;">' + Globalize.translate('ButtonViewNotifications') + '</a>';
|
||||
html += '</h1>';
|
||||
|
||||
html += '<a href="#" data-rel="back" data-role="button" data-theme="b" data-icon="delete" data-iconpos="notext" class="ui-btn-right">' + Globalize.translate('ButtonClose') + '</a>';
|
||||
html += '<div>';
|
||||
|
||||
html += '<div class="notificationsFlyoutlist">Loading...';
|
||||
|
||||
html += '<div class="ui-bar-a" style="text-align:center;">';
|
||||
html += '<h3 style="margin: .5em 0;">Notifications</h3>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<div style="padding: 0;">';
|
||||
|
||||
html += '<p class="notificationsFlyoutlist">Loading...';
|
||||
|
||||
html += '</p>';
|
||||
|
||||
html += '<div class="btnNotificationListContainer"><a data-role="button" href="notificationlist.html" data-icon="action" data-mini="true">' + Globalize.translate('ButtonViewNotifications') + '</a></div>';
|
||||
html += '<div style="display:none;" class="btnMarkReadContainer"><button class="btnMarkRead" type="button" data-icon="check" data-mini="true">' + Globalize.translate('ButtonMarkTheseRead') + '</button></div>';
|
||||
|
||||
|
||||
html += '</div>';
|
||||
|
||||
html += '</div>';
|
||||
|
||||
$(document.body).append(html);
|
||||
|
||||
$('.notificationsFlyout').popup({ positionTo: context }).trigger('create').popup("open").on("popupafterclose", function () {
|
||||
$('.notificationsFlyout').panel({}).panel('option', 'classes.modalOpen', 'notificationsPanelModelOpen ui-panel-dismiss-open').trigger('create').panel("open").on("panelclose", function () {
|
||||
|
||||
$(this).off("popupafterclose").remove();
|
||||
$(this).off("panelclose").remove();
|
||||
|
||||
}).on('click', '.btnMarkRead', function () {
|
||||
|
||||
|
@ -73,7 +68,7 @@
|
|||
|
||||
self.markNotificationsRead(ids, function () {
|
||||
|
||||
$('.notificationsFlyout').popup("close");
|
||||
$('.notificationsFlyout').panel("close");
|
||||
|
||||
});
|
||||
|
||||
|
@ -175,7 +170,7 @@
|
|||
|
||||
html += '<p style="margin: .4em 0 .25em;" class="notificationName">' + notification.Name + '</p>';
|
||||
|
||||
html += '<p style="margin: .25em 0;">' + humane_date(notification.Date) + '</p>';
|
||||
html += '<p class="notificationTime" style="margin: .25em 0;">' + humane_date(notification.Date) + '</p>';
|
||||
|
||||
if (notification.Description) {
|
||||
html += '<p style="margin: .25em 0;">' + notification.Description + '</p>';
|
||||
|
|
|
@ -494,7 +494,7 @@ var Dashboard = {
|
|||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
||||
var html = '<div data-role="panel" data-position="right" data-display="overlay" id="userFlyout" data-position-fixed="true" data-theme="b">';
|
||||
var html = '<div data-role="panel" data-position="right" data-display="overlay" id="userFlyout" data-position-fixed="true" data-theme="a">';
|
||||
|
||||
html += '<h3>';
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
var options = {
|
||||
|
||||
IncludeItemTypes: "Episode",
|
||||
Limit: screenWidth >= 1920 ? 24 : (screenWidth >= 1440 ? 16 : 15),
|
||||
Limit: screenWidth >= 1600 ? 24 : (screenWidth >= 1440 ? 16 : 15),
|
||||
Fields: "PrimaryImageAspectRatio",
|
||||
ParentId: parentId,
|
||||
IsPlayed: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue