mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update xml parsing
This commit is contained in:
parent
c22321c3f9
commit
7ce49ea1e8
9 changed files with 88 additions and 78 deletions
|
@ -14,12 +14,12 @@
|
|||
},
|
||||
"devDependencies": {},
|
||||
"ignore": [],
|
||||
"version": "1.4.363",
|
||||
"_release": "1.4.363",
|
||||
"version": "1.4.365",
|
||||
"_release": "1.4.365",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "1.4.363",
|
||||
"commit": "391923397ea7ea23890ced20153fc896e8892f31"
|
||||
"tag": "1.4.365",
|
||||
"commit": "a946b2cfd0bc2fd99121a18cc236f1ce02ad5cf8"
|
||||
},
|
||||
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
|
||||
"_target": "^1.2.1",
|
||||
|
|
|
@ -252,21 +252,20 @@
|
|||
var rotationInterval;
|
||||
var currentRotatingImages = [];
|
||||
var currentRotationIndex = -1;
|
||||
function setBackdrops(items, imageSetId) {
|
||||
function setBackdrops(items, enableRotation) {
|
||||
|
||||
var images = getImageUrls(items);
|
||||
|
||||
imageSetId = imageSetId || new Date().getTime();
|
||||
if (images.length) {
|
||||
|
||||
startRotation(images, imageSetId);
|
||||
startRotation(images, enableRotation);
|
||||
|
||||
} else {
|
||||
clearBackdrop();
|
||||
}
|
||||
}
|
||||
|
||||
function startRotation(images) {
|
||||
function startRotation(images, enableImageRotation) {
|
||||
|
||||
if (arraysEqual(images, currentRotatingImages)) {
|
||||
return;
|
||||
|
@ -277,7 +276,7 @@
|
|||
currentRotatingImages = images;
|
||||
currentRotationIndex = -1;
|
||||
|
||||
if (images.length > 1 && enableRotation()) {
|
||||
if (images.length > 1 && enableRotation() && enableImageRotation !== false) {
|
||||
rotationInterval = setInterval(onRotationInterval, 20000);
|
||||
}
|
||||
onRotationInterval();
|
||||
|
|
|
@ -50,13 +50,13 @@
|
|||
.fab {
|
||||
display: inline-flex;
|
||||
border-radius: 50%;
|
||||
background-color: #444;
|
||||
background-color: rgb(170,170, 170);
|
||||
padding: .6em;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
color: #222;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,8 +14,9 @@ define(['playbackManager', 'userSettings'], function (playbackManager, userSetti
|
|||
return;
|
||||
}
|
||||
|
||||
if (enabled(items[0].MediaType)) {
|
||||
currentThemeIds = items.map(function (i) {
|
||||
currentThemeIds = items.filter(function (i) {
|
||||
return enabled(i.MediaType);
|
||||
}).map(function (i) {
|
||||
return i.Id;
|
||||
});
|
||||
|
||||
|
@ -26,7 +27,6 @@ define(['playbackManager', 'userSettings'], function (playbackManager, userSetti
|
|||
}).then(function () {
|
||||
currentOwnerId = ownerId;
|
||||
});
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
.btnUserData {
|
||||
color: #aaa;
|
||||
}
|
||||
|
||||
.btnUserDataOn {
|
||||
color: #cc3333 !important;
|
||||
}
|
|
@ -196,7 +196,7 @@
|
|||
|
||||
.itemTag {
|
||||
display: inline-block;
|
||||
background-color: #181818;
|
||||
background-color: #333;
|
||||
border-radius: 4px;
|
||||
padding: 5px 7px;
|
||||
margin: 0 5px 5px 0;
|
||||
|
@ -257,9 +257,7 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
}
|
||||
|
||||
.noBackdrop {
|
||||
height: 170px;
|
||||
background: #181818;
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.withBackdrop + .mainDrawerPanel .noBackdrop {
|
||||
|
@ -460,8 +458,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
}
|
||||
|
||||
.mainDetailButtons button, .recordingFields button {
|
||||
background: rgba(170,170, 170, 1);
|
||||
color: #222;
|
||||
margin-left: 0;
|
||||
margin-right: .5em;
|
||||
}
|
||||
|
@ -538,10 +534,6 @@ span.itemCommunityRating:not(:empty) + .userDataIcons {
|
|||
.editorMenuLink {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.noBackdrop {
|
||||
height: 80px;
|
||||
}
|
||||
}
|
||||
|
||||
.itemMiscInfo {
|
||||
|
|
|
@ -74,7 +74,8 @@
|
|||
queueAllFromHere: false,
|
||||
positionTo: button,
|
||||
cancelTimer: false,
|
||||
record: false
|
||||
record: false,
|
||||
editImages: false
|
||||
};
|
||||
|
||||
if (appHost.supports('sync')) {
|
||||
|
@ -114,10 +115,7 @@
|
|||
setInitialCollapsibleState(page, item, context, user);
|
||||
renderDetails(page, item, context);
|
||||
|
||||
var itemBackdropElement = page.querySelector('#itemBackdrop');
|
||||
itemBackdropElement.classList.add('noBackdrop');
|
||||
itemBackdropElement.style.backgroundImage = 'none';
|
||||
backdrop.setBackdrops([item]);
|
||||
backdrop.setBackdrops([item], false);
|
||||
|
||||
LibraryBrowser.renderDetailPageBackdrop(page, item, imageLoader);
|
||||
|
||||
|
@ -433,7 +431,7 @@
|
|||
page.querySelector('#childrenCollapsible').classList.remove('hide');
|
||||
renderItemsByName(page, item, user);
|
||||
}
|
||||
else if (item.IsFolder) {
|
||||
else if (item.IsFolder || item.Type == 'Episode') {
|
||||
|
||||
if (item.Type == "BoxSet") {
|
||||
page.querySelector('#childrenCollapsible').classList.add('hide');
|
||||
|
@ -462,14 +460,7 @@
|
|||
renderMediaSources(page, user, item);
|
||||
}
|
||||
|
||||
var chapters = item.Chapters || [];
|
||||
|
||||
if (!chapters.length) {
|
||||
page.querySelector('#scenesCollapsible').classList.add('hide');
|
||||
} else {
|
||||
page.querySelector('#scenesCollapsible').classList.remove('hide');
|
||||
renderScenes(page, item, user, 3);
|
||||
}
|
||||
renderScenes(page, item);
|
||||
|
||||
if (!item.SpecialFeatureCount || item.SpecialFeatureCount == 0 || item.Type == "Series") {
|
||||
page.querySelector('#specialsCollapsible').classList.add('hide');
|
||||
|
@ -602,7 +593,7 @@
|
|||
|
||||
var dateAddedElement = page.querySelector('#dateAdded');
|
||||
|
||||
if (!item.IsFolder) {
|
||||
if (!item.IsFolder && item.Type !== 'Program' && item.Type !== 'TvChannel' && item.Type !== 'Trailer') {
|
||||
dateAddedElement.classList.remove('hide');
|
||||
dateAddedElement.innerHTML = globalize.translate('DateAddedValue', datetime.toLocaleDateString(datetime.parseISO8601Date(item.DateCreated)));
|
||||
} else {
|
||||
|
@ -933,7 +924,6 @@
|
|||
if (item.Tags && item.Tags.length) {
|
||||
|
||||
var html = '';
|
||||
html += '<p>' + globalize.translate('HeaderTags') + '</p>';
|
||||
for (var i = 0, length = item.Tags.length; i < length; i++) {
|
||||
|
||||
html += '<div class="itemTag">' + item.Tags[i] + '</div>';
|
||||
|
@ -1025,6 +1015,23 @@
|
|||
Fields: fields
|
||||
});
|
||||
}
|
||||
else if (item.Type == "Episode" && item.SeriesId && item.SeasonId) {
|
||||
|
||||
// Use dedicated episodes endpoint
|
||||
promise = ApiClient.getEpisodes(item.SeriesId, {
|
||||
|
||||
seasonId: item.SeasonId,
|
||||
userId: userId,
|
||||
Fields: fields
|
||||
});
|
||||
|
||||
_childrenItemsFunction = getEpisodesFunction(item.SeriesId, {
|
||||
|
||||
seasonId: item.SeasonId,
|
||||
userId: userId,
|
||||
Fields: fields
|
||||
});
|
||||
}
|
||||
else if (item.Type == "MusicAlbum") {
|
||||
|
||||
_childrenItemsFunction = getAlbumSongsFunction(query);
|
||||
|
@ -1068,7 +1075,7 @@
|
|||
allowBottomPadding: !scrollX
|
||||
});
|
||||
}
|
||||
else if (item.Type == "Season") {
|
||||
else if (item.Type == "Season" || item.Type == "Episode") {
|
||||
|
||||
html = cardBuilder.getCardsHtml({
|
||||
items: result.Items,
|
||||
|
@ -1130,6 +1137,9 @@
|
|||
if (item.Type == "Season") {
|
||||
page.querySelector('#childrenTitle').innerHTML = globalize.translate('HeaderEpisodes');
|
||||
}
|
||||
else if (item.Type == "Episode") {
|
||||
page.querySelector('#childrenTitle').innerHTML = item.SeriesName + ' - ' + item.SeasonName;
|
||||
}
|
||||
else if (item.Type == "Series") {
|
||||
page.querySelector('#childrenTitle').innerHTML = globalize.translate('HeaderSeasons');
|
||||
}
|
||||
|
@ -1428,6 +1438,12 @@
|
|||
|
||||
for (var i = 0, length = userDataIcons.length; i < length; i++) {
|
||||
|
||||
if (item.Type == 'Program') {
|
||||
userDataIcons[i].classList.add('hide');
|
||||
} else {
|
||||
userDataIcons[i].classList.remove('hide');
|
||||
}
|
||||
|
||||
userdataButtons.fill({
|
||||
item: item,
|
||||
style: 'fab-mini',
|
||||
|
@ -1629,9 +1645,20 @@
|
|||
});
|
||||
}
|
||||
|
||||
function renderScenes(page, item, user) {
|
||||
function renderScenes(page, item) {
|
||||
|
||||
var chapters = item.Chapters || [];
|
||||
|
||||
// If there are no chapter images, don't show a bunch of empty tiles
|
||||
if (chapters.length && !chapters[0].ImageTag) {
|
||||
chapters = [];
|
||||
}
|
||||
|
||||
if (!chapters.length) {
|
||||
page.querySelector('#scenesCollapsible').classList.add('hide');
|
||||
} else {
|
||||
page.querySelector('#scenesCollapsible').classList.remove('hide');
|
||||
|
||||
var scenesContent = page.querySelector('#scenesContent');
|
||||
|
||||
if (enableScrollX()) {
|
||||
|
@ -1651,6 +1678,7 @@
|
|||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function renderMediaSources(page, user, item) {
|
||||
|
||||
|
|
|
@ -493,7 +493,7 @@
|
|||
|
||||
} else if (item.Album) {
|
||||
html.push(item.Album);
|
||||
} else if (item.Type == 'Program' && item.EpisodeTitle) {
|
||||
} else if (item.Type == 'Program' && item.IsSeries) {
|
||||
html.push(item.Name);
|
||||
}
|
||||
|
||||
|
|
15
dashboard-ui/thirdparty/paper-button-style.css
vendored
15
dashboard-ui/thirdparty/paper-button-style.css
vendored
|
@ -1,6 +1,6 @@
|
|||
.raised {
|
||||
background: #404040;
|
||||
color: #fff;
|
||||
.ui-body-b .raised {
|
||||
background: rgba(170,170, 170, 1);
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.ui-body-a .raised {
|
||||
|
@ -19,17 +19,12 @@
|
|||
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.button-submit {
|
||||
.ui-body-b .button-submit {
|
||||
background: #52B54B;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ui-body-a .button-accent {
|
||||
background: #52B54B;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.button-accent {
|
||||
.ui-body-a .button-accent, .ui-body-b .button-accent {
|
||||
background: #52B54B;
|
||||
color: #fff;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue