diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index 6bb5d70..e9b8f7c 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -11,5 +11,15 @@ $ProjectFileDir$ + + sqlite.xerial + true + org.sqlite.JDBC + jdbc:sqlite:$PROJECT_DIR$/music_database + + + + $ProjectFileDir$ + \ No newline at end of file diff --git a/app/src/main/java/core/notevault/MainActivity.java b/app/src/main/java/core/notevault/MainActivity.java index a936fa2..421a7af 100644 --- a/app/src/main/java/core/notevault/MainActivity.java +++ b/app/src/main/java/core/notevault/MainActivity.java @@ -168,9 +168,12 @@ public class MainActivity extends AppCompatActivity implements MetaDataDialog.On @Override public void onSongsSelected(List songs, int concertID) { + Log.d("MainActivity", "Inserted Songs: " + songs.size()); new Thread(() -> { for(MusicNote musicNote : songs) { ConcertSong concertSong = new ConcertSong(musicNote.getMusicNoteId(), concertID); + musicDB.musicNoteDao().insertConcertSong(concertSong); + Log.d("MainActivity", "Insert Song: " + musicNote.getTitle()); } }).start(); } diff --git a/app/src/main/java/core/notevault/ui/gallery/detail/ConcertSongSelectorAdapter.java b/app/src/main/java/core/notevault/ui/gallery/detail/ConcertSongSelectorAdapter.java index a3185a1..3a4eeef 100644 --- a/app/src/main/java/core/notevault/ui/gallery/detail/ConcertSongSelectorAdapter.java +++ b/app/src/main/java/core/notevault/ui/gallery/detail/ConcertSongSelectorAdapter.java @@ -75,6 +75,11 @@ public class ConcertSongSelectorAdapter extends RecyclerView.Adapter { + MusicNote musicNote = filteredSongs.get(getAbsoluteAdapterPosition()); + selectedSongs.add(musicNote); + }); } void bind(MusicNote song) { diff --git a/music_database b/music_database index ad5d8ef..f051267 100644 Binary files a/music_database and b/music_database differ