File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77import java .nio .charset .StandardCharsets ;
88import java .nio .file .*;
99import java .text .ParseException ;
10+
11+ import bms .tool .mdprocessor .HttpDownloadSourceMeta ;
1012import org .slf4j .Logger ;
1113import org .slf4j .LoggerFactory ;
1214
@@ -870,6 +872,7 @@ public boolean validate() {
870872 playerpath = playerpath != null ? playerpath : PLAYERPATH_DEFAULT ;
871873 skinpath = skinpath != null ? skinpath : SKINPATH_DEFAULT ;
872874 downloadDirectory = validatePath (downloadDirectory ) ? downloadDirectory : DEFAULT_DOWNLOAD_DIRECTORY ;
875+ downloadSource = validateDownloadSource (downloadSource ) ? downloadSource : HttpDownloadProcessor .getDefaultDownloadSource ().getName ();
873876 return true ;
874877 }
875878
@@ -983,4 +986,8 @@ private boolean validatePath(String path) {
983986 }
984987 return true ;
985988 }
989+
990+ private boolean validateDownloadSource (String downloadSource ) {
991+ return HttpDownloadProcessor .DOWNLOAD_SOURCES .containsKey (downloadSource );
992+ }
986993}
Original file line number Diff line number Diff line change 88import java .net .URL ;
99import java .nio .file .*;
1010import java .util .*;
11+
12+ import bms .tool .mdprocessor .HttpDownloadSource ;
13+ import bms .tool .mdprocessor .HttpDownloadSourceMeta ;
1114import org .slf4j .Logger ;
1215import org .slf4j .LoggerFactory ;
1316import java .util .function .Supplier ;
Original file line number Diff line number Diff line change @@ -46,9 +46,6 @@ public class HttpDownloadProcessor {
4646 // Ginger
4747 HttpDownloadSourceMeta gingerDownloadSourceMeta = GingerDownloadSource .META ;
4848 DOWNLOAD_SOURCES .put (gingerDownloadSourceMeta .getName (), gingerDownloadSourceMeta );
49- // Wriggle
50- HttpDownloadSourceMeta wriggleDownloadSourceMeta = WriggleDownloadSource .META ;
51- DOWNLOAD_SOURCES .put (wriggleDownloadSourceMeta .getName (), wriggleDownloadSourceMeta );
5249 // Konmai
5350 HttpDownloadSourceMeta konmaiDownloadSourceMeta = KonmaiDownloadSource .META ;
5451 DOWNLOAD_SOURCES .put (konmaiDownloadSourceMeta .getName (), konmaiDownloadSourceMeta );
Original file line number Diff line number Diff line change 22
33import bms .player .beatoraja .Config ;
44
5+ /**
6+ * Wriggle download source is shutdown during the development of 0.4.0. It's not an usable download source
7+ * anymore. The code retained here is only for use of reference.
8+ */
9+ @ Deprecated
510public class WriggleDownloadSource implements HttpDownloadSource {
611 public static final HttpDownloadSourceMeta META = new HttpDownloadSourceMeta (
712 "wriggle" ,
You can’t perform that action at this time.
0 commit comments