From 117b3be318a925eea380dad3daf3923a5a48fc5d Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 12 Mar 2016 13:46:42 +0000 Subject: [PATCH] Added -Durl.refresh=PT0S system property for testing --- build-data/BuildData.groovy | 8 ++++++++ source/net/filebot/media/ReleaseInfo.java | 2 +- source/net/filebot/util/SystemProperty.java | 4 +--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/build-data/BuildData.groovy b/build-data/BuildData.groovy index f512dda6..1d887074 100755 --- a/build-data/BuildData.groovy +++ b/build-data/BuildData.groovy @@ -11,6 +11,8 @@ def dir_root = ".." def dir_website = "${dir_root}/website" def dir_data = "${dir_website}/data" +new File(dir_data).mkdirs() + // sort and check shared regex collections ['add-series-alias.txt', 'exclude-blacklist.txt', @@ -119,6 +121,12 @@ def csv(f, delim, keyIndex, valueIndex) { } +/* ------------------------------------------------------------------------- */ + +if (_args.mode == /no-index/) { + return +} + /* ------------------------------------------------------------------------- */ diff --git a/source/net/filebot/media/ReleaseInfo.java b/source/net/filebot/media/ReleaseInfo.java index be48b11c..6212e688 100644 --- a/source/net/filebot/media/ReleaseInfo.java +++ b/source/net/filebot/media/ReleaseInfo.java @@ -412,7 +412,7 @@ public class ReleaseInfo { protected final Resource movieIndex = tsv("url.movie-list", Cache.ONE_MONTH, this::parseMovie, Movie[]::new); protected final Resource osdbIndex = tsv("url.osdb-index", Cache.ONE_MONTH, this::parseSubtitle, SubtitleSearchResult[]::new); - protected final SystemProperty refreshDuration = new SystemProperty("url.refresh", Duration::parse, null); + protected final SystemProperty refreshDuration = SystemProperty.of("url.refresh", Duration::parse, null); private TheTVDBSearchResult parseSeries(String[] v) { int id = parseInt(v[0]); diff --git a/source/net/filebot/util/SystemProperty.java b/source/net/filebot/util/SystemProperty.java index 6f3625b5..918b50fb 100644 --- a/source/net/filebot/util/SystemProperty.java +++ b/source/net/filebot/util/SystemProperty.java @@ -5,9 +5,7 @@ import static net.filebot.Logging.*; import java.util.function.Function; import java.util.logging.Level; -import net.filebot.Resource; - -public class SystemProperty implements Resource { +public class SystemProperty { public static SystemProperty of(String key, Function valueFunction, T defaultValue) { return new SystemProperty(key, valueFunction, defaultValue);