playback: avoid huge allocation on printing cmd

This commit is contained in:
Alexander Capehart 2025-01-21 13:18:23 -07:00
parent 9685f3cf51
commit e3e19fb0ac
No known key found for this signature in database
GPG key ID: 37DBE3621FE9AD47

View file

@ -94,7 +94,11 @@ constructor(
override val parent: MusicParent?,
override val queue: List<Song>,
override val shuffled: Boolean
) : PlaybackCommand
) : PlaybackCommand {
// Only show queue count to reduce memory use
override fun toString() =
"PlaybackCommand(song=$song, parent=$parent, queue=${queue.size} songs, shuffled=$shuffled)"
}
override fun song(song: Song, shuffle: ShuffleMode) =
newCommand(song, null, listOf(song), shuffle)