Expose iPhone playback controls

This commit is contained in:
diyaa
2026-06-16 02:11:24 +02:00
parent 295c6c1d9b
commit e147ce38be
7 changed files with 993 additions and 131 deletions
@@ -105,10 +105,22 @@ public struct PlaybackQueue: Hashable, Sendable {
queuedTrackIDs preferredQueuedTrackIDs: [String]? = nil
) {
isShuffleEnabled = isEnabled
let nextQueuedTrackIDs: [String]?
if isEnabled {
nextQueuedTrackIDs = preferredQueuedTrackIDs
?? Self.makeShuffledTrackIDs(
from: catalogTrackIDs,
currentTrackID: currentTrackID
)
} else {
nextQueuedTrackIDs = preferredQueuedTrackIDs
}
replaceTrackIDs(
catalogTrackIDs,
currentTrackID: currentTrackID,
queuedTrackIDs: preferredQueuedTrackIDs
queuedTrackIDs: nextQueuedTrackIDs
)
}
@@ -8,10 +8,10 @@ public enum PlaybackRepeatMode: String, Codable, CaseIterable, Hashable, Sendabl
public var nextMode: PlaybackRepeatMode {
switch self {
case .off:
.all
case .all:
.one
case .one:
.all
case .all:
.off
}
}