musikr: clarify album added timestamp api
Same reasons, should be milliseconds
This commit is contained in:
@@ -317,8 +317,8 @@ interface Album : MusicParent {
|
||||
val covers: CoverCollection
|
||||
/** The duration of all songs in the album, in milliseconds. */
|
||||
val durationMs: Long
|
||||
/** The earliest date a song in this album was added, as a unix epoch timestamp. */
|
||||
val dateAdded: Long
|
||||
/** The earliest date a song in this album was added, in milliseconds since the unix epoch. */
|
||||
val addedMs: Long
|
||||
/**
|
||||
* The parent [Artist]s of this [Album]. Is often one, but there can be multiple if more than
|
||||
* one [Artist] name was specified in the metadata of the [Song]'s. Unlike [Song], album artists
|
||||
|
||||
@@ -55,7 +55,7 @@ class AlbumImpl internal constructor(private val core: AlbumCore) : Album {
|
||||
override val name = preAlbum.name
|
||||
override val releaseType = preAlbum.releaseType
|
||||
override val durationMs = core.songs.sumOf { it.durationMs }
|
||||
override val dateAdded = core.songs.minOf { it.addedMs }
|
||||
override val addedMs = core.songs.minOf { it.addedMs }
|
||||
override val covers = CoverCollection.from(core.songs.mapNotNull { it.cover })
|
||||
override val dates: Date.Range? =
|
||||
core.songs.mapNotNull { it.date }.ifEmpty { null }?.run { Date.Range(min(), max()) }
|
||||
|
||||
Reference in New Issue
Block a user