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

@ -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