Save in the database what has been downloaded

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

View file

@ -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)
);
}
}
}

View file

@ -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)
);
}
}
}