From 0652358b9da5c32c74a5dd8b348858beae2d3e21 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sat, 1 Oct 2022 18:32:10 +0200 Subject: [PATCH] undid #740 --- src/welle-cli/webradiointerface.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/welle-cli/webradiointerface.cpp b/src/welle-cli/webradiointerface.cpp index 3c7bd276..3277bb05 100644 --- a/src/welle-cli/webradiointerface.cpp +++ b/src/welle-cli/webradiointerface.cpp @@ -502,20 +502,12 @@ bool WebRadioInterface::dispatch_client(Socket&& client) const regex regex_mp3(R"(^[/]mp3[/]([^ ]+))"); std::smatch match_mp3; - - const regex regex_mp3channel(R"(^[/]mp3-channel[/]([^ ]+)[/]([^ ]+))"); - std::smatch match_mp3channel; - if (regex_search(req.url, match_mp3, regex_mp3)) { success = send_mp3(s, match_mp3[1]); } else if (regex_search(req.url, match_slide, regex_slide)) { success = send_slide(s, match_slide[1]); } - else if (regex_search(req.url, match_mp3channel, regex_mp3channel)) { - retune(match_mp3channel[1]); - success = send_mp3(s, match_mp3channel[2]); - } else { cerr << "Could not understand GET request " << req.url << endl; } @@ -858,22 +850,6 @@ bool WebRadioInterface::send_mp3(Socket& s, const std::string& stream) unique_lock lock(rx_mut); ASSERT_RX; - bool is_empty = true; - while (is_empty) { - for (const auto& srv : rx->getServiceList()) { - if (rx->serviceHasAudioComponent(srv) and - (to_hex(srv.serviceId, 4) == stream or - (uint32_t)std::stoul(stream) == srv.serviceId)) { - is_empty=false; - - if (phs.count(srv.serviceId) == 0) { - WebProgrammeHandler ph(srv.serviceId); - phs.emplace(std::make_pair(srv.serviceId, move(ph))); - } - } - } - } - for (const auto& srv : rx->getServiceList()) { if (rx->serviceHasAudioComponent(srv) and (to_hex(srv.serviceId, 4) == stream or