mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
Export media, updates and stream parts through media cluster.
This commit is contained in:
parent
0c627e7ca0
commit
0be320a6c7
@ -62,6 +62,14 @@ inline constexpr bool isDownloadDcId(ShiftedDcId shiftedDcId) {
|
||||
&& (shiftedDcId < details::downloadDcId(0, kMaxMediaDcCount - 1) + kDcShift);
|
||||
}
|
||||
|
||||
inline constexpr bool isMediaClusterDcId(ShiftedDcId shiftedDcId) {
|
||||
const auto shift = GetDcIdShift(shiftedDcId);
|
||||
return isDownloadDcId(shiftedDcId)
|
||||
|| (shift == kGroupCallStreamDcShift)
|
||||
|| (shift == kExportMediaDcShift)
|
||||
|| (shift == kUpdaterDcShift);
|
||||
}
|
||||
|
||||
inline bool isCdnDc(MTPDdcOption::Flags flags) {
|
||||
return (flags & MTPDdcOption::Flag::f_cdn);
|
||||
}
|
||||
|
@ -604,7 +604,7 @@ DcType DcOptions::dcType(ShiftedDcId shiftedDcId) const {
|
||||
return DcType::Cdn;
|
||||
}
|
||||
const auto dcId = BareDcId(shiftedDcId);
|
||||
if (isDownloadDcId(shiftedDcId) && hasMediaOnlyOptionsFor(dcId)) {
|
||||
if (isMediaClusterDcId(shiftedDcId) && hasMediaOnlyOptionsFor(dcId)) {
|
||||
return DcType::MediaCluster;
|
||||
}
|
||||
return DcType::Regular;
|
||||
|
@ -223,7 +223,7 @@ void SessionPrivate::appendTestConnection(
|
||||
});
|
||||
});
|
||||
|
||||
const auto protocolForFiles = isDownloadDcId(_shiftedDcId)
|
||||
const auto protocolForFiles = isMediaClusterDcId(_shiftedDcId)
|
||||
//|| isUploadDcId(_shiftedDcId)
|
||||
|| (_realDcType == DcType::Cdn);
|
||||
const auto protocolDcId = getProtocolDcId();
|
||||
|
Loading…
Reference in New Issue
Block a user