diff --git a/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java b/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java index 05035fb..dcae245 100644 --- a/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java +++ b/src/main/java/de/fabianonline/telegram_backup/DownloadManager.java @@ -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 { diff --git a/src/main/java/de/fabianonline/telegram_backup/mediafilemanager/PhotoFileManager.java b/src/main/java/de/fabianonline/telegram_backup/mediafilemanager/PhotoFileManager.java index b0110ad..7833e35 100644 --- a/src/main/java/de/fabianonline/telegram_backup/mediafilemanager/PhotoFileManager.java +++ b/src/main/java/de/fabianonline/telegram_backup/mediafilemanager/PhotoFileManager.java @@ -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"; }