[contrib/playerctl]: don't log when no player is found
`playerctl status` returns 1 when no player is found, which caused contrib/playerctl to log many times when there's no player.
This commit is contained in:
parent
6ce761695a
commit
973dd6117e
1 changed files with 3 additions and 1 deletions
|
@ -85,7 +85,9 @@ class Module(core.module.Module):
|
||||||
|
|
||||||
def update(self):
|
def update(self):
|
||||||
try:
|
try:
|
||||||
playback_status = str(util.cli.execute(self.__cmd + "status")).strip()
|
playback_status = str(util.cli.execute(self.__cmd + "status 2>&1 || true", shell = True)).strip()
|
||||||
|
if playback_status == "No players found":
|
||||||
|
playback_status = None
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.exception(e)
|
logging.exception(e)
|
||||||
playback_status = None
|
playback_status = None
|
||||||
|
|
Loading…
Reference in a new issue