* update RG info less often

This commit is contained in:
Reinhard Pointner 2011-11-26 15:41:58 +00:00
parent 6fc3e009d8
commit 72e28299f0
2 changed files with 9 additions and 7 deletions

View File

@ -3,6 +3,7 @@ package net.sourceforge.filebot.mediainfo;
import static java.util.ResourceBundle.*;
import static java.util.concurrent.TimeUnit.*;
import static java.util.regex.Pattern.*;
import static net.sourceforge.tuned.StringUtilities.*;
@ -108,12 +109,12 @@ public class ReleaseInfo {
}
// fetch release group names online and try to update the data once per day
protected final CachedResource<String[]> releaseGroupResource = new CachedResource<String[]>(getBundle(getClass().getName()).getString("url.release-groups"), 24 * 60 * 60 * 1000) {
// fetch release group names online and try to update the data every other day
protected final CachedResource<String[]> releaseGroupResource = new CachedResource<String[]>(getBundle(getClass().getName()).getString("url.release-groups"), DAYS.toMillis(2)) {
@Override
public String[] process(ByteBuffer data) {
return compile("\\s").split(Charset.forName("UTF-8").decode(data));
return compile("\\s+").split(Charset.forName("UTF-8").decode(data));
}
};

View File

@ -231,13 +231,14 @@ class EpisodeListMatcher implements AutoCompleteMatcher {
// require user input if auto-detection has failed or has been disabled
if (episodes.isEmpty()) {
String suggestion = new SeriesNameMatcher().matchBySeasonEpisodePattern(getName(files.get(0)));
if (suggestion == null) {
if (suggestion != null) {
// clean media info / release group info / etc
suggestion = new ReleaseInfo().cleanRG(suggestion);
} else {
// use folder name
suggestion = files.get(0).getParentFile().getName();
}
// clean media info / release group info / etc
suggestion = new ReleaseInfo().cleanRG(suggestion);
String input = null;
synchronized (this) {
input = showInputDialog("Enter series name:", suggestion, files.get(0).getParentFile().getName(), window);