mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
Save in the database what has been downloaded
This commit is contained in:
parent
81e9b5c3d9
commit
f416bfda8f
9 changed files with 59 additions and 19 deletions
|
|
@ -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)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue