mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-11-22 08:46:15 +00:00
Photos also have a dcId. Use it to prevent unnecessary FILE_MIGRATE_* stuff.
This commit is contained in:
parent
7181ec69d3
commit
3546127690
@ -258,9 +258,9 @@ public class DownloadManager {
|
||||
return a;
|
||||
}
|
||||
|
||||
public static void downloadFile(TelegramClient client, String targetFilename, int size, long volumeId, int localId, long secret) throws RpcErrorException, IOException {
|
||||
public static void downloadFile(TelegramClient client, String targetFilename, int size, int dcId, long volumeId, int localId, long secret) throws RpcErrorException, IOException {
|
||||
TLInputFileLocation loc = new TLInputFileLocation(volumeId, localId, secret);
|
||||
downloadFileFromDc(client, targetFilename, loc, null, size);
|
||||
downloadFileFromDc(client, targetFilename, loc, dcId, size);
|
||||
}
|
||||
|
||||
public static void downloadFile(TelegramClient client, String targetFilename, int size, int dcId, long id, long accessHash) throws RpcErrorException, IOException {
|
||||
|
@ -79,7 +79,7 @@ public class PhotoFileManager extends AbstractMediaFileManager {
|
||||
public void download() throws RpcErrorException, IOException {
|
||||
if (isEmpty) return;
|
||||
TLFileLocation loc = (TLFileLocation) size.getLocation();
|
||||
DownloadManager.downloadFile(client, getTargetPathAndFilename(), getSize(), loc.getVolumeId(), loc.getLocalId(), loc.getSecret());
|
||||
DownloadManager.downloadFile(client, getTargetPathAndFilename(), getSize(), loc.getDcId(), loc.getVolumeId(), loc.getLocalId(), loc.getSecret());
|
||||
}
|
||||
|
||||
public String getLetter() { return "p"; }
|
||||
|
Loading…
Reference in New Issue
Block a user