mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add mobile app connection manager fixes
This commit is contained in:
parent
e2ebee7c31
commit
7c34d228e6
3 changed files with 30 additions and 12 deletions
|
@ -1377,20 +1377,34 @@ var Dashboard = {
|
|||
}
|
||||
|
||||
var appVersion = window.dashboardVersion;
|
||||
var appName = "Emby Mobile";
|
||||
var appName = Dashboard.isConnectMode() ?
|
||||
"Emby Mobile" :
|
||||
"Emby Web Client";
|
||||
|
||||
var deviceName;
|
||||
var deviceId;
|
||||
|
||||
// Cordova
|
||||
if (window.device) {
|
||||
//if (window.device) {
|
||||
|
||||
deviceName = device.model;
|
||||
deviceId = device.uuid;
|
||||
// deviceName = device.model;
|
||||
// deviceId = device.uuid;
|
||||
|
||||
} else {
|
||||
//}
|
||||
//else
|
||||
{
|
||||
|
||||
deviceName = generateDeviceName();
|
||||
deviceId = MediaBrowser.generateDeviceId();
|
||||
|
||||
var seed = [];
|
||||
var keyName = 'randomId';
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
seed.push('cordova');
|
||||
keyName = 'cordovaDeviceId';
|
||||
}
|
||||
|
||||
deviceId = MediaBrowser.generateDeviceId(keyName, seed.join(','));
|
||||
}
|
||||
|
||||
return {
|
||||
|
@ -1445,6 +1459,7 @@ var Dashboard = {
|
|||
initializeApiClient(ApiClient);
|
||||
|
||||
ConnectionManager.addApiClient(ApiClient, true).fail(Dashboard.logout);
|
||||
|
||||
} else {
|
||||
|
||||
Dashboard.logout();
|
||||
|
@ -1464,9 +1479,9 @@ var Dashboard = {
|
|||
}
|
||||
|
||||
if (window.ApiClient) {
|
||||
Dashboard.importCss(ApiClient.getUrl('Branding/Css'));
|
||||
|
||||
ApiClient.getDefaultImageQuality = Dashboard.getDefaultImageQuality;
|
||||
|
||||
Dashboard.importCss(ApiClient.getUrl('Branding/Css'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue