Updated SongEntity to Song
This commit is contained in:
parent
a93dcb0285
commit
bcb8f1b42b
6 changed files with 64 additions and 10 deletions
|
@ -14,6 +14,7 @@
|
|||
package code.name.monkey.retromusic.model
|
||||
|
||||
import android.os.Parcelable
|
||||
import code.name.monkey.retromusic.db.SongEntity
|
||||
import kotlinx.android.parcel.Parcelize
|
||||
|
||||
@Parcelize
|
||||
|
@ -32,6 +33,24 @@ open class Song(
|
|||
val composer: String?,
|
||||
val albumArtist: String?
|
||||
) : Parcelable {
|
||||
fun toSongEntity(playListId: Int): SongEntity {
|
||||
return SongEntity(
|
||||
playListId,
|
||||
id,
|
||||
title,
|
||||
trackNumber,
|
||||
year,
|
||||
duration,
|
||||
data,
|
||||
dateModified,
|
||||
albumId,
|
||||
albumName,
|
||||
artistId,
|
||||
artistName,
|
||||
composer,
|
||||
albumArtist
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
companion object {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue