From ed849bb2f176b4ba131cf27a4bc3438c1fc20e6d Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 19 Jan 2018 21:55:19 +0100 Subject: [PATCH] Support for custom build profiles --- .externalToolBuilders/Properties.launch | 17 +++++ .project | 14 ++++ .../ant/ant.properties => app.properties | 34 ++++++++++ build.xml | 12 +++- source/net/filebot/Settings.java | 6 +- source/net/filebot/Settings.properties | 66 +++++++------------ .../net/filebot/media/ReleaseInfo.properties | 14 ++-- 7 files changed, 108 insertions(+), 55 deletions(-) create mode 100644 .externalToolBuilders/Properties.launch rename installer/ant/ant.properties => app.properties (62%) diff --git a/.externalToolBuilders/Properties.launch b/.externalToolBuilders/Properties.launch new file mode 100644 index 00000000..ee8f7933 --- /dev/null +++ b/.externalToolBuilders/Properties.launch @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/.project b/.project index 222180d8..b8e407fa 100644 --- a/.project +++ b/.project @@ -10,6 +10,20 @@ + + org.eclipse.ui.externaltools.ExternalToolBuilder + auto,full,incremental, + + + LaunchConfigHandle + <project>/.externalToolBuilders/Properties.launch + + + incclean + true + + + org.eclipse.jdt.core.javanature diff --git a/installer/ant/ant.properties b/app.properties similarity index 62% rename from installer/ant/ant.properties rename to app.properties index 9f17ef3c..2e877bca 100644 --- a/installer/ant/ant.properties +++ b/app.properties @@ -1,3 +1,37 @@ +# Application Info +application.name: FileBot +application.version: 4.7.19 + + + +# Script Base URL +github.stable: https://app.filebot.net/scripts/m1.jar.xz +github.master: https://raw.githubusercontent.com/filebot/scripts/master/ + +# Update Descriptor +update.url: https://app.filebot.net/update.xml +donate.url: https://www.filebot.net/donate.php + +# Store +link.mas: macappstore://itunes.apple.com/app/id905384638 +link.mws: ms-windows-store://review/?ProductId=9NBLGGH52T9X + +# Tutorials +link.app.help: https://www.filebot.net/getting-started/embed.html + +# Help +link.intro: https://www.filebot.net/getting-started/index.html +link.forums: https://www.filebot.net/forums/ +link.twitter: https://twitter.com/filebot_renamer +link.facebook: https://www.facebook.com/filebot/ +link.faq: https://www.filebot.net/manual.html +link.bugs: https://www.filebot.net/report.html +link.channel: https://www.filebot.net/channel.html +link.help: https://www.filebot.net/support.html +link.help.mas: https://www.filebot.net/mac/support.html + + + # Build main.class: net.filebot.Main jre.version: 9.0.1 diff --git a/build.xml b/build.xml index afcd0d03..91f9a746 100644 --- a/build.xml +++ b/build.xml @@ -11,8 +11,7 @@ - - + @@ -1023,4 +1022,13 @@ + + + + + + + + + diff --git a/source/net/filebot/Settings.java b/source/net/filebot/Settings.java index 0d8290cd..1033125b 100644 --- a/source/net/filebot/Settings.java +++ b/source/net/filebot/Settings.java @@ -39,11 +39,7 @@ public final class Settings { } public static String getApiKey(String name) { - if (isAppStore()) { - return getApplicationProperty("com.apikey." + name); - } else { - return getApplicationProperty("apikey." + name); - } + return getApplicationProperty("apikey." + name); } public static boolean isUnixFS() { diff --git a/source/net/filebot/Settings.properties b/source/net/filebot/Settings.properties index 4e15b3ec..add70c5b 100644 --- a/source/net/filebot/Settings.properties +++ b/source/net/filebot/Settings.properties @@ -1,48 +1,32 @@ -# application settings -application.name: FileBot -application.version: 4.7.19 +application.name: @{application.name} +application.version: @{application.version} application.revision: @{revision} -# application updates -update.url: https://app.filebot.net/update.xml -donate.url: https://www.filebot.net/donate.php +update.url: @{update.url} +donate.url: @{donate.url} -# base URL for resolving script resources -github.stable: https://app.filebot.net/scripts/m1.jar.xz -github.master: https://raw.githubusercontent.com/filebot/scripts/master/ +github.stable: @{github.stable} +github.master: @{github.master} -# native links -link.mas: macappstore://itunes.apple.com/app/id905384638 -link.mws: ms-windows-store://review/?ProductId=9NBLGGH52T9X +link.mas: @{link.mas} +link.mws: @{link.mws} -# application help -link.app.help: https://www.filebot.net/getting-started/embed.html +link.app.help: @{link.app.help} -# online help -link.intro: https://www.filebot.net/getting-started/index.html -link.forums: https://www.filebot.net/forums/ -link.twitter: https://twitter.com/filebot_renamer -link.facebook: https://www.facebook.com/filebot/ -link.faq: https://www.filebot.net/manual.html -link.bugs: https://www.filebot.net/report.html -link.channel: https://www.filebot.net/channel.html -link.help: https://www.filebot.net/support.html -link.help.mas: https://www.filebot.net/mac/support.html +link.intro: @{link.intro} +link.forums: @{link.forums} +link.twitter: @{link.twitter} +link.facebook: @{link.facebook} +link.faq: @{link.faq} +link.bugs: @{link.bugs} +link.channel: @{link.channel} +link.help: @{link.help} +link.help.mas: @{link.help.mas} -# api keys -apikey.fanart.tv: 780b986b22c35e6f7a134a2f392c2deb -apikey.thetvdb: 694FAD89942D3827 -apikey.themoviedb: 66308fb6e3fd850dde4c7d21df2e8306 -apikey.omdb: 49d311ec -apikey.acoustid: 0B3qZnQc -apikey.anidb: filebot -apikey.opensubtitles: FileBot - -# api keys -com.apikey.fanart.tv: 780b986b22c35e6f7a134a2f392c2deb -com.apikey.thetvdb: 5F6E873A88CF70D9 -com.apikey.themoviedb: 28bce8224bd3282a41bec4c5df528249 -com.apikey.omdb: 49d311ec -com.apikey.acoustid: VCujaMw9 -com.apikey.anidb: filebotappstore -com.apikey.opensubtitles: FileBot-AppStore +apikey.fanart.tv: @{apikey.fanart.tv} +apikey.thetvdb: @{apikey.thetvdb} +apikey.themoviedb: @{apikey.themoviedb} +apikey.omdb: @{apikey.omdb} +apikey.acoustid: @{apikey.acoustid} +apikey.anidb: @{apikey.anidb} +apikey.opensubtitles: @{apikey.opensubtitles} \ No newline at end of file diff --git a/source/net/filebot/media/ReleaseInfo.properties b/source/net/filebot/media/ReleaseInfo.properties index b6f5a457..910357e6 100644 --- a/source/net/filebot/media/ReleaseInfo.properties +++ b/source/net/filebot/media/ReleaseInfo.properties @@ -23,25 +23,25 @@ pattern.clutter.excludes: (?<=[!\\-\\(\\[])(Sample|Trailer)|(Sample|Trailer)(?=[ number.clutter.maxfilesize: 150000000 # known release group names -url.release-groups: https://app.filebot.net/data/release-groups.txt.xz +url.release-groups: @{url.data}/release-groups.txt.xz # blacklisted terms that will be ignored -url.query-blacklist: https://app.filebot.net/data/query-blacklist.txt.xz +url.query-blacklist: @{url.data}/query-blacklist.txt.xz # list of patterns directly matching files to series names -url.series-mappings: https://app.filebot.net/data/series-mappings.txt.xz +url.series-mappings: @{url.data}/series-mappings.txt.xz # list of all movies (id, name, year) -url.movie-list: https://app.filebot.net/data/moviedb.txt.xz +url.movie-list: @{url.data}/moviedb.txt.xz # TheTVDB index -url.thetvdb-index: https://app.filebot.net/data/thetvdb.txt.xz +url.thetvdb-index: @{url.data}/thetvdb.txt.xz # AniDB index -url.anidb-index: https://app.filebot.net/data/anidb.txt.xz +url.anidb-index: @{url.data}/anidb.txt.xz # OpenSubtitles index -url.osdb-index: https://app.filebot.net/data/osdb.txt.xz +url.osdb-index: @{url.data}/osdb.txt.xz # disk folder matcher pattern.diskfolder.entry: BDMV|HVDVD_TS|VIDEO_TS|AUDIO_TS|VCD|MovieObject.bdmv|VIDEO_TS.VOB|VTS_[0-9]+_[0-9]+.VOB