This commit is contained in:
sebastian 2024-11-01 14:49:17 +01:00
parent 7bd430e0f9
commit 38e4ca2eed
2 changed files with 4 additions and 0 deletions

View File

@ -81,7 +81,10 @@ public class MainActivity extends AppCompatActivity implements MetaDataDialog.On
new Thread(() -> {
MusicNote musicNote = new MusicNote(title, composer, year, genre);
long musicNoteID = musicDB.musicNoteDao().insert(musicNote);
musicNote.setMusicNoteId(musicNoteID);
Log.d("MainActivity", "MusicNoteID of inserted song: " + musicNoteID);
Log.d("MainActivity", "MusicNoteID of referenced song: " + musicNote.getMusicNoteId());
for(Uri uri: uris) {
String filePath = saveImageInternally(uri);
NoteSheet noteSheet = new NoteSheet(musicNoteID, filePath);

View File

@ -111,6 +111,7 @@ public class NoteSongAdapter extends RecyclerView.Adapter<NoteSongAdapter.NoteVi
@Override
protected List<NoteSheet> doInBackground(Void... voids) {
List<NoteSheet> sheets = musicNoteDAO.getNoteSheetsForMusicSong(this.musicNoteId);
Log.d("LoadedNoteSheetsTask", "ID: " + this.musicNoteId);
Log.d("LoadNoteSheetsTask", "Loaded NoteSheets: " + sheets.size());
return sheets;
}