|
|
@ -6,7 +6,6 @@ |
|
|
|
package moe.nekojimi.chords; |
|
|
|
package moe.nekojimi.chords; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
|
import java.net.MalformedURLException; |
|
|
|
|
|
|
|
import java.net.URL; |
|
|
|
import java.net.URL; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -19,17 +18,14 @@ public class Song |
|
|
|
private String artist; |
|
|
|
private String artist; |
|
|
|
private final URL url; |
|
|
|
private final URL url; |
|
|
|
private File location = null; |
|
|
|
private File location = null; |
|
|
|
|
|
|
|
private int number; |
|
|
|
|
|
|
|
|
|
|
|
private String requestedBy; |
|
|
|
private String requestedBy; |
|
|
|
private String requestedIn; |
|
|
|
private String requestedIn; |
|
|
|
|
|
|
|
|
|
|
|
public Song(URL url) throws MalformedURLException |
|
|
|
public Song(URL url) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (url.toString().equalsIgnoreCase("https://soundcloud.com/user-185855194/fart-with-extra-reverb") |
|
|
|
this.url = url; |
|
|
|
|| url.toString().equalsIgnoreCase("https://www.youtube.com/watch?v=hr7GyFM7pX4")) |
|
|
|
|
|
|
|
this.url = new URL("https://www.youtube.com/watch?v=dQw4w9WgXcQ"); |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
this.url = url; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getTitle() |
|
|
|
public String getTitle() |
|
|
@ -42,6 +38,16 @@ public class Song |
|
|
|
this.title = title; |
|
|
|
this.title = title; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getNumber() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return number; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void setNumber(int number) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
this.number = number; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String getArtist() |
|
|
|
public String getArtist() |
|
|
|
{ |
|
|
|
{ |
|
|
|
return artist; |
|
|
|
return artist; |
|
|
@ -100,6 +106,7 @@ public class Song |
|
|
|
if (title != null && !title.isEmpty()) |
|
|
|
if (title != null && !title.isEmpty()) |
|
|
|
return title; |
|
|
|
return title; |
|
|
|
else |
|
|
|
else |
|
|
|
return url.toExternalForm(); |
|
|
|
return "track " + number; |
|
|
|
|
|
|
|
// return url.toExternalForm();
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|