Skip to content

Commit

Permalink
8.13
Browse files Browse the repository at this point in the history
#600 

Fix pre-pro bar
  • Loading branch information
tonikelope committed Oct 30, 2023
1 parent 02d5582 commit e255bf2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId>
<version>8.12</version>
<version>8.13</version>
<packaging>jar</packaging>
<repositories>
<repository>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/tonikelope/megabasterd/MainPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
*/
public final class MainPanel {

public static final String VERSION = "8.12";
public static final String VERSION = "8.13";
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 DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/tonikelope/megabasterd/MegaAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ private String getCachedFolderNodes(String folder_id) {
LOG.log(Level.INFO, "MEGA FOLDER {0} USING CACHED JSON FILE TREE", new Object[]{folder_id});

try {
return Files.readString(Paths.get(file_path));
return new String(Files.readAllBytes(Paths.get(file_path)), "UTF-8");
} catch (IOException ex) {
Logger.getLogger(MegaAPI.class.getName()).log(Level.SEVERE, null, ex);
}
Expand All @@ -1077,7 +1077,7 @@ private void writeCachedFolderNodes(String folder_id, String res) {
String file_path = System.getProperty("java.io.tmpdir") + File.separator + "megabasterd_folder_cache_" + folder_id;

try {
Files.writeString(Paths.get(file_path), res);
Files.write(Paths.get(file_path), res.getBytes());
} catch (IOException ex) {
Logger.getLogger(MegaAPI.class.getName()).log(Level.SEVERE, null, ex);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,12 @@ private void _updateView() {

if (this instanceof DownloadManager) {

this._main_panel.getView().getForce_chunk_reset_button().setVisible(MainPanel.isUse_smart_proxy() && !getTransference_running_list().isEmpty());
this._main_panel.getView().getCancel_all_downloads_menu().setEnabled(!_transference_preprocess_queue.isEmpty() || !_transference_provision_queue.isEmpty() || !getTransference_waitstart_queue().isEmpty() || !getTransference_running_list().isEmpty());
_main_panel.getView().getForce_chunk_reset_button().setVisible(MainPanel.isUse_smart_proxy() && !getTransference_running_list().isEmpty());
_main_panel.getView().getCancel_all_downloads_menu().setEnabled(!_transference_preprocess_queue.isEmpty() || !_transference_provision_queue.isEmpty() || !getTransference_waitstart_queue().isEmpty() || !getTransference_running_list().isEmpty());
_main_panel.getView().getDownload_status_bar().setVisible(!_transference_preprocess_global_queue.isEmpty() || !_transference_preprocess_queue.isEmpty() || !_transference_provision_queue.isEmpty());

} else {
_main_panel.getView().getUpload_status_bar().setVisible(!_transference_preprocess_global_queue.isEmpty() || !_transference_preprocess_queue.isEmpty() || !_transference_provision_queue.isEmpty());
}

if (_paused_all) {
Expand Down
Binary file modified src/main/resources/images/mbasterd_screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e255bf2

Please sign in to comment.