* fix performance / blocking issues
This commit is contained in:
parent
1f0efe713f
commit
2793321715
|
@ -16,8 +16,6 @@ import java.awt.geom.Rectangle2D;
|
|||
import java.awt.geom.RoundRectangle2D;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.swing.DefaultListCellRenderer;
|
||||
import javax.swing.JList;
|
||||
|
@ -26,7 +24,6 @@ import javax.swing.border.EmptyBorder;
|
|||
|
||||
import net.miginfocom.swing.MigLayout;
|
||||
import net.sourceforge.filebot.ResourceManager;
|
||||
import net.sourceforge.filebot.media.MediaDetection;
|
||||
import net.sourceforge.filebot.similarity.Match;
|
||||
import net.sourceforge.filebot.similarity.MetricCascade;
|
||||
import net.sourceforge.filebot.similarity.MetricMin;
|
||||
|
@ -225,14 +222,6 @@ class RenameListCellRenderer extends DefaultFancyListCellRenderer {
|
|||
return "Folder";
|
||||
}
|
||||
|
||||
try {
|
||||
if (MediaDetection.getClutterFileFilter().accept(file)) {
|
||||
return "Sample";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
Logger.getLogger(getClass().getName()).log(Level.WARNING, e.getMessage());
|
||||
}
|
||||
|
||||
String extension = FileUtilities.getExtension(file);
|
||||
if (extension != null) {
|
||||
return extension.toLowerCase();
|
||||
|
|
|
@ -94,7 +94,7 @@ public abstract class CachedResource<T extends Serializable> {
|
|||
try {
|
||||
long lastModified = element != null ? lastUpdateTime : 0;
|
||||
URL url = new URL(resource);
|
||||
data = fetch(url, lastModified);
|
||||
data = fetch(url, lastModified, element != null ? 0 : retryCountLimit);
|
||||
} catch (IOException e) {
|
||||
networkException = e;
|
||||
} catch (InterruptedException e) {
|
||||
|
@ -140,15 +140,17 @@ public abstract class CachedResource<T extends Serializable> {
|
|||
}
|
||||
|
||||
|
||||
protected ByteBuffer fetch(URL url, long lastModified) throws IOException, InterruptedException {
|
||||
for (int i = 0; retryCountLimit < 0 || i <= retryCountLimit; i++) {
|
||||
protected ByteBuffer fetch(URL url, long lastModified, int retries) throws IOException, InterruptedException {
|
||||
for (int i = 0; retries < 0 || i <= retries; i++) {
|
||||
try {
|
||||
if (i > 0) {
|
||||
Thread.sleep(retryWaitTime);
|
||||
}
|
||||
return fetchData(url, lastModified);
|
||||
} catch (IOException e) {
|
||||
if (i >= 0 && i >= retryCountLimit) {
|
||||
if (i >= 0 && i >= retries) {
|
||||
throw e;
|
||||
}
|
||||
Thread.sleep(retryWaitTime);
|
||||
}
|
||||
}
|
||||
return null; // can't happen
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
|
||||
<div class="content">
|
||||
<div class="screenshot screencast">
|
||||
<a onclick="_gaq.push(['_trackPageview', '/video/tutorial'])" href="http://www.youtube.com/watch?v=zcSFKiwFLZw" title="How to use FileBot" target="_blank">
|
||||
<a onclick="_gaq.push(['_trackPageview', '/video/tutorial'])" href="http://www.youtube.com/watch?v=zcSFKiwFLZw&list=PLAeKsKcI7rapWVLl-Oy4wx_-5RoMclWPt" title="How to use FileBot" target="_blank">
|
||||
<img class="play" alt="play" src="images/play.png" width="16" height="16" />
|
||||
<img alt="screenshot" src="screenshots/medium/panel.rename.png" width="300" height="238" />
|
||||
</a>
|
||||
|
|
|
@ -89,6 +89,11 @@
|
|||
"date": "2011-02-18",
|
||||
"text": "best app on series renaming i could find"
|
||||
},
|
||||
{
|
||||
"user": "Camping chair reviews",
|
||||
"date": "2013-03-23",
|
||||
"text": "One of the best (if not the best) multiplatform episode renamer/subtitle downloader"
|
||||
},
|
||||
{
|
||||
"user": "Jan",
|
||||
"date": "2013-03-21",
|
||||
|
|
Loading…
Reference in New Issue