1
0
mirror of https://github.com/fabianonline/telegram_backup.git synced 2024-12-25 22:35:35 +00:00

Better command line output during media download.

This commit is contained in:
Fabian Schlenz 2016-07-04 09:32:53 +02:00
parent 28965277e7
commit 95e74c58eb

View File

@ -6,11 +6,21 @@ class CommandLineDownloadProgress implements DownloadProgressInterface {
private int mediaCount = 0;
private int i = 0;
public void onMessageDownloadStart(int count) { System.out.println("Downloading " + count + " messages."); }
public void onMessageDownloaded(int number) { System.out.print("" + number + "..."); }
public void onMessageDownloadStart(int count) { i=0; System.out.println("Downloading " + count + " messages."); }
public void onMessageDownloaded(int number) { i+=number; System.out.print("..." + i); }
public void onMessageDownloadFinished() { System.out.println(" done."); }
public void onMediaDownloadStart(int count) { i = 0; mediaCount = count; System.out.println("Checking " + count + " media."); }
public void onMediaDownloadStart(int count) {
i = 0;
mediaCount = count;
System.out.println("Checking and downloading media.");
System.out.println("Legend:");
System.out.println("'V' - Video 'P' - Photo 'D' - Document");
System.out.println("'S' - Sticker 'A' - Audio");
System.out.println("'.' - Previously downloaded file");
System.out.println("' ' - Ignored media type (location or website, for example)");
System.out.println("" + count + " Files to check / download");
}
public void onMediaDownloadedVideo(boolean n) { show(n, 'V'); }
public void onMediaDownloadedPhoto(boolean n) { show(n, 'P'); }