This commit is contained in:
Scott E. Graves 2025-02-18 16:13:55 -06:00
parent 9c30afe508
commit dec748851d

View File

@ -64,21 +64,22 @@ static void remove_stalled(std::string_view download_id, std::string_view title,
return;
}
if (utils::string::contains("sonarr", server.id)) {
nlohmann::json data({
{"name", "EpisodeSearch"},
{"episodeIds", {episode_id}},
});
response = cli.Post("/api/{}/command", data.dump(), "application/json");
if (response->status != httplib::StatusCode::OK_200) {
utils::error::handle_error(
function_name,
fmt::format("failed to search sonarr|{}|{}|{}|{}|{}", server.id,
server.url, title, episode_id, response->status));
}
if (not utils::string::contains("sonarr", server.id)) {
return;
}
nlohmann::json data({
{"name", "EpisodeSearch"},
{"episodeIds", {episode_id}},
});
response = cli.Post("/api/{}/command", data.dump(), "application/json");
if (response->status != httplib::StatusCode::OK_200) {
utils::error::handle_error(
function_name,
fmt::format("failed to search sonarr|{}|{}|{}|{}|{}", server.id,
server.url, title, episode_id, response->status));
}
}
static void check_server(const server_cfg &server, data_db &state_db) {