1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-08-13 17:03:45 -04:00

* make sure all data is externed into .properties files

This commit is contained in:
Reinhard Pointner 2015-05-11 17:41:37 +00:00
parent 5e4dfcf680
commit 56ad657a00
3 changed files with 29 additions and 12 deletions

View File

@ -385,7 +385,7 @@ public class Main {
pane.createDialog(null, "Please Donate").setVisible(true);
if (pane.getValue() == actions[0]) {
try {
Desktop.getDesktop().browse(URI.create(getApplicationProperty("donate.url")));
Desktop.getDesktop().browse(getApplicationLink("donate.url"));
} catch (Exception e) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, "Failed to browse URI", e);
} finally {

View File

@ -199,27 +199,32 @@ public final class Settings {
public static URI getAppStoreURI() {
if (isMacApp())
return URI.create("macappstore://itunes.apple.com/app/id905384638");
return getApplicationLink("link.mas");
if (isUbuntuApp())
return URI.create("apt://filebot");
return getApplicationLink("link.usc");
return null;
}
public static URI getEmbeddedHelpURI() {
return URI.create("http://www.filebot.net/getting-started/embed.html#" + getApplicationDeployment());
public static String getEmbeddedHelpURI() {
// add #hash so we can dynamically adjust the slides for the various platforms via JavaScript
return getApplicationProperty("link.app.help") + '#' + getApplicationDeployment();
}
public static Map<String, URI> getHelpURIs() {
Map<String, URI> links = new LinkedHashMap<String, URI>();
links.put("Getting Started", URI.create("http://www.filebot.net/getting-started/"));
links.put("FAQ", URI.create("https://www.filebot.net/forums/viewtopic.php?f=3&t=7"));
links.put("Forums", URI.create("https://www.filebot.net/forums/"));
links.put("Twitter", URI.create("https://twitter.com/filebot_renamer"));
links.put("Request Help", URI.create(isMacApp() ? "https://www.filebot.net/forums/viewforum.php?f=12" : "https://www.filebot.net/forums/viewforum.php?f=8"));
links.put("Getting Started", getApplicationLink("link.intro"));
links.put("FAQ", getApplicationLink("link.faq"));
links.put("Forums", getApplicationLink("link.forums"));
links.put("Twitter", getApplicationLink("link.twitter"));
links.put("Request Help", getApplicationLink(isMacApp() && isAppStore() ? "link.help.mas" : "link.help"));
return links;
}
public static URI getApplicationLink(String key) {
return URI.create(getApplicationProperty(key));
}
public static Settings forPackage(Class<?> type) {
return new Settings(Preferences.userNodeForPackage(type));
}

View File

@ -11,8 +11,20 @@ donate.url: https://www.filebot.net/donate.html
script.fn: https://raw.githubusercontent.com/filebot/scripts/m1/%s.groovy
script.dev: https://raw.githubusercontent.com/filebot/scripts/devel/%s.groovy
# google analytics
analytics.WebPropertyID: UA-25379256-3
# native links
link.mas: macappstore://itunes.apple.com/app/id905384638
link.usc: apt://filebot
# application help
link.app.help: http://app.filebot.net/getting-started/embed.html
# online help
link.intro: http://www.filebot.net/getting-started/
link.faq: https://www.filebot.net/forums/viewtopic.php?f=3&t=7
link.forums: https://www.filebot.net/forums/
link.twitter: https://twitter.com/filebot_renamer
link.help: https://www.filebot.net/forums/viewforum.php?f=8
link.help.mas: https://www.filebot.net/forums/viewforum.php?f=12
# api keys for webservices
apikey.fanart.tv: 780b986b22c35e6f7a134a2f392c2deb