1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

update components

This commit is contained in:
Luke Pulverenti 2016-03-14 01:04:42 -04:00
parent 50a27ba0b4
commit ed63dd2039
7 changed files with 18 additions and 73 deletions

View file

@ -16,12 +16,12 @@
}, },
"devDependencies": {}, "devDependencies": {},
"ignore": [], "ignore": [],
"version": "1.0.43", "version": "1.0.44",
"_release": "1.0.43", "_release": "1.0.44",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "1.0.43", "tag": "1.0.44",
"commit": "5c5aeb79353f3a7d3e20a456d6f1506d660f8626" "commit": "31d79dade27d28bad1c45ad30da03550493c17ca"
}, },
"_source": "git://github.com/MediaBrowser/Emby.ApiClient.Javascript.git", "_source": "git://github.com/MediaBrowser/Emby.ApiClient.Javascript.git",
"_target": "~1.0.3", "_target": "~1.0.3",

View file

@ -308,9 +308,6 @@
var existingServer = existingServers.length ? existingServers[0] : {}; var existingServer = existingServers.length ? existingServers[0] : {};
existingServer.DateLastAccessed = new Date().getTime(); existingServer.DateLastAccessed = new Date().getTime();
existingServer.LastConnectionMode = ConnectionMode.Manual; existingServer.LastConnectionMode = ConnectionMode.Manual;
if (existingServer.LastConnectionMode == ConnectionMode.Local) {
existingServer.DateLastLocalConnection = new Date().getTime();
}
existingServer.ManualAddress = apiClient.serverAddress(); existingServer.ManualAddress = apiClient.serverAddress();
apiClient.serverInfo(existingServer); apiClient.serverInfo(existingServer);
@ -412,10 +409,6 @@
if (options.updateDateLastAccessed !== false) { if (options.updateDateLastAccessed !== false) {
server.DateLastAccessed = new Date().getTime(); server.DateLastAccessed = new Date().getTime();
if (server.LastConnectionMode == ConnectionMode.Local) {
server.DateLastLocalConnection = new Date().getTime();
}
} }
server.Id = result.ServerId; server.Id = result.ServerId;
@ -869,8 +862,7 @@
var info = { var info = {
Id: foundServer.Id, Id: foundServer.Id,
LocalAddress: convertEndpointAddressToManualAddress(foundServer) || foundServer.Address, LocalAddress: convertEndpointAddressToManualAddress(foundServer) || foundServer.Address,
Name: foundServer.Name, Name: foundServer.Name
DateLastLocalConnection: new Date().getTime()
}; };
info.LastConnectionMode = info.ManualAddress ? ConnectionMode.Manual : ConnectionMode.Local; info.LastConnectionMode = info.ManualAddress ? ConnectionMode.Manual : ConnectionMode.Local;
@ -1165,10 +1157,6 @@
if (options.updateDateLastAccessed !== false) { if (options.updateDateLastAccessed !== false) {
server.DateLastAccessed = new Date().getTime(); server.DateLastAccessed = new Date().getTime();
if (connectionMode == ConnectionMode.Local) {
server.DateLastLocalConnection = new Date().getTime();
}
} }
credentialProvider.addOrUpdateServer(credentials.Servers, server); credentialProvider.addOrUpdateServer(credentials.Servers, server);
credentialProvider.credentials(credentials); credentialProvider.credentials(credentials);
@ -1517,33 +1505,7 @@
}); });
} }
return self.getAvailableServers().then(function (servers) {
var currentServerId = apiClient.serverInfo().Id;
var matchedServers = servers.filter(function (s) {
return stringEqualsIgnoreCase(s.Id, currentServerId);
});
var match = matchedServers.length ? matchedServers[0] : null;
var dateLastLocalConnection = match ? match.DateLastLocalConnection : null;
if (!dateLastLocalConnection) {
return apiClient.getJSON(apiClient.getUrl('System/Endpoint')).then(function (info) {
if (info.IsInNetwork) {
updateDateLastLocalConnection(currentServerId);
return apiClient.getRegistrationInfo(feature); return apiClient.getRegistrationInfo(feature);
} else {
return {};
}
});
} else {
return apiClient.getRegistrationInfo(feature);
}
});
}; };
function isConnectUserSupporter() { function isConnectUserSupporter() {
@ -1559,22 +1521,6 @@
return false; return false;
} }
function updateDateLastLocalConnection(serverId) {
var credentials = credentialProvider.credentials();
var servers = credentials.Servers.filter(function (s) {
return s.Id == serverId;
});
var server = servers.length ? servers[0] : null;
if (server) {
server.DateLastLocalConnection = new Date().getTime();
credentialProvider.addOrUpdateServer(credentials.Servers, server);
credentialProvider.credentials(credentials);
}
}
function addAppInfoToConnectRequest(request) { function addAppInfoToConnectRequest(request) {
request.headers = request.headers || {}; request.headers = request.headers || {};
request.headers['X-Application'] = appName + '/' + appVersion; request.headers['X-Application'] = appName + '/' + appVersion;

View file

@ -95,7 +95,6 @@
if (server.ConnectServerId) { if (server.ConnectServerId) {
existing.ConnectServerId = server.ConnectServerId; existing.ConnectServerId = server.ConnectServerId;
} }
existing.DateLastLocalConnection = Math.max(existing.DateLastLocalConnection || 0, server.DateLastLocalConnection || 0);
return existing; return existing;
} }

