Skip to content

Commit

Permalink
PlayerSeasonActivity: Fix some cover image missing
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed Jan 19, 2023
1 parent dd71650 commit 09713f9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions wiliwili/include/api/bilibili/result/home_pgc_season_result.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,18 @@ inline void from_json(const nlohmann::json& nlohmann_json_j,
ep.at("index_show").get_to(nlohmann_json_t.subtitle);
}

if (nlohmann_json_j.contains("horizontal_cover_1610")) {
if (nlohmann_json_j.contains("horizontal_cover_1610") &&
!nlohmann_json_j.at("horizontal_cover_1610").is_null() &&
!nlohmann_json_j.at("horizontal_cover_1610")
.get<std::string>()
.empty()) {
nlohmann_json_j.at("horizontal_cover_1610")
.get_to(nlohmann_json_t.cover);
} else if (nlohmann_json_j.contains("horizontal_cover_169")) {
} else if (nlohmann_json_j.contains("horizontal_cover_169") &&
!nlohmann_json_j.at("horizontal_cover_169").is_null() &&
!nlohmann_json_j.at("horizontal_cover_169")
.get<std::string>()
.empty()) {
nlohmann_json_j.at("horizontal_cover_169")
.get_to(nlohmann_json_t.cover);
} else if (nlohmann_json_j.contains("cover")) {
Expand Down

0 comments on commit 09713f9

Please sign in to comment.