fix(plex): do not use SSL for local servers (#1418)

pull/1419/head
TheCatLady 4 years ago committed by GitHub
parent ecf13123d2
commit 9233fc0785
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,7 +14,6 @@ export interface PlexConnection {
local: boolean;
status?: number;
message?: string;
host?: string;
}
export interface PlexDevice {

@ -135,7 +135,7 @@ settingsRoutes.get('/plex/devices/servers', async (req, res, next) => {
...settings.plex,
ip: connection.address,
port: connection.port,
useSsl: connection.protocol === 'https' ? true : false,
useSsl: !connection.local && connection.protocol === 'https',
};
const plexClient = new PlexAPI({
plexToken: admin.plexToken,

@ -134,13 +134,12 @@ const SettingsPlex: React.FC<SettingsPlexProps> = ({ onComplete }) => {
dev.connection.forEach((conn) =>
finalPresets.push({
name: dev.name,
ssl: conn.protocol === 'https' ? true : false,
ssl: !conn.local && conn.protocol === 'https',
uri: conn.uri,
address: conn.address,
port: conn.port,
local: conn.local,
host: conn.host,
status: conn.status === 200 ? true : false,
status: conn.status === 200,
message: conn.message,
})
);

Loading…
Cancel
Save