Skips logging NoActivePlayer error msgs
This commit is contained in:
parent
e46f66b468
commit
67422eea36
|
@ -574,7 +574,13 @@ auto Mpris::getPlayerInfo() -> std::optional<PlayerInfo> {
|
|||
return info;
|
||||
|
||||
errorexit:
|
||||
std::string errorMsg = error->message;
|
||||
// When mpris checks for active player sessions periodically(5 secs), NoActivePlayer error message is
|
||||
// thrown when there are no active sessions. This error message is spamming logs without having any value
|
||||
// addition. Log the error only if the error we recceived is not NoActivePlayer.
|
||||
if(errorMsg.rfind("GDBus.Error:com.github.altdesktop.playerctld.NoActivePlayer") == std::string::npos){
|
||||
spdlog::error("mpris[{}]: {}", info.name, error->message);
|
||||
}
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue