mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add udp error handling
This commit is contained in:
parent
d7846a5280
commit
fab42af1a5
4 changed files with 19 additions and 7 deletions
|
@ -127,6 +127,12 @@
|
||||||
|
|
||||||
select.innerHTML = html;
|
select.innerHTML = html;
|
||||||
select.value = userSettings.get('playlisteditor-lastplaylistid') || '';
|
select.value = userSettings.get('playlisteditor-lastplaylistid') || '';
|
||||||
|
|
||||||
|
// If the value is empty set it again, in case we tried to set a lastplaylistid that is no longer valid
|
||||||
|
if (!select.value) {
|
||||||
|
select.value = '';
|
||||||
|
}
|
||||||
|
|
||||||
triggerChange(select);
|
triggerChange(select);
|
||||||
|
|
||||||
loading.hide();
|
loading.hide();
|
||||||
|
|
|
@ -460,7 +460,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.MediaSources && item.MediaSources.length) {
|
if (item.MediaSources && item.MediaSources.length) {
|
||||||
renderMediaSources(page, item);
|
renderMediaSources(page, user, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
var chapters = item.Chapters || [];
|
var chapters = item.Chapters || [];
|
||||||
|
@ -1704,11 +1704,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderMediaSources(page, item) {
|
function renderMediaSources(page, user, item) {
|
||||||
|
|
||||||
var html = item.MediaSources.map(function (v) {
|
var html = item.MediaSources.map(function (v) {
|
||||||
|
|
||||||
return getMediaSourceHtml(item, v);
|
return getMediaSourceHtml(user, item, v);
|
||||||
|
|
||||||
}).join('<div style="border-top:1px solid #444;margin: 1em 0;"></div>');
|
}).join('<div style="border-top:1px solid #444;margin: 1em 0;"></div>');
|
||||||
|
|
||||||
|
@ -1720,7 +1720,7 @@
|
||||||
mediaInfoContent.innerHTML = html;
|
mediaInfoContent.innerHTML = html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMediaSourceHtml(item, version) {
|
function getMediaSourceHtml(user, item, version) {
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
|
@ -1848,7 +1848,7 @@
|
||||||
//html += '<div><span class="mediaInfoLabel">'+Globalize.translate('MediaInfoFormat')+'</span><span class="mediaInfoAttribute">' + version.Formats.join(',') + '</span></div>';
|
//html += '<div><span class="mediaInfoLabel">'+Globalize.translate('MediaInfoFormat')+'</span><span class="mediaInfoAttribute">' + version.Formats.join(',') + '</span></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version.Path && version.Protocol != 'Http') {
|
if (version.Path && version.Protocol != 'Http' && user && user.Policy.IsAdministrator) {
|
||||||
html += '<div style="max-width:600px;overflow:hidden;"><span class="mediaInfoLabel">' + Globalize.translate('MediaInfoPath') + '</span><span class="mediaInfoAttribute">' + version.Path + '</span></div>';
|
html += '<div style="max-width:600px;overflow:hidden;"><span class="mediaInfoLabel">' + Globalize.translate('MediaInfoPath') + '</span><span class="mediaInfoAttribute">' + version.Path + '</span></div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -434,13 +434,19 @@
|
||||||
|
|
||||||
var screenWidth = dom.getWindowSize().innerWidth;
|
var screenWidth = dom.getWindowSize().innerWidth;
|
||||||
|
|
||||||
|
var limit = screenWidth >= 1920 ? 8 : (screenWidth >= 1600 ? 8 : (screenWidth >= 1200 ? 9 : 6));
|
||||||
|
|
||||||
|
if (!enableScrollX()) {
|
||||||
|
limit = Math.min(limit, 5);
|
||||||
|
}
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
|
|
||||||
SortBy: "DatePlayed",
|
SortBy: "DatePlayed",
|
||||||
SortOrder: "Descending",
|
SortOrder: "Descending",
|
||||||
MediaTypes: "Video",
|
MediaTypes: "Video",
|
||||||
Filters: "IsResumable",
|
Filters: "IsResumable",
|
||||||
Limit: screenWidth >= 1920 ? 8 : (screenWidth >= 1600 ? 8 : (screenWidth >= 1200 ? 9 : 6)),
|
Limit: limit,
|
||||||
Recursive: true,
|
Recursive: true,
|
||||||
Fields: "PrimaryImageAspectRatio,BasicSyncInfo",
|
Fields: "PrimaryImageAspectRatio,BasicSyncInfo",
|
||||||
CollapseBoxSetItems: false,
|
CollapseBoxSetItems: false,
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
$('.collectionItems', page).empty();
|
$('.collectionItems', page).empty();
|
||||||
|
|
||||||
if (item.MediaSources && item.MediaSources.length) {
|
if (item.MediaSources && item.MediaSources.length) {
|
||||||
ItemDetailPage.renderMediaSources(page, item);
|
ItemDetailPage.renderMediaSources(page, null, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
var chapters = item.Chapters || [];
|
var chapters = item.Chapters || [];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue