Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Commit

Permalink
Not every status has media set. (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
trixing authored Jul 13, 2021
1 parent 523fd5a commit 1e1a092
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/persistentPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -716,8 +716,12 @@ module.exports = function (logClass) {
(that._previousStatus === undefined || that._status.playerState != that._previousStatus.playerState)
)
{
that.emit(that.EVENT_PLAYING, that._status.media.contentId);
log.info("%s - Playing - %s", that._name, that._status.media.contentId);
if (that._status.media) {
that.emit(that.EVENT_PLAYING, that._status.media.contentId);
log.info("%s - Playing - %s", that._name, that._status.media.contentId);
} else {
log.info("%s - Playing - unknown media", that._name);
}
}
}

Expand Down

0 comments on commit 1e1a092

Please sign in to comment.