View file

@ -16,12 +16,12 @@
}, },
"devDependencies": {}, "devDependencies": {},
"ignore": [], "ignore": [],
"version": "1.1.45", "version": "1.1.46",
"_release": "1.1.45", "_release": "1.1.46",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "1.1.45", "tag": "1.1.46",
"commit": "4096a916053ab04935ebbe0dec9bbc491d66ae9d" "commit": "1c0644c2d74740356a298c55a174c34ae465436d"
}, },
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git", "_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "~1.1.5", "_target": "~1.1.5",

View file

@ -1,12 +1,12 @@
define(['browser', 'css!./style'], function (browser) { define(['browser', 'css!./style'], function (browser) {
function enableAnimation() { function enableAnimation(elem) {
if (browser.mobile) { if (browser.mobile) {
return false; return false;
} }
return true; return elem.animate;
} }
function backdrop() { function backdrop() {
@ -31,7 +31,7 @@
parent.appendChild(backdropImage); parent.appendChild(backdropImage);
if (!enableAnimation()) { if (!enableAnimation(backdropImage)) {
if (existingBackdropImage && existingBackdropImage.parentNode) { if (existingBackdropImage && existingBackdropImage.parentNode) {
existingBackdropImage.parentNode.removeChild(existingBackdropImage); existingBackdropImage.parentNode.removeChild(existingBackdropImage);
} }

View file

@ -45,7 +45,7 @@
"tag": "v1.0.11", "tag": "v1.0.11",
"commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5" "commit": "e3c1ab0c72905b58fb4d9adc2921ea73b5c085a5"
}, },
"_source": "git://github.com/PolymerElements/paper-behaviors.git", "_source": "git://github.com/polymerelements/paper-behaviors.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "PolymerElements/paper-behaviors" "_originalSource": "polymerelements/paper-behaviors"
} }

View file

@ -32,14 +32,14 @@
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0" "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
}, },
"ignore": [], "ignore": [],
"homepage": "https://github.com/PolymerElements/paper-ripple", "homepage": "https://github.com/polymerelements/paper-ripple",
"_release": "1.0.5", "_release": "1.0.5",
"_resolution": { "_resolution": {
"type": "version", "type": "version",
"tag": "v1.0.5", "tag": "v1.0.5",
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5" "commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
}, },
"_source": "git://github.com/PolymerElements/paper-ripple.git", "_source": "git://github.com/polymerelements/paper-ripple.git",
"_target": "^1.0.0", "_target": "^1.0.0",
"_originalSource": "PolymerElements/paper-ripple" "_originalSource": "polymerelements/paper-ripple"
} }