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; local: boolean;
status?: number; status?: number;
message?: string; message?: string;
host?: string;
} }
export interface PlexDevice { export interface PlexDevice {

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

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

Loading…
Cancel
Save