1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

limit number of people in dlna responses

This commit is contained in:
Luke Pulverenti 2016-10-18 14:23:41 -04:00
parent 11615f4399
commit 46d25396c6
8 changed files with 191 additions and 53 deletions

View file

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.320",
"_release": "1.4.320",
"version": "1.4.321",
"_release": "1.4.321",
"_resolution": {
"type": "version",
"tag": "1.4.320",
"commit": "5b3dc54cf24d4f615a59e5954726231e446cfced"
"tag": "1.4.321",
"commit": "fb270e69c8391f62e762ee03d77a7b8a495c5a6f"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",

View file

@ -51,15 +51,21 @@
return;
}
setTimeout(function () {
var onAnimationComplete = function () {
dom.removeEventListener(backdropImage, 'animationend', onAnimationComplete, {
once: true
});
if (backdropImage === currentAnimatingElement) {
currentAnimatingElement = null;
}
if (existingBackdropImage && existingBackdropImage.parentNode) {
existingBackdropImage.parentNode.removeChild(existingBackdropImage);
}
}, 800);
};
dom.addEventListener(backdropImage, 'animationend', onAnimationComplete, {
once: true
});
internalBackdrop(true);
};

View file

@ -3,6 +3,24 @@
var globalOnOpenCallback;
function enableAnimation() {
if (browser.animate) {
return true;
}
if (browser.edge) {
return true;
}
// An indication of an older browser
if (browser.noFlex) {
return false;
}
return true;
}
function removeCenterFocus(dlg) {
if (layoutManager.tv) {
@ -136,10 +154,9 @@
backdropParent.parentNode.insertBefore(backdrop, backdropParent);
dlg.backdrop = backdrop;
// Doing this immediately causes the opacity to jump immediately without animating
setTimeout(function () {
// trigger reflow or the backdrop will not animate
void backdrop.offsetWidth;
backdrop.classList.add('dialogBackdropOpened');
}, 0);
dom.addEventListener((dlg.dialogContainer || backdrop), 'click', function (e) {
if (e.target === dlg.dialogContainer) {
@ -226,11 +243,28 @@
}
};
setTimeout(onAnimationFinish, dlg.animationConfig.entry.timing.duration);
if (enableAnimation()) {
var onFinish = function () {
dom.removeEventListener(dlg, 'animationend', onFinish, {
once: true
});
onAnimationFinish();
};
dom.addEventListener(dlg, 'animationend', onFinish, {
once: true
});
return;
}
onAnimationFinish();
}
function animateDialogClose(dlg, onAnimationFinish) {
if (enableAnimation()) {
var animated = true;
switch (dlg.animationConfig.exit.name) {
case 'fadeout':
@ -243,10 +277,25 @@
dlg.style.animation = 'slidedown ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both';
break;
default:
animated = false;
break;
}
var onFinish = function () {
dom.removeEventListener(dlg, 'animationend', onFinish, {
once: true
});
onAnimationFinish();
};
dom.addEventListener(dlg, 'animationend', onFinish, {
once: true
});
setTimeout(onAnimationFinish, dlg.animationConfig.exit.timing.duration);
if (animated) {
return;
}
}
onAnimationFinish();
}
function shouldLockDocumentScroll(options) {
@ -270,15 +319,26 @@
var backdrop = dlg.backdrop;
if (backdrop) {
if (!backdrop) {
return;
}
dlg.backdrop = null;
var onAnimationFinish = function () {
backdrop.parentNode.removeChild(backdrop);
};
if (enableAnimation()) {
backdrop.classList.remove('dialogBackdropOpened');
setTimeout(function () {
backdrop.parentNode.removeChild(backdrop);
}, 300);
// this is not firing animatonend
setTimeout(onAnimationFinish, 300);
return;
}
onAnimationFinish();
}
function centerFocus(elem, horiz, on) {
@ -375,6 +435,7 @@
dlg.classList.add('dialog-' + options.size);
}
if (enableAnimation()) {
switch (dlg.animationConfig.entry.name) {
case 'fadein':
@ -389,6 +450,7 @@
default:
break;
}
}
return dlg;
}

View file

@ -151,7 +151,7 @@
console.log('validateFeature: ' + feature);
return iapManager.isUnlockedByDefault(feature).then(function () {
return iapManager.isUnlockedByDefault(feature, options).then(function () {
return showPeriodicMessageIfNeeded(feature);

View file

@ -1,4 +1,4 @@
define(['browser', 'css!./viewcontainer-lite'], function (browser) {
define(['browser', 'dom', 'css!./viewcontainer-lite'], function (browser, dom) {
'use strict';
var mainAnimatedPages = document.querySelector('.mainAnimatedPages');
@ -140,7 +140,16 @@ define(['browser', 'css!./viewcontainer-lite'], function (browser) {
currentAnimations = animations;
setTimeout(resolve, duration);
var onAnimationComplete = function () {
dom.removeEventListener(newAnimatedPage, 'animationend', onAnimationComplete, {
once: true
});
resolve();
};
dom.addEventListener(newAnimatedPage, 'animationend', onAnimationComplete, {
once: true
});
});
}
@ -161,7 +170,16 @@ define(['browser', 'css!./viewcontainer-lite'], function (browser) {
currentAnimations = animations;
setTimeout(resolve, duration);
var onAnimationComplete = function () {
dom.removeEventListener(newAnimatedPage, 'animationend', onAnimationComplete, {
once: true
});
resolve();
};
dom.addEventListener(newAnimatedPage, 'animationend', onAnimationComplete, {
once: true
});
});
}

View file

@ -107,6 +107,12 @@
<div id="castContent" is="emby-itemscontainer" class="itemsContainer"></div>
<button is="emby-button" type="button" class="raised more morePeople hide">${ButtonMore}</button>
</div>
<div id="seriesScheduleSection" class="detailSection hide">
<h1>
${HeaderUpcomingOnTV}
</h1>
<div id="seriesScheduleList" is="emby-itemscontainer" class="itemsContainer vertical-list"></div>
</div>
<div class="detailSection photoInfo hide">
<h1>

View file

@ -446,6 +446,11 @@
page.querySelector('#childrenCollapsible').classList.add('hide');
}
if (item.Type == 'Series') {
renderSeriesSchedule(page, item, user);
}
if (item.Type == 'Series') {
renderNextUp(page, item, user);
@ -934,20 +939,21 @@
}
var supportsImageAnalysis = appHost.supports('imageanalysis');
var cardLayout = supportsImageAnalysis && (item.Type == "MusicAlbum" || item.Type == "Game" || item.Type == "MusicArtist");
html += cardBuilder.getCardsHtml({
items: result.Items,
shape: shape,
showParentTitle: item.Type == "MusicAlbum",
centerText: !supportsImageAnalysis,
centerText: !cardLayout,
showTitle: item.Type == "MusicAlbum" || item.Type == "Game" || item.Type == "MusicArtist",
context: context,
lazy: true,
showDetailsMenu: true,
coverImage: item.Type == "MusicAlbum" || item.Type == "MusicArtist",
overlayPlayButton: true,
cardLayout: supportsImageAnalysis && (item.Type == "MusicAlbum" || item.Type == "Game" || item.Type == "MusicArtist"),
vibrant: supportsImageAnalysis
cardLayout: cardLayout,
vibrant: cardLayout && supportsImageAnalysis
});
html += '</div>';
@ -1242,10 +1248,49 @@
function renderChannelGuide(page, item, user) {
require('scripts/livetvcomponents,scripts/livetvchannel,livetvcss'.split(','), function () {
require('scripts/livetvchannel,scripts/livetvcomponents,livetvcss'.split(','), function (liveTvChannelPage) {
liveTvChannelPage.renderPrograms(page, item.Id);
});
}
LiveTvChannelPage.renderPrograms(page, item.Id);
function renderSeriesSchedule(page, item, user) {
return;
ApiClient.getLiveTvPrograms({
UserId: Dashboard.getCurrentUserId(),
HasAired: false,
SortBy: "StartDate",
EnableTotalRecordCount: false,
EnableImages: false,
ImageTypeLimit: 0,
Limit: 50,
EnableUserData: false,
LibrarySeriesId: item.Id
}).then(function (result) {
if (result.Items.length) {
page.querySelector('#seriesScheduleSection').classList.remove('hide');
} else {
page.querySelector('#seriesScheduleSection').classList.add('hide');
}
page.querySelector('#seriesScheduleList').innerHTML = listView.getListViewHtml({
items: result.Items,
enableUserDataButtons: false,
showParentTitle: false,
image: false,
showProgramDateTime: true,
mediaInfo: false,
showTitle: true,
moreButton: false,
action: 'programdialog'
});
Dashboard.hideLoadingMsg();
});
}

View file

@ -55,7 +55,8 @@
SortBy: "StartDate",
EnableTotalRecordCount: false,
EnableImages: false,
ImageTypeLimit: 0
ImageTypeLimit: 0,
EnableUserData: false
}).then(function (result) {
@ -64,7 +65,7 @@
});
}
window.LiveTvChannelPage = {
return {
renderPrograms: loadPrograms
};