From e1c069aff1d09379df4f905a39afa71c021a9345 Mon Sep 17 00:00:00 2001 From: mob41 Date: Mon, 18 Jun 2018 01:15:07 +0800 Subject: [PATCH] Fix UTF-8 Problem --- src/main/java/com/github/mob41/osumer/Osumer.java | 2 +- src/main/java/com/github/mob41/osumer/ui/UIFrame.java | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/github/mob41/osumer/Osumer.java b/src/main/java/com/github/mob41/osumer/Osumer.java index 93138ed..2771395 100644 --- a/src/main/java/com/github/mob41/osumer/Osumer.java +++ b/src/main/java/com/github/mob41/osumer/Osumer.java @@ -39,7 +39,7 @@ public class Osumer { public static final String OSUMER_BRANCH = "snapshot"; - public static final int OSUMER_BUILD_NUM = 4; + public static final int OSUMER_BUILD_NUM = 5; private Osumer() { diff --git a/src/main/java/com/github/mob41/osumer/ui/UIFrame.java b/src/main/java/com/github/mob41/osumer/ui/UIFrame.java index 32b599e..5f92dd8 100644 --- a/src/main/java/com/github/mob41/osumer/ui/UIFrame.java +++ b/src/main/java/com/github/mob41/osumer/ui/UIFrame.java @@ -348,7 +348,7 @@ public void actionPerformed(ActionEvent e) { tab = new JTabbedPane(JTabbedPane.TOP); - JLabel lblCopyright = new JLabel("Copyright (c) 2016-2017 Anthony Law. Licensed under MIT License."); + JLabel lblCopyright = new JLabel("Copyright (c) 2016-2018 Anthony Law. Licensed under MIT License."); lblCopyright.setFont(new Font("Tahoma", Font.PLAIN, 12)); lblCopyright.setHorizontalAlignment(SwingConstants.CENTER); @@ -758,8 +758,10 @@ public boolean addQuietBtQueue(String url) { return false; } + String modBUrl = config.isLegacyEnableOldSiteBeatmapRedirecting() ? url.replace("osu.ppy.sh", "old.ppy.sh") : url; + try { - map = osu.getBeatmapInfo(url); + map = osu.getBeatmapInfo(modBUrl); } catch (DebuggableException e) { e.printStackTrace(); JOptionPane.showMessageDialog(UIFrame.this, @@ -911,8 +913,8 @@ public void run() { pbd.dispose(); return; } - - String modUrl = url.replace("osu.ppy.sh", "old.ppy.sh"); + + String modUrl = config.isLegacyEnableOldSiteBeatmapRedirecting() ? url.replace("osu.ppy.sh", "old.ppy.sh") : url; pbd.getLabel().setText("Status: Obtaining beatmap information..."); try {