diff --git a/td/generate/scheme/td_api.tl b/td/generate/scheme/td_api.tl index f85024893..b93a7be62 100644 --- a/td/generate/scheme/td_api.tl +++ b/td/generate/scheme/td_api.tl @@ -2579,7 +2579,8 @@ networkStatistics since_date:int32 entries:vector = Netw //@preload_large_videos True, if the beginning of videos needs to be preloaded for instant playback //@preload_next_audio True, if the next audio track needs to be preloaded while the user is listening to an audio file //@use_less_data_for_calls True, if "use less data for calls" option needs to be enabled -autoDownloadSettings is_auto_download_enabled:Bool max_photo_file_size:int32 max_video_file_size:int32 max_other_file_size:int32 preload_large_videos:Bool preload_next_audio:Bool use_less_data_for_calls:Bool = AutoDownloadSettings; +//@max_video_upload_bitrate Maximum suggested bitrate for uploaded videos +autoDownloadSettings is_auto_download_enabled:Bool max_photo_file_size:int32 max_video_file_size:int32 max_other_file_size:int32 max_video_upload_bitrate:int32 preload_large_videos:Bool preload_next_audio:Bool use_less_data_for_calls:Bool = AutoDownloadSettings; //@description Contains auto-download settings presets for the user //@low Preset with lowest settings; supposed to be used by default when roaming diff --git a/td/generate/scheme/td_api.tlo b/td/generate/scheme/td_api.tlo index a6329b146..de3de4f0e 100644 Binary files a/td/generate/scheme/td_api.tlo and b/td/generate/scheme/td_api.tlo differ diff --git a/td/telegram/AutoDownloadSettings.cpp b/td/telegram/AutoDownloadSettings.cpp index d9faa51de..472c46e95 100644 --- a/td/telegram/AutoDownloadSettings.cpp +++ b/td/telegram/AutoDownloadSettings.cpp @@ -26,8 +26,8 @@ static td_api::object_ptr convert_auto_download_se auto audio_preload_next = (flags & telegram_api::autoDownloadSettings::AUDIO_PRELOAD_NEXT_MASK) != 0; auto phonecalls_less_data = (flags & telegram_api::autoDownloadSettings::PHONECALLS_LESS_DATA_MASK) != 0; return td_api::make_object( - !disabled, settings->photo_size_max_, settings->video_size_max_, settings->file_size_max_, video_preload_large, - audio_preload_next, phonecalls_less_data); + !disabled, settings->photo_size_max_, settings->video_size_max_, settings->file_size_max_, + settings->video_upload_maxbitrate_, video_preload_large, audio_preload_next, phonecalls_less_data); } class GetAutoDownloadSettingsQuery : public Td::ResultHandler { @@ -76,7 +76,7 @@ telegram_api::object_ptr get_input_auto_down } return telegram_api::make_object( flags, false /*ignored*/, false /*ignored*/, false /*ignored*/, false /*ignored*/, settings.max_photo_file_size, - settings.max_video_file_size, settings.max_other_file_size, 0); + settings.max_video_file_size, settings.max_other_file_size, settings.max_video_upload_bitrate); } class SaveAutoDownloadSettingsQuery : public Td::ResultHandler { @@ -119,6 +119,7 @@ AutoDownloadSettings get_auto_download_settings(const td_api::object_ptrmax_photo_file_size_; result.max_video_file_size = settings->max_video_file_size_; result.max_other_file_size = settings->max_other_file_size_; + result.max_video_upload_bitrate = settings->max_video_upload_bitrate_; result.is_enabled = settings->is_auto_download_enabled_; result.preload_large_videos = settings->preload_large_videos_; result.preload_next_audio = settings->preload_next_audio_; diff --git a/td/telegram/AutoDownloadSettings.h b/td/telegram/AutoDownloadSettings.h index 3ea5476f3..dd9e47da7 100644 --- a/td/telegram/AutoDownloadSettings.h +++ b/td/telegram/AutoDownloadSettings.h @@ -22,6 +22,7 @@ class AutoDownloadSettings { int32 max_photo_file_size = 0; int32 max_video_file_size = 0; int32 max_other_file_size = 0; + int32 max_video_upload_bitrate = 0; bool is_enabled = false; bool preload_large_videos = false; bool preload_next_audio = false;