diff --git a/source/net/filebot/media/ReleaseInfo.java b/source/net/filebot/media/ReleaseInfo.java index 0fa5fe1c..070d7043 100644 --- a/source/net/filebot/media/ReleaseInfo.java +++ b/source/net/filebot/media/ReleaseInfo.java @@ -44,7 +44,7 @@ public class ReleaseInfo { public String getVideoSource(String... input) { // check parent and itself for group names - return matchLast(getVideoSourcePattern(), getBundle(getClass().getName()).getString("pattern.video.source").split("[|]"), input); + return matchLast(getVideoSourcePattern(), getProperty("pattern.video.source").split("[|]"), input); } public List getVideoTags(String... input) { @@ -250,19 +250,19 @@ public class ReleaseInfo { public Pattern getVideoFormatPattern(boolean strict) { // pattern matching any video source name - String pattern = getBundle(getClass().getName()).getString("pattern.video.format"); + String pattern = getProperty("pattern.video.format"); return strict ? compile("(? getMediaRoots() { List roots = new ArrayList(); - for (String it : getBundle(getClass().getName()).getString("folder.media.roots").split(":")) { + for (String it : getProperty("folder.media.roots").split(":")) { roots.add(new File(it)); } return roots; } // fetch release group names online and try to update the data every other day - protected final CachedResource releaseGroupResource = new PatternResource(getBundle(getClass().getName()).getString("url.release-groups")); - protected final CachedResource queryBlacklistResource = new PatternResource(getBundle(getClass().getName()).getString("url.query-blacklist")); - protected final CachedResource excludeBlacklistResource = new PatternResource(getBundle(getClass().getName()).getString("url.exclude-blacklist")); - protected final CachedResource movieListResource = new MovieResource(getBundle(getClass().getName()).getString("url.movie-list")); - protected final CachedResource seriesDirectMappingsResource = new PatternResource(getBundle(getClass().getName()).getString("url.series-mappings")); - protected final CachedResource tvdbIndexResource = new TheTVDBIndexResource(getBundle(getClass().getName()).getString("url.thetvdb-index")); - protected final CachedResource anidbIndexResource = new AnidbIndexResource(getBundle(getClass().getName()).getString("url.anidb-index")); + protected final CachedResource releaseGroupResource = new PatternResource(getProperty("url.release-groups")); + protected final CachedResource queryBlacklistResource = new PatternResource(getProperty("url.query-blacklist")); + protected final CachedResource excludeBlacklistResource = new PatternResource(getProperty("url.exclude-blacklist")); + protected final CachedResource movieListResource = new MovieResource(getProperty("url.movie-list")); + protected final CachedResource seriesDirectMappingsResource = new PatternResource(getProperty("url.series-mappings")); + protected final CachedResource tvdbIndexResource = new TheTVDBIndexResource(getProperty("url.thetvdb-index")); + protected final CachedResource anidbIndexResource = new AnidbIndexResource(getProperty("url.anidb-index")); + + protected String getProperty(String propertyName) { + // allow override via Java System properties + return System.getProperty(propertyName, getBundle(ReleaseInfo.class.getName()).getString(propertyName)); + } protected static class PatternResource extends CachedResource { @@ -547,4 +552,5 @@ public class ReleaseInfo { Map result = unmodifiableMap(languageMap); return result; } + }