From ecf76afdb89b252e6f64ae142573e4aa26d41b6d Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 23 Nov 2011 15:44:06 +0000 Subject: [PATCH] * fixed code paths that blocked the EDT --- .../ui/subtitle/SubtitlePackageCellRenderer.java | 10 +--------- .../filebot/web/SubsceneSubtitleClient.java | 4 ---- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/source/net/sourceforge/filebot/ui/subtitle/SubtitlePackageCellRenderer.java b/source/net/sourceforge/filebot/ui/subtitle/SubtitlePackageCellRenderer.java index 58fc57cb..816768e0 100644 --- a/source/net/sourceforge/filebot/ui/subtitle/SubtitlePackageCellRenderer.java +++ b/source/net/sourceforge/filebot/ui/subtitle/SubtitlePackageCellRenderer.java @@ -2,8 +2,6 @@ package net.sourceforge.filebot.ui.subtitle; -import static net.sourceforge.filebot.MediaTypes.*; - import java.awt.Color; import java.awt.Insets; @@ -14,7 +12,6 @@ import javax.swing.border.CompoundBorder; import net.miginfocom.swing.MigLayout; import net.sourceforge.filebot.ResourceManager; -import net.sourceforge.filebot.vfs.ArchiveType; import net.sourceforge.tuned.ui.AbstractFancyListCellRenderer; import net.sourceforge.tuned.ui.DashedSeparator; @@ -63,12 +60,7 @@ class SubtitlePackageCellRenderer extends AbstractFancyListCellRenderer { private Icon getIcon(SubtitlePackage subtitle) { switch (subtitle.getDownload().getPhase()) { case PENDING: - if (ArchiveType.forName(subtitle.getType()) != ArchiveType.UNDEFINED || SUBTITLE_FILES.acceptExtension(subtitle.getType())) { - return ResourceManager.getIcon("bullet.green"); - } - - // unsupported archive or unknown subtitle type - return ResourceManager.getIcon("bullet.yellow"); + return ResourceManager.getIcon("bullet.green"); case WAITING: return ResourceManager.getIcon("worker.pending"); case DOWNLOADING: diff --git a/source/net/sourceforge/filebot/web/SubsceneSubtitleClient.java b/source/net/sourceforge/filebot/web/SubsceneSubtitleClient.java index d32ce534..2aee84ad 100644 --- a/source/net/sourceforge/filebot/web/SubsceneSubtitleClient.java +++ b/source/net/sourceforge/filebot/web/SubsceneSubtitleClient.java @@ -54,13 +54,10 @@ public class SubsceneSubtitleClient implements SubtitleProvider { @Override public List search(String query) throws IOException, SAXException { - URL searchUrl = new URL("http", host, "/filmsearch.aspx?q=" + encode(query)); - Document dom = getHtmlDocument(searchUrl); List nodes = selectNodes("id('filmSearch')/A", dom); - List searchResults = new ArrayList(nodes.size()); for (Node node : nodes) { @@ -98,7 +95,6 @@ public class SubsceneSubtitleClient implements SubtitleProvider { @Override public List getSubtitleList(SearchResult searchResult, String languageName) throws Exception { URL subtitleListUrl = getSubtitleListLink(searchResult, languageName).toURL(); - String languageFilter = null; if (languageName != null) {