|
| 1 | +package com.simplecityapps |
| 2 | + |
| 3 | +import com.simplecityapps.shuttle.model.MediaProviderType |
| 4 | +import com.simplecityapps.shuttle.model.Song |
| 5 | +import kotlinx.datetime.Instant |
| 6 | +import kotlinx.datetime.LocalDate |
| 7 | + |
| 8 | +fun createSong( |
| 9 | + id: Long = 1, |
| 10 | + name: String = "song-name", |
| 11 | + albumArtist: String = "album-artist", |
| 12 | + album: String = "album-name", |
| 13 | + track: Int = 1, |
| 14 | + duration: Int = 1, |
| 15 | + date: LocalDate = LocalDate(2024, 2, 11), |
| 16 | + playCount: Int = 0, |
| 17 | + lastPlayed: Instant? = Instant.fromEpochSeconds(1), |
| 18 | + lastCompleted: Instant? = Instant.fromEpochSeconds(1), |
| 19 | + mediaProvider: MediaProviderType = MediaProviderType.Shuttle, |
| 20 | +) = Song( |
| 21 | + id = id, |
| 22 | + name = name, |
| 23 | + albumArtist = albumArtist, |
| 24 | + artists = emptyList(), |
| 25 | + album = album, |
| 26 | + track = track, |
| 27 | + disc = 1, |
| 28 | + duration = duration, |
| 29 | + date = date, |
| 30 | + genres = emptyList(), |
| 31 | + path = "/path/to/song", |
| 32 | + size = 1, |
| 33 | + mimeType = "ogg", |
| 34 | + lastModified = Instant.fromEpochSeconds(1), |
| 35 | + lastPlayed = lastPlayed, |
| 36 | + lastCompleted = lastCompleted, |
| 37 | + playCount = playCount, |
| 38 | + playbackPosition = 1, |
| 39 | + blacklisted = false, |
| 40 | + externalId = null, |
| 41 | + mediaProvider = mediaProvider, |
| 42 | + replayGainTrack = null, |
| 43 | + replayGainAlbum = null, |
| 44 | + lyrics = null, |
| 45 | + grouping = null, |
| 46 | + bitRate = null, |
| 47 | + bitDepth = null, |
| 48 | + sampleRate = null, |
| 49 | + channelCount = null, |
| 50 | +) |
0 commit comments