mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update translations
This commit is contained in:
parent
764a5ac824
commit
c2e474e8e9
105 changed files with 13294 additions and 12883 deletions
|
@ -47,6 +47,7 @@
|
|||
}
|
||||
|
||||
function enableScrollX() {
|
||||
|
||||
return $.browser.mobile && AppInfo.enableAppLayouts;
|
||||
}
|
||||
|
||||
|
@ -54,6 +55,10 @@
|
|||
return enableScrollX() ? 'overflowBackdrop' : 'backdrop';
|
||||
}
|
||||
|
||||
function getPortraitShape() {
|
||||
return enableScrollX() ? 'overflowPortrait' : 'portrait';
|
||||
}
|
||||
|
||||
function getLibraryButtonsHtml(items) {
|
||||
|
||||
var html = "";
|
||||
|
@ -175,7 +180,7 @@
|
|||
Limit: limit,
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
EnableImageTypes: "Primary,Backdrop,Thumb"
|
||||
};
|
||||
|
||||
return ApiClient.getJSON(ApiClient.getUrl('Users/' + user.Id + '/Items/Latest', options)).done(function (items) {
|
||||
|
@ -215,6 +220,93 @@
|
|||
});
|
||||
}
|
||||
|
||||
function loadLatestMovies(elem, user) {
|
||||
|
||||
var options = {
|
||||
|
||||
Limit: 12,
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Thumb",
|
||||
IncludeItemTypes: "Movie"
|
||||
};
|
||||
|
||||
return ApiClient.getJSON(ApiClient.getUrl('Users/' + user.Id + '/Items/Latest', options)).done(function (items) {
|
||||
|
||||
var html = '';
|
||||
|
||||
var scrollX = enableScrollX();
|
||||
|
||||
if (items.length) {
|
||||
html += '<h1 class="listHeader">' + Globalize.translate('HeaderLatestMovies') + '</h1>';
|
||||
if (scrollX) {
|
||||
html += '<div class="hiddenScrollX itemsContainer">';
|
||||
} else {
|
||||
html += '<div class="itemsContainer">';
|
||||
}
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: items,
|
||||
shape: getPortraitShape(),
|
||||
showUnplayedIndicator: false,
|
||||
showChildCountIndicator: true,
|
||||
lazy: true,
|
||||
context: 'home',
|
||||
centerText: true
|
||||
});
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
|
||||
$(elem).createCardMenus();
|
||||
});
|
||||
}
|
||||
|
||||
function loadLatestEpisodes(elem, user) {
|
||||
|
||||
var options = {
|
||||
|
||||
Limit: 12,
|
||||
Fields: "PrimaryImageAspectRatio,SyncInfo",
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Thumb",
|
||||
IncludeItemTypes: "Episode"
|
||||
};
|
||||
|
||||
return ApiClient.getJSON(ApiClient.getUrl('Users/' + user.Id + '/Items/Latest', options)).done(function (items) {
|
||||
|
||||
var html = '';
|
||||
|
||||
var scrollX = enableScrollX();
|
||||
|
||||
if (items.length) {
|
||||
html += '<h1 class="listHeader">' + Globalize.translate('HeaderLatestEpisodes') + '</h1>';
|
||||
if (scrollX) {
|
||||
html += '<div class="hiddenScrollX itemsContainer">';
|
||||
} else {
|
||||
html += '<div class="itemsContainer">';
|
||||
}
|
||||
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: items,
|
||||
preferThumb: true,
|
||||
shape: getThumbShape(),
|
||||
showUnplayedIndicator: false,
|
||||
showChildCountIndicator: true,
|
||||
lazy: true,
|
||||
context: 'home'
|
||||
});
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
elem.innerHTML = html;
|
||||
ImageLoader.lazyChildren(elem);
|
||||
|
||||
$(elem).createCardMenus();
|
||||
});
|
||||
}
|
||||
|
||||
function loadLatestChannelMedia(elem, userId) {
|
||||
|
||||
var screenWidth = $(window).width();
|
||||
|
@ -357,6 +449,50 @@
|
|||
});
|
||||
}
|
||||
|
||||
function loadNextUp(elem, userId) {
|
||||
|
||||
var query = {
|
||||
|
||||
Limit: 20,
|
||||
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated,SyncInfo",
|
||||
UserId: userId,
|
||||
ImageTypeLimit: 1,
|
||||
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
|
||||
};
|
||||
|
||||
ApiClient.getNextUpEpisodes(query).done(function (result) {
|
||||
|
||||
var html = '';
|
||||
|
||||
if (result.Items.length) {
|
||||
html += '<h1 class="listHeader">' + Globalize.translate('HeaderNextUp') + '</h1>';
|
||||
if (enableScrollX()) {
|
||||
html += '<div class="hiddenScrollX itemsContainer">';
|
||||
} else {
|
||||
html += '<div class="itemsContainer">';
|
||||
}
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
preferThumb: true,
|
||||
shape: getThumbShape(),
|
||||
overlayText: false,
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
lazy: true,
|
||||
overlayPlayButton: true,
|
||||
context: 'home',
|
||||
centerText: true
|
||||
});
|
||||
html += '</div>';
|
||||
}
|
||||
|
||||
elem.innerHTML = html;
|
||||
|
||||
ImageLoader.lazyChildren(elem);
|
||||
$(elem).createCardMenus();
|
||||
});
|
||||
}
|
||||
|
||||
function handleLibraryLinkNavigations(elem) {
|
||||
|
||||
$('a', elem).on('click', function () {
|
||||
|
@ -497,9 +633,12 @@
|
|||
loadLatestChannelMedia: loadLatestChannelMedia,
|
||||
loadLibraryTiles: loadLibraryTiles,
|
||||
loadResume: loadResume,
|
||||
loadNextUp: loadNextUp,
|
||||
loadLatestChannelItems: loadLatestChannelItems,
|
||||
loadLatestLiveTvRecordings: loadLatestLiveTvRecordings,
|
||||
loadlibraryButtons: loadlibraryButtons
|
||||
loadlibraryButtons: loadlibraryButtons,
|
||||
loadLatestMovies: loadLatestMovies,
|
||||
loadLatestEpisodes: loadLatestEpisodes
|
||||
};
|
||||
|
||||
})(jQuery, document);
|
Loading…
Add table
Add a link
Reference in a new issue