verbosestream << "with " << filedata.size() << " bytes ";
verbosestream << "(cached=" << cached << ")" << std::endl;
- if (m_media_pushed_files.count(filename) != 0) {
- // Ignore (but acknowledge). Previously this was for sync purposes,
- // but even in new versions media cannot be replaced at runtime.
- if (m_proto_ver >= 40)
- sendHaveMedia({ token });
- return;
- }
-
if (!filedata.empty()) {
// LEGACY CODEPATH
// Compute and check checksum of data
// Actually load media
loadMedia(filedata, filename, true);
- m_media_pushed_files.insert(filename);
// Cache file for the next time when this client joins the same server
if (cached)
return;
}
- m_media_pushed_files.insert(filename);
-
// create a downloader for this file
auto downloader(std::make_shared<SingleMediaDownloader>(cached));
m_pending_media_downloads.emplace_back(token, downloader);