bro
This commit is contained in:
parent
e7a16d005c
commit
6d9390f02c
11 changed files with 114 additions and 103 deletions
|
@ -29,6 +29,8 @@ namespace {
|
|||
} // namespace
|
||||
|
||||
fn SystemData::fetchSystemData(const Config& config) -> SystemData {
|
||||
using util::types::None;
|
||||
|
||||
SystemData data {
|
||||
.date = GetDate(),
|
||||
.host = os::GetHost(),
|
||||
|
@ -66,10 +68,7 @@ fn SystemData::fetchSystemData(const Config& config) -> SystemData {
|
|||
if (weatherFuture.valid())
|
||||
try {
|
||||
data.weather_info = weatherFuture.get();
|
||||
} catch (const std::exception& e) {
|
||||
error_log("Failed to get weather info: {}", e.what());
|
||||
data.weather_info = None;
|
||||
}
|
||||
} catch (const std::exception& e) { data.weather_info = None; }
|
||||
|
||||
if (nowPlayingFuture.valid())
|
||||
data.now_playing = nowPlayingFuture.get();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue