Skip to content

Commit

Permalink
Revert "feat: added AutoLibraryUpdate Progress"
Browse files Browse the repository at this point in the history
This reverts commit 5a59617.
  • Loading branch information
hizumiaoba committed Jul 20, 2021
1 parent 5a59617 commit 0935ce9
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions src/com/ranfa/main/DelesteRandomSelector.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,48 +153,6 @@ public DelesteRandomSelector() {
}
}, es);
LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[DEBUG]: " + "Version:" + getVersion());
if(property.isCheckLibraryUpdates()) {
LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[INFO]: " + "Checking for library updates...");
ArrayList<Song> updatesWebTmp = new ArrayList<Song>();
ArrayList<Song> updatesLocalTmp = new ArrayList<Song>();
if(getWholeDataFuture.isDone()) {
updatesWebTmp = wholeDataList;
} else {
try {
updatesWebTmp = getWholeDataFuture.get();
} catch (InterruptedException e) {
LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[FATAL]: " + e.getLocalizedMessage());
JOptionPane.showMessageDialog(null, "[InterruptedException]Exception in Thread:" + Thread.currentThread() + "\n" + e.getLocalizedMessage());
} catch (ExecutionException e) {
LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[WARN]: " + e.getLocalizedMessage());
JOptionPane.showMessageDialog(null, "[ExecutionException]Exception in Thread:" + Thread.currentThread() + "\n" + e.getLocalizedMessage());
}
}
LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[INFO]: " + "Web data scan completed.\nSize:" + updatesWebTmp.size());
if(getFromJsonFuture.isDone()) {
updatesLocalTmp = fromJsonList;
} else {
try {
updatesLocalTmp = getFromJsonFuture.get();
} catch (InterruptedException e) {
LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[FATAL]: " + e.getLocalizedMessage());
JOptionPane.showMessageDialog(null, "[InterruptedException]Exception in Thread:" + Thread.currentThread() + "\n" + e.getLocalizedMessage());
} catch (ExecutionException e) {
LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[WARN]: " + e.getLocalizedMessage());
JOptionPane.showMessageDialog(null, "[ExecutionException]Exception in Thread:" + Thread.currentThread() + "\n" + e.getLocalizedMessage());
}
}
LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[INFO]: " + "Current json data scan completed.\nSize:" + updatesLocalTmp.size());
if(updatesWebTmp.size() > updatesLocalTmp.size()) {
LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[INFO]: " + "Song update detected.\nInitiate update progress...");
Scraping.writeToJson(updatesWebTmp);
fromJsonList.clear();
fromJsonList.addAll(updatesWebTmp);
LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[INFO]: " + "Update progress compeleted.Initiate GUI.");
} else {
LimitedLog.println("[" + Thread.currentThread().toString() + "]:" + this.getClass() + ":[INFO]: " + "No updates found.Initiate GUI.");
}
}
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 640, 360);
contentPane = new JPanel();
Expand Down

0 comments on commit 0935ce9

Please sign in to comment.