Added SQL and Network
This commit is contained in:
@@ -12,6 +12,7 @@ import audio.Song;
|
||||
import audio.SongInstance;
|
||||
import audio.io.DirScanner;
|
||||
import audio.sorting.SortALPHA;
|
||||
import data.io.SQLConnector;
|
||||
|
||||
public class SongHandler {
|
||||
|
||||
@@ -20,13 +21,16 @@ public class SongHandler {
|
||||
private Song currentSong;
|
||||
private SongInstance currentSongInstance;
|
||||
private int currentIndex;
|
||||
SQLConnector sql;
|
||||
|
||||
private File dir;
|
||||
|
||||
private AudioPlayer p;
|
||||
|
||||
public SongHandler()
|
||||
public SongHandler(SQLConnector sql)
|
||||
{
|
||||
this.sql = sql;
|
||||
|
||||
songs = new ArrayList<Song>();
|
||||
|
||||
currentSong = null;
|
||||
@@ -44,6 +48,8 @@ public class SongHandler {
|
||||
|
||||
Collections.sort(songs, new SortALPHA());
|
||||
|
||||
sql.update(songs);
|
||||
|
||||
updatePlayer();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user