* ignore TryUploadSubtitles results (cause loads of clients submit the wrong imdb ids so we at least force new uploads with FileBot which is more likely to be correct)

This commit is contained in:
Reinhard Pointner 2014-05-18 10:02:35 +00:00
parent b99f159df3
commit b833f0e759
1 changed files with 7 additions and 10 deletions

View File

@ -49,7 +49,6 @@ import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableCellEditor; import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer; import javax.swing.table.TableCellRenderer;
import net.miginfocom.swing.MigLayout;
import net.filebot.Analytics; import net.filebot.Analytics;
import net.filebot.Language; import net.filebot.Language;
import net.filebot.ResourceManager; import net.filebot.ResourceManager;
@ -66,6 +65,7 @@ import net.filebot.web.SearchResult;
import net.filebot.web.TheTVDBClient.SeriesInfo; import net.filebot.web.TheTVDBClient.SeriesInfo;
import net.filebot.web.TheTVDBSearchResult; import net.filebot.web.TheTVDBSearchResult;
import net.filebot.web.VideoHashSubtitleService.CheckResult; import net.filebot.web.VideoHashSubtitleService.CheckResult;
import net.miginfocom.swing.MigLayout;
public class SubtitleUploadDialog extends JDialog { public class SubtitleUploadDialog extends JDialog {
@ -658,16 +658,13 @@ public class SubtitleUploadDialog extends JDialog {
mapping.setState(SubtitleMapping.Status.Checking); mapping.setState(SubtitleMapping.Status.Checking);
checkResult = database.checkSubtitle(mapping.getVideo(), mapping.getSubtitle()); checkResult = database.checkSubtitle(mapping.getVideo(), mapping.getSubtitle());
Analytics.trackEvent(database.getName(), "CheckSubtitle", null, checkResult.exists ? 1 : 0);
// accept identity hint from search result // if (checkResult.exists) {
mapping.setIdentity(checkResult.identity); // mapping.setIdentity(checkResult.identity);
// mapping.setLanguage(Language.getLanguage(checkResult.language)); // trust language hint only if upload not required
if (checkResult.exists) { // mapping.setState(SubtitleMapping.Status.AlreadyExists);
mapping.setLanguage(Language.getLanguage(checkResult.language)); // trust language hint only if upload not required // return checkResult;
mapping.setState(SubtitleMapping.Status.AlreadyExists); // }
return checkResult;
}
} }
if (mapping.getLanguage() == null) { if (mapping.getLanguage() == null) {