Minor improvements.

This commit is contained in:
levlam 2024-07-12 18:21:23 +03:00
parent fd822a6372
commit 755d9e6689
3 changed files with 5 additions and 7 deletions

View File

@ -38,9 +38,9 @@ ActorOwn<ResourceManager> &FileDownloadManager::get_download_resource_manager(bo
}
void FileDownloadManager::download(QueryId query_id, const FullRemoteFileLocation &remote_location,
const LocalFileLocation &local, int64 size, string name,
const FileEncryptionKey &encryption_key, bool search_file, int64 offset, int64 limit,
int8 priority) {
const LocalFileLocation &local, int64 size, string name,
const FileEncryptionKey &encryption_key, bool need_search_file, int64 offset,
int64 limit, int8 priority) {
if (stop_flag_) {
return;
}
@ -52,7 +52,7 @@ void FileDownloadManager::download(QueryId query_id, const FullRemoteFileLocatio
bool is_small = size < 20 * 1024;
node->loader_ =
create_actor<FileDownloader>("Downloader", remote_location, local, size, std::move(name), encryption_key,
is_small, search_file, offset, limit, std::move(callback));
is_small, need_search_file, offset, limit, std::move(callback));
DcId dc_id = remote_location.is_web() ? G()->get_webfile_dc_id() : remote_location.get_dc_id();
auto &resource_manager = get_download_resource_manager(is_small, dc_id);
send_closure(resource_manager, &ResourceManager::register_worker,

View File

@ -19,7 +19,6 @@
#include "td/utils/buffer.h"
#include "td/utils/common.h"
#include "td/utils/Container.h"
#include "td/utils/Promise.h"
#include "td/utils/Status.h"
#include <map>
@ -42,7 +41,7 @@ class FileDownloadManager final : public Actor {
explicit FileDownloadManager(unique_ptr<Callback> callback, ActorShared<> parent);
void download(QueryId query_id, const FullRemoteFileLocation &remote_location, const LocalFileLocation &local,
int64 size, string name, const FileEncryptionKey &encryption_key, bool search_file, int64 offset,
int64 size, string name, const FileEncryptionKey &encryption_key, bool need_search_file, int64 offset,
int64 limit, int8 priority);
void update_priority(QueryId query_id, int8 priority);

View File

@ -9,7 +9,6 @@
#include "td/telegram/Global.h"
#include "td/utils/common.h"
#include "td/utils/SliceBuilder.h"
namespace td {