mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 08:48:51 -05:00
* fixed code paths that blocked the EDT
This commit is contained in:
parent
c45b6dfbd0
commit
ecf76afdb8
@ -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:
|
||||
|
@ -54,13 +54,10 @@ public class SubsceneSubtitleClient implements SubtitleProvider {
|
||||
|
||||
@Override
|
||||
public List<SearchResult> search(String query) throws IOException, SAXException {
|
||||
|
||||
URL searchUrl = new URL("http", host, "/filmsearch.aspx?q=" + encode(query));
|
||||
|
||||
Document dom = getHtmlDocument(searchUrl);
|
||||
|
||||
List<Node> nodes = selectNodes("id('filmSearch')/A", dom);
|
||||
|
||||
List<SearchResult> searchResults = new ArrayList<SearchResult>(nodes.size());
|
||||
|
||||
for (Node node : nodes) {
|
||||
@ -98,7 +95,6 @@ public class SubsceneSubtitleClient implements SubtitleProvider {
|
||||
@Override
|
||||
public List<SubtitleDescriptor> getSubtitleList(SearchResult searchResult, String languageName) throws Exception {
|
||||
URL subtitleListUrl = getSubtitleListLink(searchResult, languageName).toURL();
|
||||
|
||||
String languageFilter = null;
|
||||
|
||||
if (languageName != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user