Merge pull request #2622 from nomads-land/master

This commit is contained in:
Alexis Rouillard 2023-10-31 07:44:29 +01:00 committed by GitHub
commit b37d0df89b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -574,7 +574,13 @@ auto Mpris::getPlayerInfo() -> std::optional<PlayerInfo> {
return info; return info;
errorexit: errorexit:
spdlog::error("mpris[{}]: {}", info.name, error->message); 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; return std::nullopt;
} }