From 80b1fb8ce77c631d9d28ae10807b7a68efc57ce2 Mon Sep 17 00:00:00 2001 From: timebomb0 Date: Sat, 6 Mar 2021 17:22:16 -0800 Subject: [PATCH] Improve logging around getting plex status --- src/plexTranscoder.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/plexTranscoder.js b/src/plexTranscoder.js index 21dd1ed..22b0017 100644 --- a/src/plexTranscoder.js +++ b/src/plexTranscoder.js @@ -416,8 +416,15 @@ X-Plex-Token=${this.server.accessToken}`; } updatePlex() { - this.log("Updating plex status") - axios.post(this.getStatusUrl()); + this.log("Updating plex status"); + const statusUrl = this.getStatusUrl(); + try { + axios.post(statusUrl); + } catch (error) { + this.log(`Problem updating Plex status using status URL ${statusUrl}:`); + this.log(error); + return false; + } this.currTimeMs += this.updateInterval; if (this.currTimeMs > this.duration) { this.currTimeMs = this.duration;