From 706cff79bf3f0b84e67b719fbdc49ab2add8403f Mon Sep 17 00:00:00 2001 From: sebastian Date: Sat, 2 Nov 2024 09:56:18 +0100 Subject: [PATCH] FIXME --- .idea/dataSources.xml | 10 ++++++++++ .../java/core/notevault/MainActivity.java | 3 +++ .../detail/ConcertSongSelectorAdapter.java | 5 +++++ music_database | Bin 32768 -> 36864 bytes 4 files changed, 18 insertions(+) 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 ad5d8efda634a9c70ca192e54dd0be583adb5379..f05126713a61eb3f42e35b87a043dab199b85c0c 100644 GIT binary patch delta 414 zcmZo@U}{*vG(ldGlK}zPfJ_!B7bMOI#7q+#Qzva+NjJ#xAa|&e)_{l9-f}nw+1PoLW>8U!0$pUW~%wa1L^H z3~^Nmadh%=RY*XVo2<|0!00l$fKOB!D(vZ!py25j;_B`iq~PZtqTmhxT%kLHQXunR)37?3;K&e&avD z!2g;5G5;n0&58;0`8G}vViXc!VOHlvc0%#wi~fqd+>Fe!FyZ1&0c-g=OpQ&=3{4Cy zCvT0n69;pQElrK}vI^2cW;60XW8i-Vbio~dCJDyL=kg^c6|k}VV&MO^Sy15_|HJ?; vHWo$}22RdR1rPba1fz1^ delta 607 zcmYk1F>KR77=_RF)k(niA5fFhqLQ;x5EJ%Yog*CpF#-b&NU%k9dHVjRG2zs=>!rx=RgRjJL&Gdr}y1Ie4`JC`iq)dM6)%guK4dW z*EMzYz1`Ygt5i0vQv~mvvGdaYVQ*NcBe$GbrDtYg!Sl3TH@k0Dvxn9>t(a|C_ePuc zCw){QC$LYY-nsIqxWPl-2xmt13`Wat*d;PeC7J1!5=IwYBH~br|Kf|q9gOO(NW)kX z*_A0_jVWWkfYG9xe<+rWPSvWJ15}BSYSXo;K0lYIr5to)LRY8id5lqI(lKjTGV*~R zMV+{}-j1(|s7I)pm`x_Wpkw5^chj)*