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

rework media source methods

This commit is contained in:
Luke Pulverenti 2015-04-01 17:56:32 -04:00
parent 240a0fe22f
commit c280d5e59d

View file

@ -185,8 +185,7 @@ var Dashboard = {
var url = getWindowUrl().toLowerCase();
return url.indexOf('mediabrowser.tv') != -1 ||
url.indexOf('emby.media') != -1 ||
url.indexOf('mediabrowser.github') != -1;
url.indexOf('emby.media') != -1;
},
logout: function (logoutWithServer) {
@ -1355,7 +1354,9 @@ var Dashboard = {
});
if (!Dashboard.isServerlessPage()) {
if (Dashboard.serverAddress() && Dashboard.getCurrentUserId() && Dashboard.getAccessToken()) {
window.ApiClient = new MediaBrowser.ApiClient(Logger, Dashboard.serverAddress(), appName, appVersion, deviceName, deviceId);
ApiClient.setCurrentUserId(Dashboard.getCurrentUserId(), Dashboard.getAccessToken());
@ -1364,6 +1365,7 @@ var Dashboard = {
ConnectionManager.addApiClient(ApiClient, true).fail(Dashboard.logout);
} else {
Dashboard.logout();
return;
}