Commit Graph

636 Commits

Author SHA1 Message Date
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
levlam
f6fd1f55cb Add and use get_file_type_class. 2022-04-21 22:14:12 +03:00
levlam
7fcd92a622 Move is_document_file_type to FileType.cpp. 2022-04-21 21:54:33 +03:00
levlam
497bc9006a Support setting files from secret chats as ringtones. 2022-04-15 14:37:01 +03:00
levlam
a16a5ec5e3 Support ringtone uploading. 2022-04-15 14:07:54 +03:00
levlam
42c6280321 Add addSavedNotificationSound. 2022-04-14 22:39:25 +03:00
levlam
3378131467 Add fileTypeNotificationSound. 2022-04-12 22:50:20 +03:00
levlam
1f38124861 Use FlatHashSet. 2022-03-11 21:38:48 +03:00
levlam
9526d2aa21 Add class td_api::downloadedFileCounts. 2022-03-05 04:11:18 +03:00
levlam
a79ae236bc Add new updates about file downloads. 2022-03-05 03:14:31 +03:00
Arseny Smirnov
f1cf7bdc3f DownloadManager: remove file when local file is removed 2022-03-03 17:07:20 +01:00
levlam
fdd218de4a Reset updateFileDownloads after all downloaded messages are viewed. 2022-03-03 13:44:05 +03:00
levlam
c9bd5d3651 Minor improvements. 2022-03-01 18:01:50 +03:00
Arseny Smirnov
52abb9c5d5 DownloadManager create unique callback for each download 2022-03-01 15:34:51 +01:00
levlam
1f300c50e0 DownloadManager fixes. 2022-02-28 18:25:07 +03:00
Arseny Smirnov
08675f2df1 FileManager: support limit={KEEP,IGNORE}_DOWNLOAD_LIMIT in download method 2022-02-28 13:15:00 +01:00
levlam
a3cef00551 DownloadManager fixes and improvements. 2022-02-27 18:23:06 +03:00
Arseny Smirnov
f13598ec83 DownloadManager: WIP 2022-02-26 19:56:43 +01:00
Arseny Smirnov
d4a4f5fb5d Proxy some updates about file to DownloadManger. 2022-02-25 23:17:30 +01:00
levlam
0fb84181ec Add mkv to the list of allowed video extensions. 2022-02-17 15:14:49 +03:00
levlam
f5d8e4de83 Use table_remove_if. 2022-02-10 12:23:52 +03:00
levlam
2b1314295d Check and fix half of FlatHashMap usages. 2022-02-10 00:59:52 +03:00
levlam
bcc2adeb47 Fix includes and formatting. 2022-02-08 00:04:34 +03:00
Arseny Smirnov
86bceb2972 td: replace most of std::unordered_map usages to td::FlatHashMap 2022-02-07 21:21:31 +01:00
levlam
02b99d0fbf Remove includes of SequenceDispatcher.h from headers. 2022-02-01 19:34:14 +03:00
Arseny Smirnov
ad38f712e8 SequenceDispatcher: hide usage into NetQueryDispatcher 2022-02-01 18:51:36 +03:00
levlam
b1b945e239 Minor fixes. 2022-01-31 15:56:44 +03:00
levlam
8085779cdc Update copyright year. 2022-01-01 03:35:39 +03:00
levlam
5801d6c695 Improve FileGcParameters field names. 2021-12-11 23:03:11 +03:00
levlam
340e0f0b85 Fix has/have spelling. 2021-12-02 14:15:37 +03:00
levlam
a6c0902ad7 Silence g++ warnings. 2021-12-01 16:01:27 +03:00
levlam
e52508bdc1 Add source to PhotoSizeSource::get_type. 2021-11-14 10:47:02 +03:00
levlam
b731414d42 Init some fields just in case. 2021-11-11 17:39:09 +03:00
levlam
00a349656d Unify td/telegram/include order. 2021-10-27 17:32:09 +03:00
levlam
6f34c5c6a1 Make PhotoSizeSource constructors named. 2021-10-27 16:52:22 +03:00
levlam
318b782c25 Fix may_reload_photo. 2021-10-28 12:57:26 +03:00
levlam
c0fb888c42 Fix GCC 4.9 compilation errors. 2021-10-24 02:09:36 +03:00
levlam
c24501f2d9 Reduce "this" usages. 2021-10-23 21:17:00 +03:00
levlam
9f44816a62 Minor improvements. 2021-10-21 12:51:16 +03:00
levlam
1e49f6dc13 Use auto as variable type if it is initialized with a cast. 2021-10-20 01:27:02 +03:00
levlam
db7aa28bdf A lot more minor improvements. 2021-10-19 18:11:16 +03:00
levlam
81b38d5607 Mark move constructors/assignment operators noexcept. 2021-10-18 14:36:15 +03:00
levlam
f35afe23c8 Minor warning fixes. 2021-10-18 12:57:13 +03:00
levlam
b1d61383ef Remove some logging for files. 2021-10-12 11:15:25 +03:00
levlam
4bfc3eb945 Remove logging of FileDb operations. 2021-10-12 10:52:37 +03:00
levlam
328c5b57d2 Add Global::request_aborted_error. 2021-10-07 16:36:21 +03:00
levlam
3b794126d8 Avoid G usage in lambda promises. 2021-10-07 15:28:52 +03:00
levlam
b34cfef4d0 Replace begin_transaction with begin_read_transaction and begin_write_transaction. 2021-10-07 13:18:00 +03:00
levlam
c5a2e9a870 Load only chats with known info in MessagesManager::load_dialogs. 2021-09-26 19:38:27 +03:00
levlam
d882e222a7 Make FileStats fields private. 2021-09-26 12:44:18 +03:00
levlam
db18baa503 Unify include order. 2021-09-19 00:47:05 +03:00
levlam
6801eabb8d Add some FileView emptiness checks. 2021-09-16 16:58:30 +03:00
levlam
088c3169d4 Minor. 2021-09-10 18:23:23 +03:00
levlam
86de43a048 Remove useless #include comments. 2021-09-03 23:21:44 +03:00
levlam
b1eb6db7b5 Minor logging improvements. 2021-08-26 21:44:29 +03:00
levlam
209dd8b41b Don't drop fully uploaded partial secure location. 2021-08-26 21:20:55 +03:00
levlam
897a4e26a7 Allow RemoteFileLocation logging. 2021-08-26 20:34:51 +03:00
levlam
5b4a657228 Minor include fixes. 2021-08-05 01:09:39 +03:00
levlam
c2028aed4f Add limit on maximum videoNote size. 2021-07-29 23:39:07 +03:00
levlam
07630feb8c Add td_api::getSuggestedFileName. 2021-07-24 07:19:22 +03:00
levlam
8e750b867c Simplify PSLICE usage in FileLoaderUtils. 2021-07-23 20:56:44 +03:00
levlam
85fab586ef Increase file size for reuse_uploaded_photos_by_hash just in case. 2021-07-21 03:26:47 +03:00
levlam
2a9f83cd94 Don't dup URL file identifiers. 2021-07-21 03:16:55 +03:00