tg_cli: "skip" generation conversion.

GitOrigin-RevId: 85aacd4c915c07ba37a57eac0658bc6288198b32
This commit is contained in:
levlam 2018-03-18 13:45:59 +03:00
parent e0e8e69cde
commit b456895f5b
2 changed files with 4 additions and 2 deletions

View File

@ -345,6 +345,8 @@ class CliClient final : public Actor {
// TODO: actually download
file_generation.source = "test.jpg";
file_generation.part_size = 1000000;
} else if (update.conversion_ == "skip") {
return;
} else {
file_generation.source = update.original_path_;
file_generation.part_size = to_integer<int32>(update.conversion_);

View File

@ -1589,7 +1589,7 @@ void FileManager::run_generate(FileNodePtr node) {
int8 download_priority = 0;
int8 upload_priority = 0;
FileId file_id;
FileId file_id = node->main_file_id_;
for (auto id : node->file_ids_) {
auto *info = get_file_id_info(id);
if (info->download_priority_ > download_priority) {
@ -1664,7 +1664,7 @@ void FileManager::run_upload(FileNodePtr node, std::vector<int> bad_parts) {
}
}
int8 priority = 0;
FileId file_id;
FileId file_id = node->main_file_id_;
for (auto id : node->file_ids_) {
auto *info = get_file_id_info(id);
if (info->upload_priority_ > priority) {