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-01-09 16:27:54 -05:00
parent d84c5a7c1d
commit bea44d2e39
4 changed files with 23 additions and 12 deletions

View file

@ -1466,19 +1466,30 @@
self.getRegistrationInfo = function (feature, apiClient) {
if (isConnectUserSupporter()) {
return new Promise(function (resolve, reject) {
resolve({
Name: feature,
IsRegistered: true,
IsTrial: false
});
});
}
return self.getAvailableServers().then(function (servers) {
var matchedServers = servers.filter(function (s) {
return stringEqualsIgnoreCase(s.Id, apiClient.serverInfo().Id);
});
if (!matchedServers.length && !isConnectUserSupporter()) {
if (!matchedServers.length) {
return {};
}
var match = matchedServers[0];
if (!match.DateLastLocalConnection && !isConnectUserSupporter()) {
if (!match.DateLastLocalConnection) {
return ApiClient.getJSON(ApiClient.getUrl('System/Endpoint')).then(function (info) {