Merge pull request #278 from TimeBomb/update-plex-status-log

Improve logging around getting plex status
This commit is contained in:
vexorian 2021-03-07 11:02:32 -04:00 committed by GitHub
commit 7e1c5095f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;