diff --git a/src/index.ts b/src/index.ts index d36da4a8..fd71a303 100644 --- a/src/index.ts +++ b/src/index.ts @@ -244,7 +244,7 @@ const configDir = process.env.CONFIG_DIR || path.resolve(projectDir, `./config`) app.postAsync('/tautulli', async function(this: any, req, res) { tauIngress.trackIngress(req, false); - const payload = TautulliSource.formatPlayObj(req.body, {newFromSource: true}); + const payload = TautulliSource.formatPlayObj(req, {newFromSource: true}); // try to get config name from payload if (req.body.scrobblerConfig !== undefined) { const source = scrobbleSources.getByName(req.body.scrobblerConfig); diff --git a/src/sources/TautulliSource.ts b/src/sources/TautulliSource.ts index bb5ea0e3..2550368b 100644 --- a/src/sources/TautulliSource.ts +++ b/src/sources/TautulliSource.ts @@ -4,6 +4,7 @@ import {TautulliSourceConfig} from "../common/infrastructure/config/source/tautu import {FormatPlayObjectOptions, InternalConfig, PlayObject} from "../common/infrastructure/Atomic.js"; import {combinePartsToString, truncateStringToLength} from "../utils.js"; import EventEmitter from "events"; +import {Request} from "express"; const shortDeviceId = truncateStringToLength(10, ''); @@ -13,8 +14,7 @@ export default class TautulliSource extends PlexSource { constructor(name: any, config: TautulliSourceConfig, internal: InternalConfig, emitter: EventEmitter) { super(name, config, internal, 'tautulli', emitter); } - - static formatPlayObj(obj: any, options: FormatPlayObjectOptions = {}): PlayObject { + static formatPlayObj(obj: Request, options: FormatPlayObjectOptions = {}): PlayObject { const {newFromSource = false} = options; const { artist_name,