Happy Linter

Signed-off-by: Viktar Lukashonak <myxabeer@gmail.com>
pull/2625/head
Viktar Lukashonak 2023-10-31 23:31:58 +03:00
parent 6425bd2fe0
commit 9012cebbf2
No known key found for this signature in database
GPG Key ID: 08A413AA87200A6F
4 changed files with 10 additions and 8 deletions

View File

@ -7,7 +7,7 @@ namespace cava {
extern "C" {
#include <cava/common.h>
}
}
} // namespace cava
namespace waybar::modules {
using namespace std::literals::chrono_literals;

View File

@ -575,10 +575,12 @@ auto Mpris::getPlayerInfo() -> std::optional<PlayerInfo> {
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){
// 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;