1
0
Fork 0
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:
Luke Pulverenti 2015-02-25 13:11:49 -05:00
parent 8f13de62d7
commit a95c4f28a1
5 changed files with 10 additions and 8 deletions

View file

@ -298,7 +298,7 @@
html += '<div>'; html += '<div>';
html += LibraryBrowser.getPosterViewHtml({ html += LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
preferBackdrop: true, preferThumb: true,
shape: 'backdrop', shape: 'backdrop',
overlayText: screenWidth >= 600, overlayText: screenWidth >= 600,
showTitle: true, showTitle: true,

View file

@ -1225,6 +1225,7 @@
var defaultActionAttribute = options.defaultAction ? (' data-action="' + options.defaultAction + '"') : ''; var defaultActionAttribute = options.defaultAction ? (' data-action="' + options.defaultAction + '"') : '';
// card
html += '<div' + dataAttributes + ' class="' + cssClass + '">'; html += '<div' + dataAttributes + ' class="' + cssClass + '">';
var style = ""; var style = "";
@ -1322,6 +1323,7 @@
// cardBox // cardBox
html += '</div>'; html += '</div>';
// card
html += "</div>"; html += "</div>";
} }

View file

@ -46,7 +46,7 @@
var url = user.imageUrl; var url = user.imageUrl;
if (user.supportsImageParams) { if (user.supportsImageParams) {
url += "height=" + userButtonHeight; url += "&height=" + userButtonHeight;
} }
html += '<img src="' + url + '" style="border-radius: 1000px; height:' + userButtonHeight + 'px;" />'; html += '<img src="' + url + '" style="border-radius: 1000px; height:' + userButtonHeight + 'px;" />';

View file

@ -582,7 +582,7 @@ var Dashboard = {
var url = user.imageUrl; var url = user.imageUrl;
if (user.supportsImageParams) { if (user.supportsImageParams) {
url += "width=" + 28; url += "&width=" + 28;
} }
html += '<img style="max-width:28px;vertical-align:middle;margin-right:5px;" src="' + url + '" />'; html += '<img style="max-width:28px;vertical-align:middle;margin-right:5px;" src="' + url + '" />';

View file

@ -388,7 +388,7 @@
url: connectUser.ImageUrl url: connectUser.ImageUrl
}; };
} }
if (localUser.PrimaryImageTag) { if (localUser && localUser.PrimaryImageTag) {
var apiClient = self.getApiClient(localUser); var apiClient = self.getApiClient(localUser);
@ -399,13 +399,13 @@
return { return {
url: url, url: url,
supportsImageParams: true supportsParams: true
}; };
} }
return { return {
url: null, url: null,
supportsImageParams: false supportsParams: false
}; };
} }
@ -422,7 +422,7 @@
deferred.resolveWith(null, [ deferred.resolveWith(null, [
{ {
localUser: localUser, localUser: localUser,
name: connectUser ? connectUser.Name : localUser.Name, name: connectUser ? connectUser.Name : (localUser ? localUser.Name : null),
canManageServer: localUser && localUser.Policy.IsAdministrator, canManageServer: localUser && localUser.Policy.IsAdministrator,
imageUrl: image.url, imageUrl: image.url,
supportsImageParams: image.supportsParams supportsImageParams: image.supportsParams
@ -509,7 +509,7 @@
function logoutOfServer(apiClient) { function logoutOfServer(apiClient) {
var serverInfo = apiClient.serverInfo(); var serverInfo = apiClient.serverInfo() || {};
var logoutInfo = { var logoutInfo = {
serverId: serverInfo.Id serverId: serverInfo.Id