This commit is contained in:
tonikelope 2023-10-19 21:04:19 +02:00
parent f54614badd
commit c1b65e120d
14 changed files with 15 additions and 21 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId> <groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId> <artifactId>MegaBasterd</artifactId>
<version>7.96</version> <version>7.97</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<repositories> <repositories>
<repository> <repository>

View File

@ -39,7 +39,7 @@ public class ChunkDownloader implements Runnable, SecureSingleThreadNotifiable {
private final Object _secure_notify_lock; private final Object _secure_notify_lock;
private volatile boolean _error_wait; private volatile boolean _error_wait;
private volatile boolean _chunk_exception; private volatile boolean _chunk_exception;
private boolean _notified; private volatile boolean _notified;
private final ArrayList<String> _excluded_proxy_list; private final ArrayList<String> _excluded_proxy_list;
private volatile boolean _reset_current_chunk; private volatile boolean _reset_current_chunk;
private volatile InputStream _chunk_inputstream = null; private volatile InputStream _chunk_inputstream = null;

View File

@ -41,7 +41,7 @@ public class ChunkUploader implements Runnable, SecureSingleThreadNotifiable {
private volatile boolean _exit; private volatile boolean _exit;
private final Object _secure_notify_lock; private final Object _secure_notify_lock;
private volatile boolean _error_wait; private volatile boolean _error_wait;
private boolean _notified; private volatile boolean _notified;
private volatile boolean _chunk_exception; private volatile boolean _chunk_exception;
public ChunkUploader(int id, Upload upload) { public ChunkUploader(int id, Upload upload) {

View File

@ -75,7 +75,7 @@ public class ChunkWriterManager implements Runnable, SecureSingleThreadNotifiabl
private final byte[] _byte_iv; private final byte[] _byte_iv;
private volatile boolean _exit; private volatile boolean _exit;
private final Object _secure_notify_lock; private final Object _secure_notify_lock;
private boolean _notified; private volatile boolean _notified;
private final String _chunks_dir; private final String _chunks_dir;
public ChunkWriterManager(Download downloader) throws Exception { public ChunkWriterManager(Download downloader) throws Exception {
@ -240,13 +240,7 @@ public class ChunkWriterManager implements Runnable, SecureSingleThreadNotifiabl
LOG.log(Level.INFO, "{0} ChunkWriterManager waiting for chunk [{1}] {2}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written + 1, _download.getFile_name()}); LOG.log(Level.INFO, "{0} ChunkWriterManager waiting for chunk [{1}] {2}...", new Object[]{Thread.currentThread().getName(), _last_chunk_id_written + 1, _download.getFile_name()});
try { secureWait();
synchronized (_secure_notify_lock) {
_secure_notify_lock.wait(1000);
}
} catch (InterruptedException ex) {
Logger.getLogger(ChunkWriterManager.class.getName()).log(Level.SEVERE, null, ex);
}
} }

View File

@ -30,7 +30,7 @@ public class ClipboardSpy implements Runnable, ClipboardOwner, SecureSingleThrea
private final Clipboard _sysClip; private final Clipboard _sysClip;
private boolean _notified; private volatile boolean _notified;
private final ConcurrentLinkedQueue<ClipboardChangeObserver> _observers; private final ConcurrentLinkedQueue<ClipboardChangeObserver> _observers;

View File

@ -72,7 +72,7 @@ public class Download implements Transference, Runnable, SecureSingleThreadNotif
private final Object _chunkid_lock; private final Object _chunkid_lock;
private final Object _dl_url_lock; private final Object _dl_url_lock;
private final Object _turbo_proxy_lock; private final Object _turbo_proxy_lock;
private boolean _notified; private volatile boolean _notified;
private final String _url; private final String _url;
private final String _download_path; private final String _download_path;
private final String _custom_chunks_dir; private final String _custom_chunks_dir;
@ -1526,7 +1526,7 @@ public class Download implements Transference, Runnable, SecureSingleThreadNotif
_auto_retry_on_error = Arrays.asList(FATAL_API_ERROR_CODES_WITH_RETRY).contains(error_code); _auto_retry_on_error = Arrays.asList(FATAL_API_ERROR_CODES_WITH_RETRY).contains(error_code);
stopDownloader(ex.getMessage() + " " + truncateText(link, 80)); stopDownloader(error_code == -16 ? _status_error : ex.getMessage() + " " + truncateText(link, 80));
} else { } else {

View File

@ -50,7 +50,7 @@ public class KissVideoStreamServer implements HttpHandler, SecureSingleThreadNot
private final ConcurrentHashMap<String, HashMap<String, Object>> _link_cache; private final ConcurrentHashMap<String, HashMap<String, Object>> _link_cache;
private final ConcurrentLinkedQueue<Thread> _working_threads; private final ConcurrentLinkedQueue<Thread> _working_threads;
private final ContentType _ctype; private final ContentType _ctype;
private boolean _notified; private volatile boolean _notified;
private final Object _secure_notify_lock; private final Object _secure_notify_lock;
public KissVideoStreamServer(MainPanel panel) { public KissVideoStreamServer(MainPanel panel) {

View File

@ -70,7 +70,7 @@ import javax.swing.UIManager;
*/ */
public final class MainPanel { public final class MainPanel {
public static final String VERSION = "7.96"; public static final String VERSION = "7.97";
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
public static final int THROTTLE_SLICE_SIZE = 16 * 1024; public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024; public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;

View File

@ -24,7 +24,7 @@ public class ProgressMeter implements Runnable, SecureSingleThreadNotifiable {
private final Transference _transference; private final Transference _transference;
private volatile boolean _exit; private volatile boolean _exit;
private final Object _secure_notify_lock; private final Object _secure_notify_lock;
private boolean _notified; private volatile boolean _notified;
private long _progress; private long _progress;
ProgressMeter(Transference transference) { ProgressMeter(Transference transference) {

View File

@ -28,7 +28,7 @@ public interface Transference {
boolean LIMIT_TRANSFERENCE_SPEED_DEFAULT = false; boolean LIMIT_TRANSFERENCE_SPEED_DEFAULT = false;
int MAX_TRANSFERENCE_SPEED_DEFAULT = 5; int MAX_TRANSFERENCE_SPEED_DEFAULT = 5;
int MAX_WAIT_WORKERS_SHUTDOWN = 15; int MAX_WAIT_WORKERS_SHUTDOWN = 15;
Integer[] FATAL_API_ERROR_CODES = {-2, -4, -8, -14, -15, -17, 22, 23, 24}; Integer[] FATAL_API_ERROR_CODES = {-2, -4, -8, -14, -15, -16, -17, 22, 23, 24};
Integer[] FATAL_API_ERROR_CODES_WITH_RETRY = {-4}; Integer[] FATAL_API_ERROR_CODES_WITH_RETRY = {-4};
void start(); void start();

View File

@ -51,7 +51,7 @@ abstract public class TransferenceManager implements Runnable, SecureSingleThrea
private final Object _secure_notify_lock; private final Object _secure_notify_lock;
private final Object _wait_queue_lock; private final Object _wait_queue_lock;
private final Object _pause_all_lock; private final Object _pause_all_lock;
private boolean _notified; private volatile boolean _notified;
private volatile boolean _removing_transferences; private volatile boolean _removing_transferences;
private volatile boolean _provisioning_transferences; private volatile boolean _provisioning_transferences;
private volatile boolean _starting_transferences; private volatile boolean _starting_transferences;

View File

@ -64,7 +64,7 @@ public class Upload implements Transference, Runnable, SecureSingleThreadNotifia
private final ExecutorService _thread_pool; private final ExecutorService _thread_pool;
private volatile int[] _file_meta_mac; private volatile int[] _file_meta_mac;
private String _fid; private String _fid;
private boolean _notified; private volatile boolean _notified;
private volatile String _completion_handler; private volatile String _completion_handler;
private int _paused_workers; private int _paused_workers;
private Double _progress_bar_rate; private Double _progress_bar_rate;

View File

@ -31,7 +31,7 @@ public class UploadMACGenerator implements Runnable, SecureSingleThreadNotifiabl
private final Upload _upload; private final Upload _upload;
private final Object _secure_notify_lock; private final Object _secure_notify_lock;
private boolean _notified; private volatile boolean _notified;
private volatile boolean _exit; private volatile boolean _exit;
public final ConcurrentHashMap<Long, ByteArrayOutputStream> CHUNK_QUEUE = new ConcurrentHashMap<>(); public final ConcurrentHashMap<Long, ByteArrayOutputStream> CHUNK_QUEUE = new ConcurrentHashMap<>();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 KiB

After

Width:  |  Height:  |  Size: 207 KiB