1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00

Add support for OMDb API key

This commit is contained in:
Reinhard Pointner 2017-05-24 19:25:00 +08:00
parent 9ead717658
commit 04f5a62749
2 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,6 @@ package net.filebot;
import static net.filebot.Logging.*; import static net.filebot.Logging.*;
import java.util.Locale; import java.util.Locale;
import java.util.MissingResourceException;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.prefs.BackingStoreException; import java.util.prefs.BackingStoreException;
@ -40,15 +39,14 @@ public final class Settings {
} }
public static String getApiKey(String name) { public static String getApiKey(String name) {
ResourceBundle bundle = ResourceBundle.getBundle(Settings.class.getName(), Locale.ROOT);
if (isAppStore()) { if (isAppStore()) {
try { try {
return bundle.getString("apikey.appstore." + name); return getApplicationProperty("apikey.appstore." + name);
} catch (MissingResourceException e) { } catch (Exception e) {
// use default value // use default value
} }
} }
return bundle.getString("apikey." + name); return getApplicationProperty("apikey." + name);
} }
public static boolean isUnixFS() { public static boolean isUnixFS() {

View File

@ -39,8 +39,10 @@ apikey.anidb: filebot
apikey.opensubtitles: FileBot apikey.opensubtitles: FileBot
# api keys used by the appstore distribution # api keys used by the appstore distribution
apikey.appstore.fanart.tv: 780b986b22c35e6f7a134a2f392c2deb
apikey.appstore.thetvdb: 5F6E873A88CF70D9 apikey.appstore.thetvdb: 5F6E873A88CF70D9
apikey.appstore.themoviedb: 28bce8224bd3282a41bec4c5df528249 apikey.appstore.themoviedb: 28bce8224bd3282a41bec4c5df528249
apikey.appstore.omdb: 49d311ec
apikey.appstore.acoustid: VCujaMw9 apikey.appstore.acoustid: VCujaMw9
apikey.appstore.anidb: filebotappstore apikey.appstore.anidb: filebotappstore
apikey.appstore.opensubtitles: FileBot-AppStore apikey.appstore.opensubtitles: FileBot-AppStore