Skip to content

Commit c055391

Browse files
committed
fix simple album model
Signed-off-by: Adam Ratzman <adam@adamratzman.com>
1 parent b03923d commit c055391

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main/kotlin/com/adamratzman/spotify/utils/ResultObjects.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ data class SpotifyCopyright(
9393
)
9494

9595
/**
96-
* A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks can be retrieved, along with the total number of tracks in the playlist.
96+
* A collection containing a link ( href ) to the Web API endpoint where full details of the playlist’s tracks
97+
* can be retrieved, along with the total number of tracks in the playlist.
9798
*
9899
* @property href link to the Web API endpoint where full details of the playlist’s tracks
99100
* can be retrieved
@@ -420,11 +421,12 @@ data class SimpleAlbum(
420421
val restrictions: Restrictions? = null,
421422
@Json(ignored = true) val albumGroup: AlbumResultType? = albumGroupString?.let { _ ->
422423
AlbumResultType.values().find { it.id == albumGroupString }
423-
},
424-
@Json(ignored = true) val albumType: AlbumResultType = _albumType.let { _ ->
425-
AlbumResultType.values().first { it.id == albumGroupString }
426424
}
427425
) : Linkable() {
426+
@Json(ignored = true) val albumType: AlbumResultType = _albumType.let { _ ->
427+
AlbumResultType.values().first { it.id == _albumType }
428+
}
429+
428430
fun toFullAlbum(market: Market? = null) = api.albums.getAlbum(id, market)
429431
}
430432

0 commit comments

Comments
 (0)