Commit Graph

698 Commits

Author SHA1 Message Date
levlam
f6168879af Explicitly fail reload attachment menu bot queries. 2023-01-16 15:16:36 +03:00
levlam
1588f0d687 Return after call to on_error. 2023-01-18 17:10:08 +03:00
levlam
4408af6643 Improve "id" variable names in FileManager. 2023-01-16 13:30:03 +03:00
levlam
8d8f72a17a Fix some lower-case spelling. 2023-01-15 12:00:26 +03:00
levlam
3573990d52 Support symbolic links in walk_path. 2023-01-04 17:25:30 +03:00
levlam
903d994799 Improve punctuation. 2023-01-02 15:38:04 +03:00
levlam
cf1984844b Update copyright year. 2023-01-01 00:28:08 +03:00
levlam
f6de50e19f Fix some spelling. 2022-12-22 17:04:18 +03:00
levlam
b8f4df741b Remove PhotoWithSpoiler and VideoWithSpoiler file types. 2022-12-21 17:37:16 +03:00
levlam
02db4f2fac Support sending of photos and videos with spoiler animation. 2022-12-15 22:41:55 +03:00
levlam
36c7dc2b63 Improve FullLocalFileLocation default constructor. 2022-12-15 23:05:51 +03:00
levlam
ec0dd68a57 Add td_api::getForumTopicLink. 2022-12-05 13:03:38 +03:00
levlam
af05db3f15 Add td::Hash and use it everywhere instead of unusable std::hash. 2022-11-23 19:37:32 +03:00
levlam
a776ac7566 Improve log message for failed to generate files. 2022-11-22 14:15:37 +03:00
levlam
3ae4a8d702 Improve logging. 2022-11-21 15:39:14 +03:00
levlam
0227bbc3cf Treat files with upload_pause as being uploaded. 2022-11-21 15:28:32 +03:00
levlam
68627a0c3f Add source to cancel_upload_file. 2022-11-21 14:33:19 +03:00
levlam
19e080d3d2 Avoid non-required file_id duping. 2022-11-21 12:06:05 +03:00
levlam
0b387a61ad Add source to dup_file_id. 2022-11-21 11:40:43 +03:00
levlam
63b528f213 Speculatively add channel users added through addChatMembers. 2022-11-17 18:10:26 +03:00
levlam
3373ac8aa8 Don't replace cached file_id of being uploaded files. 2022-11-14 18:30:10 +03:00
levlam
ecceb1c472 Fix file registration. 2022-11-13 11:56:52 +03:00
levlam
73049c6c89 Improve logging. 2022-11-13 11:11:18 +03:00
levlam
348ee9a95b Remove unused return value in FileManager::merge. 2022-11-12 09:54:23 +03:00
levlam
b29fc78f85 Merge downloaded and generated files as early as possible to avoid pinning and keeping of a temporary file_id for local location. 2022-11-12 09:47:33 +03:00
levlam
e35a81dbe9 Pin only main file_id. 2022-11-11 21:09:57 +03:00
levlam
8b64142af4 Reduce boundary for file identifier number warnings. 2022-11-11 16:54:13 +03:00
levlam
cb003d7f66 Fix compilation error. 2022-11-04 11:34:11 +03:00
levlam
92f8093486 Improve download/upload callback handling. 2022-10-26 12:29:12 +03:00
levlam
ee28a37906 Minor improvements. 2022-10-12 15:59:58 +03:00
levlam
102c40cc3b Asynchronously check local location for downloaded files. 2022-10-10 16:24:32 +03:00
levlam
188a7b7c3e Pass promise to FileManager::download. 2022-10-10 15:40:39 +03:00
levlam
3648df4e0d Asynchronously check location for files loaded from database. 2022-10-10 14:51:24 +03:00
levlam
28c3c7fb03 Add FileManager::check_local_location_async. 2022-10-10 14:19:35 +03:00
levlam
f26f05a074 Move check_local_location to FileLoaderUtils. 2022-10-10 12:58:48 +03:00
levlam
6786276481 Improve FileManager::check_local_location. 2022-10-10 12:45:20 +03:00
levlam
af3c33e481 Simplify local location check in FileManager::download. 2022-10-10 12:11:40 +03:00
levlam
f1146d05bd Make FileManager::check_local_location static. 2022-10-09 22:15:46 +03:00
levlam
f86f8e5a85 Don't check local file size for downloaded files. 2022-10-09 21:20:57 +03:00
levlam
683627a350 Make all operator bool const and nonexcept. 2022-10-09 19:30:18 +03:00
levlam
5a29dcd337 Avoid redundant usages of Status::error(). 2022-10-09 14:15:54 +03:00
levlam
7e1555531c Fix warning. 2022-10-08 21:56:51 +03:00
levlam
c91e8d6ce2 Improve logging. 2022-10-06 16:29:35 +03:00
levlam
78314b2da9 Immediately ignore duplicate and invalid file sources loaded from database. 2022-10-06 15:15:45 +03:00
levlam
1e6a6c28af Synchronously load file in FileManager::add_file_source to avoid resaving it to the database. 2022-10-06 13:48:52 +03:00
levlam
59acbf6d15 Add warnings about big file nodes. 2022-10-05 16:32:16 +03:00
levlam
197d1de31b Resave file after clearing local location to keep file sources. 2022-10-02 23:42:33 +03:00
levlam
df3df17c6f Fix FileManager::clear_from_pmc. 2022-10-02 23:06:37 +03:00
levlam
e6b7624811 Fix scanning of temporary directories. 2022-10-02 22:26:03 +03:00
levlam
097f3d42e1 Fix error code in on_upload_error/on_download_error. 2022-09-20 02:02:28 +03:00
levlam
ce1292ea32 Allow to always reuse photos from inputMessagePhoto. 2022-09-15 16:08:19 +03:00
levlam
ce9175a00b Always use "must be non-empty". 2022-09-10 22:48:34 +03:00
levlam
c6d5bbb151 Remove class AvailableReaction. 2022-09-08 17:45:19 +03:00
levlam
031e2246ec Add logging for too long file GC. 2022-08-30 12:05:38 +03:00
levlam
3318ffdb20 Proxy all option-related requests through G. 2022-08-17 16:11:13 +03:00
levlam
383359d767 Do not check local location when cancel file upload. 2022-08-15 13:13:23 +03:00
levlam
8f433070df Minor fixes. 2022-08-14 15:04:08 +03:00
levlam
36803d8d28 Improve 'Type of file mismatch' error messages. 2022-08-07 11:55:58 +03:00
levlam
a955e0b9df Improve FileType::operator<<. 2022-08-07 00:42:40 +03:00
levlam
2be350b8fe Support multiple sizes for audio album covers. 2022-08-05 22:43:53 +03:00
levlam
779090f4dd Add more WaitFree* classes usages. 2022-08-04 14:48:10 +03:00
levlam
90b04eb3b6 Use WaitFreeVector in FileManager. 2022-08-02 14:45:22 +03:00
levlam
ddbca1bb16 Use different resource limit for upload and download connections. 2022-07-28 17:34:29 +03:00
levlam
fac6b73999 Add audio.album_cover. 2022-07-28 17:11:51 +03:00
levlam
90df870adb Support audio thumbnail download. 2022-07-28 16:47:19 +03:00
levlam
3a275827e9 Add FileManager::is_remotely_generated_file and improve some names. 2022-07-28 15:59:57 +03:00
levlam
7d94cc9aa8 Remove some unneeded logging. 2022-07-20 18:01:26 +03:00
levlam
3afbce24b3 Disable getStorageStatisticsFast for bots to reduce disk usage in the main thread. 2022-07-23 23:50:28 +03:00
levlam
4cf1e02479 Add multiarg version of Scheduler::destroy_on_scheduler. 2022-07-22 21:21:30 +03:00
levlam
3ffe770d57 Fix generated file parsing. 2022-07-21 13:12:25 +03:00
levlam
4ac8be8122 Check local location of files when adding them to download manager. 2022-07-20 16:46:55 +03:00
levlam
0f87447ffc Asynchronously destroy some big data storages. 2022-07-20 13:40:14 +03:00
levlam
72bc285637 Delete from database information about unlinked files. 2022-07-16 17:25:28 +03:00
levlam
d75791481f Improve FileView::get_main_file_id() method name. 2022-07-03 12:01:08 +03:00
levlam
32bac7bd24 Move Promise to tdutils. 2022-06-27 13:30:18 +03:00
levlam
7153a17bd7 Don't check full local locations after loading file from database. 2022-06-24 14:59:42 +03:00
levlam
86c130a462 Minor fixes. 2022-06-21 02:55:53 +03:00
levlam
97d82e8edb Unlink files in FileLoadManager thread. 2022-06-16 13:32:14 +03:00
levlam
a1c3e09378 Log only unhandled file errors. 2022-06-16 13:07:31 +03:00
levlam
ed7b8f3a19 Move read_file_part to FileLoadManager thread. 2022-06-16 00:25:47 +03:00
levlam
62a97d8eb6 Simplify FileLoadManager::get_content. 2022-06-15 21:40:23 +03:00
levlam
388f3d0454 Lazily create file directories. 2022-06-15 16:23:46 +03:00
levlam
bdd70379f1 Simplify usage of create_from_temp and search_file. 2022-06-14 21:09:07 +03:00
levlam
09a39b4cb3 Ensure that parsed file size isn't negative. 2022-06-08 03:55:27 +03:00
levlam
848093c0c4 Check files of any size by hash. 2022-06-08 03:50:23 +03:00
levlam
bfcf52f87c Support MTPROTO_CLUSTER_INVALID error. 2022-06-06 20:36:15 +03:00
levlam
1e417ea212 Minor fixes. 2022-06-02 16:19:16 +03:00
levlam
0bc767f943 Pass max_resource_limit as parameter to ResourceManager. 2022-05-20 16:11:31 +03:00
levlam
0909f88bc3 Use int53 for file size in TDLib API. 2022-05-11 17:17:20 +03:00
levlam
81a8f832d3 Support 64-bit file size in server-side API. 2022-05-10 17:13:16 +03:00
levlam
ab6f2bd52f Remove logging of owner_dialog_id. 2022-05-31 16:19:08 +03:00
levlam
b4a643cffd Simplify file size error creation. 2022-05-31 15:12:40 +03:00
levlam
a282cce5d4 Add and use utf8_encode. 2022-05-31 15:08:16 +03:00
levlam
70050704d2 Remove unimplemented UploadCallback::on_progress. 2022-05-15 01:13:07 +03:00
levlam
4652292037 Use count instead of find if appropriate. 2022-05-01 23:03:06 +03:00
levlam
17275fe422 Output the number of objects to be freed on closing. 2022-04-25 20:52:44 +03:00
levlam
641ee080c1 Improve names of FileType::Secure. 2022-04-25 19:00:40 +03:00
levlam
a7bd57a793 Add checks for file_id/file_node_id overflow. 2022-04-25 17:33:31 +03:00
levlam
f76a9660ed Add can_reuse_remote_file to FileType.cpp. 2022-04-22 14:28:51 +03:00
levlam
f396cadc1a Add FileType::CallLog. 2022-04-21 22:34:26 +03:00