Merge pull request #2625 from LukashonakV/happyLinter
commit
1149e51f72
|
@ -7,7 +7,7 @@ namespace cava {
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <cava/common.h>
|
#include <cava/common.h>
|
||||||
}
|
}
|
||||||
}
|
} // namespace cava
|
||||||
|
|
||||||
namespace waybar::modules {
|
namespace waybar::modules {
|
||||||
using namespace std::literals::chrono_literals;
|
using namespace std::literals::chrono_literals;
|
||||||
|
|
|
@ -575,10 +575,12 @@ auto Mpris::getPlayerInfo() -> std::optional<PlayerInfo> {
|
||||||
|
|
||||||
errorexit:
|
errorexit:
|
||||||
std::string errorMsg = error->message;
|
std::string errorMsg = error->message;
|
||||||
// When mpris checks for active player sessions periodically(5 secs), NoActivePlayer error message is
|
// When mpris checks for active player sessions periodically(5 secs), NoActivePlayer error
|
||||||
// thrown when there are no active sessions. This error message is spamming logs without having any value
|
// message is
|
||||||
// addition. Log the error only if the error we recceived is not NoActivePlayer.
|
// thrown when there are no active sessions. This error message is spamming logs without having
|
||||||
if(errorMsg.rfind("GDBus.Error:com.github.altdesktop.playerctld.NoActivePlayer") == std::string::npos){
|
// 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);
|
spdlog::error("mpris[{}]: {}", info.name, error->message);
|
||||||
}
|
}
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
|
|
Loading…
Reference in New Issue