package melody.offline.music.util

enum class PlayMode(val value: Int) {
    LIST_LOOP(0), // 列表循环
    SINGLE_LOOP(1), // 单曲循环
    RANDOM(2); // 随机播放

    companion object {
        fun fromValue(value: Int) = entries.firstOrNull { it.value == value } ?: LIST_LOOP
    }
}