From bc3f43705c1efdb309a06db3df53c0b2d1c13375 Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Sun, 2 Jun 2024 05:11:35 -0400 Subject: [PATCH] Handle translation files --- src/server.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/server.cpp b/src/server.cpp index 9a8f647d1..87327de3a 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -2698,6 +2698,8 @@ void Server::sendMediaAnnouncement(session_t peer_id, const std::string &lang_co for (const auto &i : m_media) { if (str_ends_with(i.first, ".tr") && !str_ends_with(i.first, lang_suffix)) continue; + if (str_ends_with(i.first, ".tr.e") && !str_ends_with(i.first, lang_suffix + ".e")) + continue; // Skip dummy entries on 5.0+ clients if (protocol_version >= 37 && i.second.sha1_digest.empty()) continue; @@ -2709,6 +2711,8 @@ void Server::sendMediaAnnouncement(session_t peer_id, const std::string &lang_co for (const auto &i : m_media) { if (str_ends_with(i.first, ".tr") && !str_ends_with(i.first, lang_suffix)) continue; + if (str_ends_with(i.first, ".tr.e") && !str_ends_with(i.first, lang_suffix + ".e")) + continue; if (protocol_version >= 37 && i.second.sha1_digest.empty()) continue;