fixed break
This commit is contained in:
@@ -6,7 +6,6 @@ import de.b00tload.tools.lastfmtospotifyplaylist.arguments.Arguments;
|
|||||||
import de.umass.lastfm.Caller;
|
import de.umass.lastfm.Caller;
|
||||||
import de.umass.lastfm.Period;
|
import de.umass.lastfm.Period;
|
||||||
import de.umass.lastfm.User;
|
import de.umass.lastfm.User;
|
||||||
import me.tongfei.progressbar.ProgressBar;
|
|
||||||
import org.apache.hc.core5.http.ParseException;
|
import org.apache.hc.core5.http.ParseException;
|
||||||
import se.michaelthelin.spotify.SpotifyApi;
|
import se.michaelthelin.spotify.SpotifyApi;
|
||||||
import se.michaelthelin.spotify.exceptions.SpotifyWebApiException;
|
import se.michaelthelin.spotify.exceptions.SpotifyWebApiException;
|
||||||
@@ -23,8 +22,10 @@ public class LastFMToSpotify {
|
|||||||
public static HashMap<String, String> configuration;
|
public static HashMap<String, String> configuration;
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
// create hash map with user agent
|
||||||
configuration = new HashMap<>();
|
configuration = new HashMap<>();
|
||||||
configuration.put("requests.useragent", "LastFMToSpotify/1.0-Snapshot (" + System.getProperty("os.name") + "; " + System.getProperty("os.arch") + ") Java/"+System.getProperty("java.version"));
|
configuration.put("requests.useragent", "LastFMToSpotify/1.0-Snapshot (" + System.getProperty("os.name") + "; " + System.getProperty("os.arch") + ") Java/"+System.getProperty("java.version"));
|
||||||
|
// parse arguments
|
||||||
for(int a = 0; a<args.length; a++){
|
for(int a = 0; a<args.length; a++){
|
||||||
Arguments arg;
|
Arguments arg;
|
||||||
if(args[a].startsWith("--")){
|
if(args[a].startsWith("--")){
|
||||||
@@ -32,7 +33,7 @@ public class LastFMToSpotify {
|
|||||||
} else if(args[a].startsWith("-")){
|
} else if(args[a].startsWith("-")){
|
||||||
arg = Arguments.getByAlias(args[a].substring(1));
|
arg = Arguments.getByAlias(args[a].substring(1));
|
||||||
} else {
|
} else {
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
if(arg==null) {
|
if(arg==null) {
|
||||||
ArgumentHandler.handle(Arguments.HELP);
|
ArgumentHandler.handle(Arguments.HELP);
|
||||||
|
|||||||
Reference in New Issue
Block a user