Skip to content

Commit

Permalink
chore: Test - get correct version from Tautulli
Browse files Browse the repository at this point in the history
  • Loading branch information
jorenn92 committed Sep 27, 2024
1 parent 1aff795 commit 5b5726d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions server/src/modules/api/tautulli-api/tautulli-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { TautulliApi } from './helpers/tautulli-api.helper';
import _ from 'lodash';

interface TautulliInfo {
machine_identifier: string;
version: string;
tautulli_version: string;
}

export interface TautulliUser {
Expand Down Expand Up @@ -125,7 +124,7 @@ export class TautulliApiService {
{
signal: AbortSignal.timeout(10000),
params: {
cmd: 'get_server_identity',
cmd: 'get_tautulli_info',
},
},
);
Expand Down
4 changes: 2 additions & 2 deletions server/src/modules/settings/settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ export class SettingsService implements SettingDto {
public async testTautulli(): Promise<BasicResponseDto> {
try {
const resp = await this.tautulli.info();
return resp?.response.result == 'success'
? { status: 'OK', code: 1, message: resp.response.data.version }
return resp?.response && resp?.response.result == 'success'
? { status: 'OK', code: 1, message: resp.response.data?.tautulli_version }
: { status: 'NOK', code: 0, message: 'Failure' };
} catch {
return { status: 'NOK', code: 0, message: 'Failure' };
Expand Down

0 comments on commit 5b5726d

Please sign in to comment.