|
|
|
@ -6,7 +6,6 @@ |
|
|
|
|
package moe.nekojimi.chords; |
|
|
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
|
import java.net.MalformedURLException; |
|
|
|
|
import java.net.URL; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
@ -19,16 +18,13 @@ public class Song |
|
|
|
|
private String artist; |
|
|
|
|
private final URL url; |
|
|
|
|
private File location = null; |
|
|
|
|
private int number; |
|
|
|
|
|
|
|
|
|
private String requestedBy; |
|
|
|
|
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") |
|
|
|
|
|| 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; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -42,6 +38,16 @@ public class Song |
|
|
|
|
this.title = title; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public int getNumber() |
|
|
|
|
{ |
|
|
|
|
return number; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void setNumber(int number) |
|
|
|
|
{ |
|
|
|
|
this.number = number; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public String getArtist() |
|
|
|
|
{ |
|
|
|
|
return artist; |
|
|
|
@ -100,6 +106,7 @@ public class Song |
|
|
|
|
if (title != null && !title.isEmpty()) |
|
|
|
|
return title; |
|
|
|
|
else |
|
|
|
|
return url.toExternalForm(); |
|
|
|
|
return "track " + number; |
|
|
|
|
// return url.toExternalForm();
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|