mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
handle incomplete local metadata
This commit is contained in:
parent
8f13de62d7
commit
a95c4f28a1
5 changed files with 10 additions and 8 deletions
|
@ -298,7 +298,7 @@
|
|||
html += '<div>';
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
preferBackdrop: true,
|
||||
preferThumb: true,
|
||||
shape: 'backdrop',
|
||||
overlayText: screenWidth >= 600,
|
||||
showTitle: true,
|
||||
|
|
|
@ -1225,6 +1225,7 @@
|
|||
|
||||
var defaultActionAttribute = options.defaultAction ? (' data-action="' + options.defaultAction + '"') : '';
|
||||
|
||||
// card
|
||||
html += '<div' + dataAttributes + ' class="' + cssClass + '">';
|
||||
|
||||
var style = "";
|
||||
|
@ -1322,6 +1323,7 @@
|
|||
// cardBox
|
||||
html += '</div>';
|
||||
|
||||
// card
|
||||
html += "</div>";
|
||||
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
var url = user.imageUrl;
|
||||
|
||||
if (user.supportsImageParams) {
|
||||
url += "height=" + userButtonHeight;
|
||||
url += "&height=" + userButtonHeight;
|
||||
}
|
||||
|
||||
html += '<img src="' + url + '" style="border-radius: 1000px; height:' + userButtonHeight + 'px;" />';
|
||||
|
|
|
@ -582,7 +582,7 @@ var Dashboard = {
|
|||
var url = user.imageUrl;
|
||||
|
||||
if (user.supportsImageParams) {
|
||||
url += "width=" + 28;
|
||||
url += "&width=" + 28;
|
||||
}
|
||||
|
||||
html += '<img style="max-width:28px;vertical-align:middle;margin-right:5px;" src="' + url + '" />';
|
||||
|
|
|
@ -388,7 +388,7 @@
|
|||
url: connectUser.ImageUrl
|
||||
};
|
||||
}
|
||||
if (localUser.PrimaryImageTag) {
|
||||
if (localUser && localUser.PrimaryImageTag) {
|
||||
|
||||
var apiClient = self.getApiClient(localUser);
|
||||
|
||||
|
@ -399,13 +399,13 @@
|
|||
|
||||
return {
|
||||
url: url,
|
||||
supportsImageParams: true
|
||||
supportsParams: true
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
url: null,
|
||||
supportsImageParams: false
|
||||
supportsParams: false
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,7 @@
|
|||
deferred.resolveWith(null, [
|
||||
{
|
||||
localUser: localUser,
|
||||
name: connectUser ? connectUser.Name : localUser.Name,
|
||||
name: connectUser ? connectUser.Name : (localUser ? localUser.Name : null),
|
||||
canManageServer: localUser && localUser.Policy.IsAdministrator,
|
||||
imageUrl: image.url,
|
||||
supportsImageParams: image.supportsParams
|
||||
|
@ -509,7 +509,7 @@
|
|||
|
||||
function logoutOfServer(apiClient) {
|
||||
|
||||
var serverInfo = apiClient.serverInfo();
|
||||
var serverInfo = apiClient.serverInfo() || {};
|
||||
|
||||
var logoutInfo = {
|
||||
serverId: serverInfo.Id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue