X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2FVersionCheck.java;h=fc631b0a6d1f9d8326457606ff38e9884b5357b3;hp=f64159abb97c3fe3236bc272710402a1e32631f7;hb=2ef9514282fc9d93bfa73bfcda7f8cc85bd32c5b;hpb=5b9cf278b9a58607692642da41f5fb6f3a55ffe4 diff --git a/src/be/nikiroo/fanfix/VersionCheck.java b/src/be/nikiroo/fanfix/VersionCheck.java index f64159a..fc631b0 100644 --- a/src/be/nikiroo/fanfix/VersionCheck.java +++ b/src/be/nikiroo/fanfix/VersionCheck.java @@ -20,7 +20,7 @@ import be.nikiroo.utils.Version; * @author niki */ public class VersionCheck { - private static final String base = "https://github.com/nikiroo/fanfix/raw/master/changelog${LANG}.md"; + private static final String base = "https://github.com/${PROJECT}/raw/master/changelog${LANG}.md"; private Version current; private List newer; @@ -100,16 +100,23 @@ public class VersionCheck { * Check if there are available {@link Version}s of this program more recent * than the current one. * + * @param githubProject + * the GitHub project to check on, for instance "nikiroo/fanfix" + * * @return a {@link VersionCheck} */ - public static VersionCheck check() { + public static VersionCheck check(String githubProject) { Version current = Version.getCurrentVersion(); List newer = new ArrayList(); Map> changes = new HashMap>(); if (Instance.getInstance().isVersionCheckNeeded()) { try { - // Prepare the URLs according to the user's language + // Use the right project: + String base = VersionCheck.base.replace("${PROJECT}", + githubProject); + + // Prepare the URLs according to the user's language: Locale lang = Instance.getInstance().getTrans().getLocale(); String fr = lang.getLanguage(); String BE = lang.getCountry().replace(".UTF8", "");