Save in the database what has been downloaded

This commit is contained in:
CappielloAntonio committed 2022-01-02 11:30:16 +01:00
1 parent 81e9b5c3d9
commit f416bfda8f
9 files changed
+59 -19

No files matched your search

@@ -57,7 +57,10 @@ public class PlayerBottomSheetViewModel extends AndroidViewModel {
song.setFavorite(true);
if (PreferenceUtil.getInstance(context).isStarredSyncEnabled()) {
DownloadUtil.getDownloadTracker(context).download(MappingUtil.mapMediaItem(context, song, false));
DownloadUtil.getDownloadTracker(context).download(
MappingUtil.mapMediaItem(context, song, false),
MappingUtil.mapDownload(song, null, null)
);
}
}
}
@@ -49,7 +49,10 @@ public class SongBottomSheetViewModel extends AndroidViewModel {
song.setFavorite(true);
if (PreferenceUtil.getInstance(context).isStarredSyncEnabled()) {
DownloadUtil.getDownloadTracker(context).download(MappingUtil.mapMediaItem(context, song, false));
DownloadUtil.getDownloadTracker(context).download(
MappingUtil.mapMediaItem(context, song, false),
MappingUtil.mapDownload(song, null, null)
);
}
}
}