Compare commits

...
Author SHA1 Message Date
rootandClaude Opus 5.5 8d3251dbc5 iOS 0.11.0 (build 67): Eze-style v<version> tags, source.json lists org.cdnutter.stemify
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 12:42:21 -08:00
rootandClaude Opus 5.5 5344bbfd21 iOS builds: public is org.cdnutter.stemify, prov renamed signed
Modes are now public|dev|signed (build/public, build/signed, -signed IPA).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-04 12:00:50 -08:00
rootandClaude Opus 5.5 437c7768d9 build scripts: comments name WHITE-M1AIR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 22:05:54 -08:00
rootandClaude Opus 5.5 786051aeba build host: white-m1air (iOS builds moved off WHITE-M1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 21:11:47 -08:00
cdnutterandClaude Opus 5.5 a38859d29f Use gitea.iamchrisama.com instead of git.iamchrisama.com
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 17:24:06 -08:00
cdnutterandClaude Opus 5.5 39f1eb8699 Point Gitea URLs at gitea.iamchrisama.com
git.iamchrisama.com now redirects to gitea.iamchrisama.com, and API calls
lose their auth header across the redirect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 14:35:58 -08:00
rootandClaude Opus 5.5 5c87b19085 Soften app icon glow (build 66)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 11:48:41 -08:00
rootandClaude Opus 5.5 ac363ea0f7 Cover cropper with zoom and output size for both playlist types, lyrics Vocals/Softness turn karaoke on (build 65)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 11:44:16 -08:00
rootandClaude Opus 5.5 b10528d69c Playlist pages: header rides up into the empty nav bar, bar title hidden (build 64)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 11:39:43 -08:00
rootandClaude Opus 5.5 42f5eddb36 Stem playlists: sorting, rename/cover/mix/copy to Plex in long-press menu (build 63)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 11:34:51 -08:00
22 changed files with 292 additions and 83 deletions

No files matched your search

+1
View File
@@ -33,3 +33,4 @@
2026-11-09 iOS: dev builds (`ios/scripts/build-remote.sh dev`): bundle id org.cdnutter.stemify-dev, "Stemify Dev", own App Group, into ios/build/dev. Internal tests only, never on Gitea or Sideload. 2026-11-09 iOS: dev builds (`ios/scripts/build-remote.sh dev`): bundle id org.cdnutter.stemify-dev, "Stemify Dev", own App Group, into ios/build/dev. Internal tests only, never on Gitea or Sideload.
2026-11-09 iOS: Duo unfolded redesign. Tabs move to a rail on the right edge by the status bar, Now Playing fills the screen with stems and queue on the left and the player on the right, picking a tab swaps the left pane, Swap flips the sides (remembered). Folded screen unchanged. 2026-11-09 iOS: Duo unfolded redesign. Tabs move to a rail on the right edge by the status bar, Now Playing fills the screen with stems and queue on the left and the player on the right, picking a tab swaps the left pane, Swap flips the sides (remembered). Folded screen unchanged.
2026-11-09 iOS: build-remote.sh now builds dev + prov by default; public only with `public`. 2026-11-09 iOS: build-remote.sh now builds dev + prov by default; public only with `public`.
2026-12-04 iOS 0.11.0 (build 67): public build is org.cdnutter.stemify (was -pub, reinstall needed), build modes public|dev|signed, tags v<version> like Eze. Playlist create/delete, Stem playlist sorting/rename/cover/mix/copy to Plex, cover cropper, continuous Random Album Radio, lyrics Vocals/Softness turn karaoke on, softer icon glow, Duo orientation and Now Playing drag fixes.
+8 -8
View File
@@ -343,18 +343,18 @@ docs/specs.txt original design doc for the desktop separator
```sh ```sh
cd ios cd ios
scripts/build-remote.sh # from DevOps: dev build on WHITE-M1, pulled back to build/dev scripts/build-remote.sh # from DevOps: dev build on WHITE-M1AIR, pulled back to build/dev
scripts/build-remote.sh release # release build, build/release scripts/build-remote.sh public # public build, build/public
scripts/build-remote.sh prov # personal signed build, build/prov scripts/build-remote.sh signed # personal signed build, build/signed
scripts/build-ipa.sh release|dev|prov # same thing directly on the Mac scripts/build-ipa.sh public|dev|signed # same thing directly on the Mac
xcodegen generate # or open Stemify.xcodeproj in Xcode xcodegen generate # or open Stemify.xcodeproj in Xcode
``` ```
There are three builds, each with its own bundle ID so they install side by side: There are three builds. Public and signed share a bundle ID, dev installs beside them:
- `org.cdnutter.stemify-pub` (build/release): releases from `main`. `scripts/publish.sh release` tags `ios-v<version>`, uploads the IPA to Gitea and Sideload, and regenerates `ios/source.json`. - `org.cdnutter.stemify` (build/public): releases from `main`. `scripts/publish.sh public` tags `v<version>`, uploads the IPA to Gitea and Sideload, and regenerates `ios/source.json`.
- `org.cdnutter.stemify-dev` (build/dev): ribbon icon, built from the `dev` branch. `scripts/publish.sh dev` makes a Gitea pre-release `ios-v<version>-dev.<build>` and uploads it to Sideload Developer. Bump `CURRENT_PROJECT_VERSION` for each one. - `org.cdnutter.stemify-dev` (build/dev): ribbon icon, built from the `dev` branch. `scripts/publish.sh dev` makes a Gitea pre-release `v<version>-dev.<build>` and uploads it to Sideload Developer. Bump `CURRENT_PROJECT_VERSION` for each one.
- `org.cdnutter.stemify` (build/prov): signed with the personal profile in `ios/prov/` so CarPlay and Siri work. Never published. - `org.cdnutter.stemify` (build/signed, file ends `-signed`): signed with the personal profile in `ios/prov/` so CarPlay and Siri work. Never published.
The version lives in `ios/project.yml` (`VERSION_LABEL`, `MARKETING_VERSION` and `CURRENT_PROJECT_VERSION`). The version lives in `ios/project.yml` (`VERSION_LABEL`, `MARKETING_VERSION` and `CURRENT_PROJECT_VERSION`).
+1 -1
View File
@@ -58,7 +58,7 @@ actor LyricsSource {
var c = URLComponents(string: "https://lrclib.net/api/\(path)")! var c = URLComponents(string: "https://lrclib.net/api/\(path)")!
c.queryItems = query.map { URLQueryItem(name: $0.key, value: $0.value) } c.queryItems = query.map { URLQueryItem(name: $0.key, value: $0.value) }
var req = URLRequest(url: c.url!, timeoutInterval: 10) var req = URLRequest(url: c.url!, timeoutInterval: 10)
req.setValue("Stemify iOS (https://git.iamchrisama.com/cdnutter/stemify)", forHTTPHeaderField: "User-Agent") req.setValue("Stemify iOS (https://gitea.iamchrisama.com/cdnutter/stemify)", forHTTPHeaderField: "User-Agent")
guard let (data, resp) = try? await URLSession.shared.data(for: req), (resp as? HTTPURLResponse)?.statusCode == 200 else { return nil } guard let (data, resp) = try? await URLSession.shared.data(for: req), (resp as? HTTPURLResponse)?.statusCode == 200 else { return nil }
return data return data
} }
+6 -4
View File
@@ -581,14 +581,16 @@ final class PlaybackManager: StemEngineListener, @unchecked Sendable {
var karaokeVocals: KaraokeVocals { KaraokeVocals(rawValue: settings.karaokeVocals) ?? .Off } var karaokeVocals: KaraokeVocals { KaraokeVocals(rawValue: settings.karaokeVocals) ?? .Off }
func setKaraokeVocals(_ v: KaraokeVocals) { /// [engage] (from the lyrics panel) turns karaoke on, so the choice is heard even if lyrics were opened without it.
func setKaraokeVocals(_ v: KaraokeVocals, engage: Bool = false) {
settings.karaokeVocals = v.rawValue settings.karaokeVocals = v.rawValue
if karaoke { applyMix(karaokeMix) } if karaoke { applyMix(karaokeMix) } else if engage { setKaraoke(true) }
} }
func setKaraokeSoftDb(_ db: Int) { func setKaraokeSoftDb(_ db: Int, engage: Bool = false) {
settings.karaokeSoftDb = db settings.karaokeSoftDb = db
if karaoke && karaokeVocals == .Soft { applyMix(karaokeMix) } guard karaokeVocals == .Soft else { return }
if karaoke { applyMix(karaokeMix) } else if engage { setKaraoke(true) }
} }
/// Turning it off puts back the song's saved mix, or the one from before, unless the mix was changed meanwhile. /// Turning it off puts back the song's saved mix, or the one from before, unless the mix was changed meanwhile.
+3 -2
View File
@@ -88,10 +88,11 @@ final class StemPlaylists {
/// Saves [data] (any image format Photos hands over) as the list's cover, scaled to 1200 px. /// Saves [data] (any image format Photos hands over) as the list's cover, scaled to 1200 px.
/// Each pick gets a new file name so cached art doesn't show the old one. /// Each pick gets a new file name so cached art doesn't show the old one.
@discardableResult @discardableResult
/// A picked photo as a JPEG no bigger than 1200 px a side. /// A picked photo as a JPEG no bigger than 2000 px a side. The cropper's JPEGs pass through as they are.
static func coverJpeg(_ data: Data) -> Data? { static func coverJpeg(_ data: Data) -> Data? {
guard let img = UIImage(data: data) else { return nil } guard let img = UIImage(data: data) else { return nil }
let side: CGFloat = 1200 let side: CGFloat = 2000
if data.starts(with: [0xFF, 0xD8]), max(img.size.width, img.size.height) <= side { return data }
let scale = min(1, side / max(img.size.width, img.size.height, 1)) let scale = min(1, side / max(img.size.width, img.size.height, 1))
let size = CGSize(width: (img.size.width * scale).rounded(), height: (img.size.height * scale).rounded()) let size = CGSize(width: (img.size.width * scale).rounded(), height: (img.size.height * scale).rounded())
let fmt = UIGraphicsImageRendererFormat.default(); fmt.scale = 1 let fmt = UIGraphicsImageRendererFormat.default(); fmt.scale = 1
Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

After

Width:  |  Height:  |  Size: 173 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 192 KiB

+3
View File
@@ -315,11 +315,14 @@ struct HingeEdge: ViewModifier {
struct Page<Content: View>: View { struct Page<Content: View>: View {
let title: String let title: String
var large = true var large = true
/// Moves the content up into an empty nav bar.
var pullUp: CGFloat = 0
@ViewBuilder let content: () -> Content @ViewBuilder let content: () -> Content
@Environment(\.palette) private var p @Environment(\.palette) private var p
var body: some View { var body: some View {
ScrollView { ScrollView {
LazyVStack(alignment: .leading, spacing: 0) { content() } LazyVStack(alignment: .leading, spacing: 0) { content() }
.padding(.top, -pullUp)
.padding(.bottom, 24) .padding(.bottom, 24)
} }
.modifier(HingeEdge()) .modifier(HingeEdge())
@@ -0,0 +1,149 @@
import SwiftUI
import UIKit
/// Square crop for a playlist cover: pinch or slide to zoom, drag to place, pick the saved size.
struct CoverCropper: View {
let image: UIImage
let done: (Data?) -> Void
@State private var zoom: CGFloat = 1
@State private var offset: CGSize = .zero
@State private var dragStart: CGSize?
@State private var zoomStart: CGFloat?
@State private var side: CGFloat = 1
@State private var saving = false
@AppStorage("coverCropSize") private var outSize = 1200
private static let sizes = [(600, "Small"), (1200, "Medium"), (2000, "Large")]
private let maxZoom: CGFloat = 6
var body: some View {
NavigationStack {
VStack(spacing: 0) {
GeometryReader { geo in
let s = max(1, min(geo.size.width, geo.size.height) - 32)
ZStack {
Color.black
Image(uiImage: image)
.resizable()
.frame(width: shown(s).width, height: shown(s).height)
.offset(offset)
CropMask(side: s).allowsHitTesting(false)
}
.frame(width: geo.size.width, height: geo.size.height)
.contentShape(Rectangle())
.gesture(drag(s).simultaneously(with: pinch(s)))
.onAppear { side = s }
.onChange(of: s) { _, v in side = v; clamp(v) }
}
.clipped()
controls
}
.background(Color.black)
.navigationTitle("Crop Cover")
.navigationBarTitleDisplayMode(.inline)
.toolbarColorScheme(.dark, for: .navigationBar)
.toolbar {
ToolbarItem(placement: .cancellationAction) { Button("Cancel") { done(nil) } }
ToolbarItem(placement: .confirmationAction) {
if saving { ProgressView() } else { Button("Apply") { apply() }.bold() }
}
}
}
.preferredColorScheme(.dark)
}
private var controls: some View {
VStack(spacing: 14) {
HStack(spacing: 12) {
Image(systemName: "minus.magnifyingglass").foregroundStyle(.secondary)
Slider(value: Binding(get: { zoom }, set: { zoom = $0; clamp(side) }), in: 1...maxZoom)
Image(systemName: "plus.magnifyingglass").foregroundStyle(.secondary)
}
Picker("Size", selection: $outSize) {
ForEach(Self.sizes, id: \.0) { Text($0.1).tag($0.0) }
}
.pickerStyle(.segmented)
Text("\(outSize) × \(outSize) px").font(.caption).monospacedDigit().foregroundStyle(.secondary)
Button("Reset") { withAnimation(.snappy(duration: 0.2)) { zoom = 1; offset = .zero } }
.font(.subheadline)
}
.padding(.horizontal, 24).padding(.top, 12).padding(.bottom, 20)
}
/// The image's on-screen size: filling the square at zoom 1.
private func shown(_ s: CGFloat) -> CGSize {
let w = max(image.size.width, 1), h = max(image.size.height, 1)
let k = s / min(w, h) * zoom
return CGSize(width: w * k, height: h * k)
}
/// Keeps the square covered by the image.
private func clamp(_ s: CGFloat) {
let d = shown(s)
let mx = max(0, (d.width - s) / 2), my = max(0, (d.height - s) / 2)
offset = CGSize(width: min(max(offset.width, -mx), mx), height: min(max(offset.height, -my), my))
}
private func drag(_ s: CGFloat) -> some Gesture {
DragGesture(minimumDistance: 0)
.onChanged { v in
let start = dragStart ?? offset
if dragStart == nil { dragStart = start }
offset = CGSize(width: start.width + v.translation.width, height: start.height + v.translation.height)
clamp(s)
}
.onEnded { _ in dragStart = nil }
}
private func pinch(_ s: CGFloat) -> some Gesture {
MagnifyGesture()
.onChanged { v in
let start = zoomStart ?? zoom
if zoomStart == nil { zoomStart = start }
zoom = min(max(start * v.magnification, 1), maxZoom)
clamp(s)
}
.onEnded { _ in zoomStart = nil }
}
private func apply() {
let s = side
let d = shown(s)
let k = d.width / max(image.size.width, 1) // screen points per image point
// The square's top-left and side, in image points.
let x0 = (d.width / 2 - s / 2 - offset.width) / k
let y0 = (d.height / 2 - s / 2 - offset.height) / k
let crop = CGRect(x: x0, y: y0, width: s / k, height: s / k)
let img = image
let out = CGFloat(outSize)
saving = true
Task {
let data = await Task.detached(priority: .userInitiated) { CoverCropper.render(img, crop, out) }.value
saving = false
done(data)
}
}
nonisolated static func render(_ img: UIImage, _ crop: CGRect, _ out: CGFloat) -> Data? {
let f = out / max(crop.width, 1)
let fmt = UIGraphicsImageRendererFormat.default(); fmt.scale = 1; fmt.opaque = true
return UIGraphicsImageRenderer(size: CGSize(width: out, height: out), format: fmt).jpegData(withCompressionQuality: 0.85) { _ in
img.draw(in: CGRect(x: -crop.minX * f, y: -crop.minY * f, width: img.size.width * f, height: img.size.height * f))
}
}
}
/// Dims everything outside the centered square and outlines it.
private struct CropMask: View {
let side: CGFloat
var body: some View {
GeometryReader { geo in
let r = CGRect(x: (geo.size.width - side) / 2, y: (geo.size.height - side) / 2, width: side, height: side)
Path { p in p.addRect(CGRect(origin: .zero, size: geo.size)); p.addRect(r) }
.fill(Color.black.opacity(0.55), style: FillStyle(eoFill: true))
Rectangle().stroke(Color.white.opacity(0.9), lineWidth: 1)
.frame(width: side, height: side).position(x: r.midX, y: r.midY)
}
}
}
+8 -1
View File
@@ -129,7 +129,9 @@ struct MediaMenu {
{ pl.tracks }, confirm: false) { pl.tracks }, confirm: false)
if pl.items.isEmpty { a = [] } if pl.items.isEmpty { a = [] }
let lists = g.stemPlaylists let lists = g.stemPlaylists
if !pl.items.isEmpty { a.append(SheetAction("Rename…", icon: "pencil") {
overlays.prompt("Rename Stem Playlist", nil, initial: pl.title, "Save") { lists.rename(pl.id, $0) }
})
a.append(SheetAction("Change Cover…", icon: "photo") { a.append(SheetAction("Change Cover…", icon: "photo") {
var seen = Set<String>() var seen = Set<String>()
var acts: [SheetAction] = [ var acts: [SheetAction] = [
@@ -146,6 +148,11 @@ struct MediaMenu {
} }
overlays.actions("Choose a Cover", acts) overlays.actions("Choose a Cover", acts)
}) })
if !pl.items.isEmpty {
a.append(SheetAction("Set Mix for All Songs…", icon: "slider.horizontal.3") {
chooseMix(pl.tracks) { m in lists.setItems(pl.id, pl.items.map { var it = $0; it.mix = MixPresets.normalized(m); return it }) }
})
a.append(SheetAction("Copy to Plex Playlist…", icon: "doc.on.doc") { newPlaylist(pl.tracks) { ui.playlistEdits += 1 } })
} }
a.append(SheetAction("Delete Stem Playlist", icon: "trash", destructive: true) { a.append(SheetAction("Delete Stem Playlist", icon: "trash", destructive: true) {
overlays.confirm("Delete “\(pl.title)”?", "Stem playlists are only on this device.", "Delete") { lists.delete(pl.id); if onPage { ui.pop() } } overlays.confirm("Delete “\(pl.title)”?", "Stem playlists are only on this device.", "Delete") { lists.delete(pl.id); if onPage { ui.pop() } }
+21 -3
View File
@@ -33,6 +33,9 @@ final class Overlays {
/// Set while the Photos picker is up; gets the picked image's data. /// Set while the Photos picker is up; gets the picked image's data.
var photoPick: ((Data) -> Void)? var photoPick: ((Data) -> Void)?
var photoShown = false var photoShown = false
/// A picked cover waiting in the cropper.
var crop: Crop?
struct Crop: Identifiable { let id = UUID(); var image: UIImage; var run: (Data) -> Void }
/// 1 while the Now Playing sheet is up, so its host shows overlays instead of the root's. /// 1 while the Now Playing sheet is up, so its host shows overlays instead of the root's.
var level = 0 var level = 0
@@ -95,7 +98,7 @@ struct OverlayHost: ViewModifier {
private var mine: Bool { overlays.level == level } private var mine: Bool { overlays.level == level }
func body(content: Content) -> some View { func body(content: Content) -> some View {
content content.modifier(CropHost(overlays: overlays, mine: mine))
.overlay { .overlay {
if mine, let h = overlays.hud { if mine, let h = overlays.hud {
HudView(hud: h).transition(.opacity.combined(with: .scale(scale: 0.9))).allowsHitTesting(false) HudView(hud: h).transition(.opacity.combined(with: .scale(scale: 0.9))).allowsHitTesting(false)
@@ -132,8 +135,9 @@ struct OverlayHost: ViewModifier {
photo = nil photo = nil
overlays.photoPick = nil overlays.photoPick = nil
Task { @MainActor in Task { @MainActor in
if let data = try? await item.loadTransferable(type: Data.self) { run(data) } if let data = try? await item.loadTransferable(type: Data.self), let img = UIImage(data: data) {
else { overlays.hud("Couldn't load that photo", "exclamationmark.triangle") } overlays.crop = Overlays.Crop(image: img, run: run)
} else { overlays.hud("Couldn't load that photo", "exclamationmark.triangle") }
} }
} }
.sheet(item: Binding(get: { mine ? overlays.addToPlaylist : nil }, set: { overlays.addToPlaylist = $0 })) { r in .sheet(item: Binding(get: { mine ? overlays.addToPlaylist : nil }, set: { overlays.addToPlaylist = $0 })) { r in
@@ -146,6 +150,20 @@ struct OverlayHost: ViewModifier {
} }
} }
/// The cover cropper, split out to keep OverlayHost's chain small enough to type-check.
private struct CropHost: ViewModifier {
let overlays: Overlays
let mine: Bool
func body(content: Content) -> some View {
content.fullScreenCover(item: Binding(get: { mine ? overlays.crop : nil }, set: { overlays.crop = $0 })) { c in
CoverCropper(image: c.image) { data in
overlays.crop = nil
if let data { c.run(data) }
}
}
}
}
private struct HudView: View { private struct HudView: View {
let hud: Overlays.Hud let hud: Overlays.Hud
var body: some View { var body: some View {
@@ -1336,7 +1336,7 @@ private struct LyricsPanel: View {
if g.playback.source == .Stems && g.playback.stemNames.contains("vocals") { if g.playback.source == .Stems && g.playback.stemNames.contains("vocals") {
HStack(spacing: 12) { HStack(spacing: 12) {
Text("Vocals").font(.subheadline.weight(.semibold)).foregroundStyle(p.label2) Text("Vocals").font(.subheadline.weight(.semibold)).foregroundStyle(p.label2)
Picker("Vocals", selection: Binding(get: { g.playback.karaokeVocals }, set: { g.playback.setKaraokeVocals($0) })) { Picker("Vocals", selection: Binding(get: { g.playback.karaokeVocals }, set: { g.playback.setKaraokeVocals($0, engage: true) })) {
ForEach(KaraokeVocals.allCases, id: \.self) { Text(String(describing: $0)).tag($0) } ForEach(KaraokeVocals.allCases, id: \.self) { Text(String(describing: $0)).tag($0) }
} }
.pickerStyle(.segmented) .pickerStyle(.segmented)
@@ -1346,7 +1346,7 @@ private struct LyricsPanel: View {
let db = g.settings.karaokeSoftDb let db = g.settings.karaokeSoftDb
HStack(spacing: 12) { HStack(spacing: 12) {
Text("Softness").font(.subheadline.weight(.semibold)).foregroundStyle(p.label2) Text("Softness").font(.subheadline.weight(.semibold)).foregroundStyle(p.label2)
Slider(value: Binding(get: { Double(db) }, set: { g.playback.setKaraokeSoftDb(Int($0.rounded())) }), in: -30...(-3), step: 1) Slider(value: Binding(get: { Double(db) }, set: { g.playback.setKaraokeSoftDb(Int($0.rounded()), engage: true) }), in: -30...(-3), step: 1)
Text("\(db) dB").font(.caption).monospacedDigit().foregroundStyle(p.label2).frame(width: 46, alignment: .trailing) Text("\(db) dB").font(.caption).monospacedDigit().foregroundStyle(p.label2).frame(width: 46, alignment: .trailing)
} }
.padding(.horizontal, 28).padding(.top, 8) .padding(.horizontal, 28).padding(.top, 8)
+42 -13
View File
@@ -10,6 +10,8 @@ struct PlaylistsScreen: View {
@State private var reload = 0 @State private var reload = 0
@AppStorage("playlistKind") private var kind = PlaylistKind.Plex @AppStorage("playlistKind") private var kind = PlaylistKind.Plex
private let sort = SortState("playlists", PLAYLIST_SORTS) private let sort = SortState("playlists", PLAYLIST_SORTS)
private let stemSort = SortState("stemPlaylists", STEM_PLAYLIST_SORTS)
@State private var shuffleSeed = 0
private var g: AppGraph { .shared } private var g: AppGraph { .shared }
var body: some View { var body: some View {
@@ -31,7 +33,7 @@ struct PlaylistsScreen: View {
} }
} }
} else { } else {
let stems = g.stemPlaylists.lists let stems = g.stemPlaylists.lists.sorted(stemSort, seed: shuffleSeed)
if stems.isEmpty { if stems.isEmpty {
EmptyState(icon: "slider.horizontal.3", title: "No Stem Playlists", EmptyState(icon: "slider.horizontal.3", title: "No Stem Playlists",
message: "Each song plays with its own mix, like an instrumental or a cappella. Hold any song and choose “Add to Stem Playlist”, or copy a Plex playlist with +.") message: "Each song plays with its own mix, like an instrumental or a cappella. Hold any song and choose “Add to Stem Playlist”, or copy a Plex playlist with +.")
@@ -42,11 +44,12 @@ struct PlaylistsScreen: View {
} }
} }
.toolbar { .toolbar {
if kind == .Plex { ToolbarItem(placement: .topBarTrailing) { SortMenu(sort: sort) } } ToolbarItem(placement: .topBarTrailing) { SortMenu(sort: kind == .Plex ? sort : stemSort) }
ToolbarItem(placement: .topBarTrailing) { ToolbarItem(placement: .topBarTrailing) {
Button { kind == .Plex ? newPlaylist() : newStemPlaylist() } label: { Image(systemName: "plus") } Button { kind == .Plex ? newPlaylist() : newStemPlaylist() } label: { Image(systemName: "plus") }
} }
} }
.onChange(of: stemSort.token) { shuffleSeed += 1 }
.task(id: "\(g.settings.libraryKey)|\(sort.token)|\(reload)|\(ui.playlistEdits)") { .task(id: "\(g.settings.libraryKey)|\(sort.token)|\(reload)|\(ui.playlistEdits)") {
// /playlists may not take sort=random, so Random shuffles here. // /playlists may not take sort=random, so Random shuffles here.
let random = sort.option.random let random = sort.option.random
@@ -140,7 +143,7 @@ struct StemPlaylistScreen: View {
.navigationTitle(pl.title) .navigationTitle(pl.title)
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
} else { } else {
Page(title: pl.title, large: false) { Page(title: pl.title, large: false, pullUp: BAR_PULL) {
header(pl) header(pl)
if pl.items.isEmpty { if pl.items.isEmpty {
EmptyState(icon: "slider.horizontal.3", title: "No Songs", EmptyState(icon: "slider.horizontal.3", title: "No Songs",
@@ -161,7 +164,7 @@ struct StemPlaylistScreen: View {
else { MoreMenu(items: moreItems(pl)) } else { MoreMenu(items: moreItems(pl)) }
} }
} }
.modifier(SplitHidesTitle()) .modifier(SplitHidesTitle(bare: !editing))
} }
private func header(_ pl: StemPlaylist) -> some View { private func header(_ pl: StemPlaylist) -> some View {
@@ -180,15 +183,36 @@ struct StemPlaylistScreen: View {
} }
private func moreItems(_ pl: StemPlaylist) -> [SheetAction] { private func moreItems(_ pl: StemPlaylist) -> [SheetAction] {
let lists = g.stemPlaylists
let edit = pl.items.isEmpty ? [] : [SheetAction("Edit Songs", icon: "list.bullet") { items = pl.items; editing = true }] let edit = pl.items.isEmpty ? [] : [SheetAction("Edit Songs", icon: "list.bullet") { items = pl.items; editing = true }]
let rename = SheetAction("Rename…", icon: "pencil") { return ui.menu.stemPlaylist(pl, extra: edit, onPage: true)
ui.overlays.prompt("Rename Stem Playlist", nil, initial: pl.title, "Save") { lists.rename(pl.id, $0) }
} }
let mixAll = SheetAction("Set Mix for All Songs…", icon: "slider.horizontal.3") { }
ui.menu.chooseMix(pl.tracks) { m in lists.setItems(pl.id, pl.items.map { var it = $0; it.mix = MixPresets.normalized(m); return it }) }
/// Stem playlists live on the device, so they sort here.
let STEM_PLAYLIST_SORTS = [
SortOption(title: "Title", key: "title", up: "A to Z", down: "Z to A"),
SortOption(title: "Date Added", key: "created", desc: true, up: "Oldest First", down: "Newest First"),
SortOption(title: "Last Updated", key: "updated", desc: true, up: "Oldest First", down: "Newest First"),
SortOption(title: "Songs", key: "count", desc: true, up: "Fewest First", down: "Most First"),
SortOption(title: "Duration", key: "duration", desc: true, up: "Shortest First", down: "Longest First"),
SortOption(title: "Random", key: "random", up: "Shuffled", down: "Shuffled"),
]
extension [StemPlaylist] {
func sorted(_ sort: SortState, seed: Int) -> [StemPlaylist] {
let o = sort.option
if o.random {
return map { ($0, ($0.id + "\(seed)").hashValue) }.sorted { $0.1 < $1.1 }.map(\.0)
} }
return ui.menu.stemPlaylist(pl, extra: edit + (pl.items.isEmpty ? [rename] : [rename, mixAll]), onPage: true) let asc: [StemPlaylist]
switch o.key {
case "created": asc = sorted { $0.created < $1.created }
case "updated": asc = sorted { $0.updated < $1.updated }
case "count": asc = sorted { $0.items.count < $1.items.count }
case "duration": asc = sorted { $0.durationMs < $1.durationMs }
default: asc = sorted { $0.title.localizedStandardCompare($1.title) == .orderedAscending }
}
return sort.descending ? asc.reversed() : asc
} }
} }
@@ -255,7 +279,7 @@ struct PlaylistScreen: View {
.navigationTitle(title) .navigationTitle(title)
.navigationBarTitleDisplayMode(.inline) .navigationBarTitleDisplayMode(.inline)
} else { } else {
Page(title: title, large: false) { Page(title: title, large: false, pullUp: BAR_PULL) {
header(list) header(list)
Loaded(state: tracks, retry: { reload += 1 }) { list in Loaded(state: tracks, retry: { reload += 1 }) { list in
ForEach(Array(list.enumerated()), id: \.element.id) { i, t in ForEach(Array(list.enumerated()), id: \.element.id) { i, t in
@@ -273,7 +297,7 @@ struct PlaylistScreen: View {
else { MoreMenu(items: moreItems(list)) } else { MoreMenu(items: moreItems(list)) }
} }
} }
.modifier(SplitHidesTitle()) .modifier(SplitHidesTitle(bare: !editing))
.task(id: reload) { .task(id: reload) {
await LoadState.load($tracks) { try await g.plex.playlistTracks(playlist.ratingKey) } await LoadState.load($tracks) { try await g.plex.playlistTracks(playlist.ratingKey) }
} }
@@ -402,11 +426,16 @@ struct SearchScreen: View {
} }
/// Split at the Duo's hinge the pane's own header already names the playlist, so the bar drops the title. /// Split at the Duo's hinge the pane's own header already names the playlist, so the bar drops the title.
/// How far a playlist page's header rides up into the empty nav bar, between back and •••.
private let BAR_PULL: CGFloat = 40
/// Hides the bar title in split view, and while [bare] (the header already shows it).
private struct SplitHidesTitle: ViewModifier { private struct SplitHidesTitle: ViewModifier {
var bare = false
@Environment(Ui.self) private var ui @Environment(Ui.self) private var ui
func body(content: Content) -> some View { func body(content: Content) -> some View {
content.toolbar { content.toolbar {
if ui.split { ToolbarItem(placement: .principal) { Color.clear.frame(width: 1, height: 1) } } if ui.split || bare { ToolbarItem(placement: .principal) { Color.clear.frame(width: 1, height: 1) } }
} }
} }
} }
+3 -3
View File
@@ -7,9 +7,9 @@ settings:
base: base:
SWIFT_VERSION: "5.0" SWIFT_VERSION: "5.0"
# iOS needs a plain number for the bundle version; the label is what the app and releases show. # iOS needs a plain number for the bundle version; the label is what the app and releases show.
MARKETING_VERSION: "0.10.1" MARKETING_VERSION: "0.11.0"
VERSION_LABEL: "0.10.1" VERSION_LABEL: "0.11.0"
CURRENT_PROJECT_VERSION: "62" CURRENT_PROJECT_VERSION: "67"
# Dev builds override these (build-ipa.sh dev) so they install next to the release app. # Dev builds override these (build-ipa.sh dev) so they install next to the release app.
APP_ID: org.cdnutter.stemify APP_ID: org.cdnutter.stemify
APP_NAME: Stemify APP_NAME: Stemify
+9 -9
View File
@@ -1,11 +1,11 @@
#!/bin/bash #!/bin/bash
# Builds one Stemify IPA on a Mac. ios/scripts/build-remote.sh runs this on WHITE-M1 from DevOps. # Builds one Stemify IPA on a Mac. ios/scripts/build-remote.sh runs this on WHITE-M1AIR from DevOps.
# build-ipa.sh release build/release/stemify-<v>.ipa org.cdnutter.stemify-pub, ad-hoc signed. Gitea releases (main) + Sideload. # build-ipa.sh public build/public/stemify-<v>.ipa org.cdnutter.stemify, ad-hoc signed. Gitea releases (main) + Sideload.
# build-ipa.sh dev build/dev/stemify-<v>-dev.ipa org.cdnutter.stemify-dev, ribbon icon, DEV BUILD banner. # build-ipa.sh dev build/dev/stemify-<v>-dev.ipa org.cdnutter.stemify-dev, ribbon icon, DEV BUILD banner.
# Gitea pre-releases (dev branch) + Sideload Developer. # Gitea pre-releases (dev branch) + Sideload Developer.
# build-ipa.sh prov build/prov/stemify-<v>-prov.ipa org.cdnutter.stemify, signed with the # build-ipa.sh signed build/signed/stemify-<v>-signed.ipa org.cdnutter.stemify, signed with the
# personal profile (CarPlay, Siri). Never published anywhere. # personal profile (CarPlay, Siri). Never published anywhere.
# prov needs prov/Stemify.mobileprovision (App ID org.cdnutter.stemify), prov/key.p12 and P12_PASS. # signed needs prov/Stemify.mobileprovision (App ID org.cdnutter.stemify), prov/key.p12 and P12_PASS.
# prov/StemifyWidgets.mobileprovision (org.cdnutter.stemify.widgets) is optional, without it the widgets are left out. # prov/StemifyWidgets.mobileprovision (org.cdnutter.stemify.widgets) is optional, without it the widgets are left out.
# build/work is scratch and is wiped each run. # build/work is scratch and is wiped each run.
set -euo pipefail set -euo pipefail
@@ -14,10 +14,10 @@ export PATH=/opt/homebrew/bin:$PATH
B=build; OUT=$B/work; APP=$OUT/Payload/Stemify.app; EXT=$APP/PlugIns/StemifyWidgets.appex B=build; OUT=$B/work; APP=$OUT/Payload/Stemify.app; EXT=$APP/PlugIns/StemifyWidgets.appex
MODE=${1:-dev} MODE=${1:-dev}
case $MODE in case $MODE in
release) APP_ID=org.cdnutter.stemify-pub; APP_NAME=Stemify; APP_ICON=AppIcon; SUFFIX= ;; public) APP_ID=org.cdnutter.stemify; APP_NAME=Stemify; APP_ICON=AppIcon; SUFFIX= ;;
dev) APP_ID=org.cdnutter.stemify-dev; APP_NAME=Stemify; APP_ICON=AppIconDev; SUFFIX=-dev ;; dev) APP_ID=org.cdnutter.stemify-dev; APP_NAME=Stemify; APP_ICON=AppIconDev; SUFFIX=-dev ;;
prov) APP_ID=org.cdnutter.stemify; APP_NAME=Stemify; APP_ICON=AppIcon; SUFFIX=-prov ;; signed) APP_ID=org.cdnutter.stemify; APP_NAME=Stemify; APP_ICON=AppIcon; SUFFIX=-signed ;;
*) echo "usage: $0 release|dev|prov" >&2; exit 1 ;; *) echo "usage: $0 public|dev|signed" >&2; exit 1 ;;
esac esac
DD=$B/dd-$MODE DD=$B/dd-$MODE
# Dev builds are marked as such (Info key StemifyChannel) and put the build number in the # Dev builds are marked as such (Info key StemifyChannel) and put the build number in the
@@ -31,7 +31,7 @@ BN=$(sed -nE 's/^ *CURRENT_PROJECT_VERSION: "(.*)"/\1/p' project.yml)
VERSION=$(sed -nE 's/^ *VERSION_LABEL: "(.*)"/\1/p' project.yml | tr 'A-Z' 'a-z' | sed -E 's/ (rc|beta) /-\1/; s/ /-/g') VERSION=$(sed -nE 's/^ *VERSION_LABEL: "(.*)"/\1/p' project.yml | tr 'A-Z' 'a-z' | sed -E 's/ (rc|beta) /-\1/; s/ /-/g')
IPA=$B/$MODE/stemify-$VERSION$SUFFIX.ipa IPA=$B/$MODE/stemify-$VERSION$SUFFIX.ipa
if [ "$MODE" = prov ]; then if [ "$MODE" = signed ]; then
for f in prov/Stemify.mobileprovision prov/key.p12; do [ -f $f ] || { echo "missing $f" >&2; exit 1; }; done for f in prov/Stemify.mobileprovision prov/key.p12; do [ -f $f ] || { echo "missing $f" >&2; exit 1; }; done
[ -n "${P12_PASS:-}" ] || { echo "P12_PASS not set" >&2; exit 1; } [ -n "${P12_PASS:-}" ] || { echo "P12_PASS not set" >&2; exit 1; }
PROF_ID=$(security cms -D -i prov/Stemify.mobileprovision | plutil -extract Entitlements.application-identifier raw -) PROF_ID=$(security cms -D -i prov/Stemify.mobileprovision | plutil -extract Entitlements.application-identifier raw -)
@@ -46,7 +46,7 @@ xcodebuild -project Stemify.xcodeproj -scheme Stemify -configuration Release -sd
cp -R $DD/Build/Products/Release-iphoneos/Stemify.app $APP cp -R $DD/Build/Products/Release-iphoneos/Stemify.app $APP
[ -d $EXT ] || { echo "widget extension missing" >&2; exit 1; } [ -d $EXT ] || { echo "widget extension missing" >&2; exit 1; }
if [ "$MODE" != prov ]; then if [ "$MODE" != signed ]; then
# Ad-hoc signature carrying only the App Group, so Sideloadly/AltStore keep the widgets' shared data when re-signing. # Ad-hoc signature carrying only the App Group, so Sideloadly/AltStore keep the widgets' shared data when re-signing.
cat > $OUT/group.plist <<PL cat > $OUT/group.plist <<PL
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
+7 -7
View File
@@ -1,17 +1,17 @@
#!/bin/bash #!/bin/bash
# Run from DevOps: syncs ios/ to WHITE-M1, builds there, and pulls the IPAs back into ios/build/<mode>. # Run from DevOps: syncs ios/ to WHITE-M1AIR, builds there, and pulls the IPAs back into ios/build/<mode>.
# build-remote.sh dev build (the usual one): build/dev # build-remote.sh dev build (the usual one): build/dev
# build-remote.sh release release build, only when a release is asked for: build/release # build-remote.sh public public build, only when a release is asked for: build/public
# build-remote.sh prov personal signed build: build/prov # build-remote.sh signed personal signed build: build/signed
# build-remote.sh dev prov ... several at once # build-remote.sh dev signed ... several at once
set -euo pipefail set -euo pipefail
cd "$(dirname "$0")/.." cd "$(dirname "$0")/.."
H=${BUILD_HOST:-white-m1}; R=stemify-build/ios H=${BUILD_HOST:-white-m1air}; R=stemify-build/ios
MODES=${*:-dev} MODES=${*:-dev}
for m in $MODES; do case $m in release|dev|prov) ;; *) echo "usage: $0 [release|dev|prov]..." >&2; exit 1 ;; esac; done for m in $MODES; do case $m in public|dev|signed) ;; *) echo "usage: $0 [public|dev|signed]..." >&2; exit 1 ;; esac; done
rsync -a --exclude build --exclude prov --exclude Stemify.xcodeproj ./ $H:$R/ rsync -a --exclude build --exclude prov --exclude Stemify.xcodeproj ./ $H:$R/
for m in $MODES; do for m in $MODES; do
ssh $H "cd $R && P12_PASS=\$(cat prov/cert_pass.txt 2>/dev/null) bash scripts/build-ipa.sh $m" ssh $H "cd $R && P12_PASS=\$(cat prov/cert_pass.txt 2>/dev/null) bash scripts/build-ipa.sh $m"
mkdir -p build/$m && rsync -a $H:$R/build/$m/ build/$m/ mkdir -p build/$m && rsync -a $H:$R/build/$m/ build/$m/
done done
ls build/{release,dev,prov}/stemify-$(sed -nE 's/^ *VERSION_LABEL: "(.*)"/\1/p' project.yml | tr 'A-Z' 'a-z' | sed -E 's/ (rc|beta) /-\1/; s/ /-/g')*.ipa 2>/dev/null ls build/{public,dev,signed}/stemify-$(sed -nE 's/^ *VERSION_LABEL: "(.*)"/\1/p' project.yml | tr 'A-Z' 'a-z' | sed -E 's/ (rc|beta) /-\1/; s/ /-/g')*.ipa 2>/dev/null
+3 -3
View File
@@ -47,7 +47,7 @@ def svg(mode="color", sash=False):
'<stop offset="1" stop-color="#05040A"/></radialGradient>' '<stop offset="1" stop-color="#05040A"/></radialGradient>'
'<rect width="1024" height="1024" fill="url(#bg)"/>') '<rect width="1024" height="1024" fill="url(#bg)"/>')
# soft colored light pooling behind the bars # soft colored light pooling behind the bars
aura = ('<g filter="url(#aura)" opacity="0.55">' aura = ('<g filter="url(#aura)" opacity="0.35">'
f'<circle cx="330" cy="420" r="190" fill="{hx(STEMS[0])}"/>' f'<circle cx="330" cy="420" r="190" fill="{hx(STEMS[0])}"/>'
f'<circle cx="690" cy="400" r="200" fill="{hx(STEMS[4])}"/>' f'<circle cx="690" cy="400" r="200" fill="{hx(STEMS[4])}"/>'
f'<circle cx="520" cy="660" r="210" fill="{hx(STEMS[2])}"/>' f'<circle cx="520" cy="660" r="210" fill="{hx(STEMS[2])}"/>'
@@ -76,11 +76,11 @@ def svg(mode="color", sash=False):
return f'''<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024"> return f'''<svg xmlns="http://www.w3.org/2000/svg" width="1024" height="1024" viewBox="0 0 1024 1024">
<defs>{"".join(defs)} <defs>{"".join(defs)}
<filter id="aura" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="110"/></filter> <filter id="aura" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="110"/></filter>
<filter id="glow" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="26"/></filter> <filter id="glow" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="18"/></filter>
<filter id="drop" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="10"/></filter> <filter id="drop" x="-50%" y="-50%" width="200%" height="200%"><feGaussianBlur stdDeviation="10"/></filter>
</defs> </defs>
{bg}{aura} {bg}{aura}
<g filter="url(#glow)" opacity="{0.25 if tint else 0.7}">{"".join(glow)}</g> <g filter="url(#glow)" opacity="{0.15 if tint else 0.35}">{"".join(glow)}</g>
<g filter="url(#drop)" opacity="0.5" transform="translate(0,14)">{"".join(g.replace('fill="#', 'fill="#000" data-c="') for g in glow)}</g> <g filter="url(#drop)" opacity="0.5" transform="translate(0,14)">{"".join(g.replace('fill="#', 'fill="#000" data-c="') for g in glow)}</g>
<g>{"".join(bars)}</g> <g>{"".join(bars)}</g>
<g>{"".join(shine)}</g> <g>{"".join(shine)}</g>
+7 -7
View File
@@ -1,11 +1,11 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
"""Writes ios/source.json, an AltStore source (SideStore and Feather read it too), from the """Writes ios/source.json, an AltStore source (SideStore and Feather read it too), from the
ios-v* releases on Gitea. Only releases with a stemify-<version>.ipa are listed, since older v* releases on Gitea (org.cdnutter.stemify). The older ios-v* releases were org.cdnutter.stemify-pub
ones used a different bundle ID. Set GITEA_TOKEN if the repo is private.""" and are left out. Set GITEA_TOKEN if the repo is private."""
import json, os, re, urllib.request import json, os, re, urllib.request
REPO = "https://git.iamchrisama.com/cdnutter/stemify" REPO = "https://gitea.iamchrisama.com/cdnutter/stemify"
API = "https://git.iamchrisama.com/api/v1/repos/cdnutter/stemify" API = "https://gitea.iamchrisama.com/api/v1/repos/cdnutter/stemify"
RAW = f"{REPO}/raw/branch/main" RAW = f"{REPO}/raw/branch/main"
HERE = os.path.dirname(os.path.abspath(__file__)) HERE = os.path.dirname(os.path.abspath(__file__))
@@ -34,10 +34,10 @@ builds[slug] = re.search(r'CURRENT_PROJECT_VERSION: "(.*)"', yml)[1]
versions = [] versions = []
for rel in get(API + "/releases?limit=50"): for rel in get(API + "/releases?limit=50"):
v = rel["tag_name"].removeprefix("ios-v") v = rel["tag_name"].removeprefix("v")
ipa = next((a for a in rel["assets"] if a["name"] == f"stemify-{v}.ipa"), None) ipa = next((a for a in rel["assets"] if a["name"] == f"stemify-{v}.ipa"), None)
# Pre-releases are dev builds (org.cdnutter.stemify-dev), they go to Sideload Developer instead. # Pre-releases are dev builds (org.cdnutter.stemify-dev), they go to Sideload Developer instead.
if not rel["tag_name"].startswith("ios-v") or not ipa or rel["prerelease"]: if not rel["tag_name"].startswith("v") or not ipa or rel["prerelease"]:
continue continue
versions.append({ versions.append({
"version": v.split("-")[0], "version": v.split("-")[0],
@@ -58,7 +58,7 @@ source = {
"website": REPO, "website": REPO,
"apps": [{ "apps": [{
"name": "Stemify", "name": "Stemify",
"bundleIdentifier": "org.cdnutter.stemify-pub", "bundleIdentifier": "org.cdnutter.stemify",
"developerName": "cdnutter", "developerName": "cdnutter",
"subtitle": "Plex music player with live stem mixing.", "subtitle": "Plex music player with live stem mixing.",
"localizedDescription": "Plays your Plex library and lets you mute vocals or remix stems on the fly. " "localizedDescription": "Plays your Plex library and lets you mute vocals or remix stems on the fly. "
+12 -13
View File
@@ -1,37 +1,36 @@
#!/bin/bash #!/bin/bash
# Publishes an IPA built by build-remote.sh. Run from DevOps with everything committed. # Publishes an IPA built by build-remote.sh. Run from DevOps with everything committed.
# publish.sh dev on the dev branch: Gitea pre-release ios-v<v>-dev.<build> + Sideload Developer (WHITE-M1 :8093, ?source=dev) # publish.sh dev on the dev branch: Gitea pre-release v<v>-dev.<build> + iOS Repos /dev (WHITE-M1 :8093, ?source=dev)
# publish.sh release on main, only when the owner says so: Gitea release ios-v<v> + Personal (:8093, ?source=personal), then source.json # publish.sh public on main, only when the owner says so: Gitea release v<v> + iOS Repos /personal (:8093, ?source=personal), then source.json
# Release notes come from $NOTES, else the last commit subject. prov builds are never published. # Release notes come from $NOTES, else the last commit subject. signed builds are never published.
set -euo pipefail set -euo pipefail
cd "$(dirname "$0")/.." cd "$(dirname "$0")/.."
MODE=${1:-}; NAME=stemify; TAGP=ios-v MODE=${1:-}; NAME=stemify; TAGP=v
API=https://git.iamchrisama.com/api/v1/repos/cdnutter/stemify API=https://gitea.iamchrisama.com/api/v1/repos/cdnutter/stemify
T=$(sed -n 's#.*://cdnutter:\([^@]*\)@.*#\1#p' ~/.config/gitea/cdnutter.credentials | head -1) T=$(sed -n 's#.*://cdnutter:\([^@]*\)@.*#\1#p' ~/.config/gitea/cdnutter.credentials | head -1)
V=$(sed -nE 's/^ *VERSION_LABEL: "(.*)"/\1/p' project.yml | tr 'A-Z' 'a-z' | sed -E 's/ (rc|beta) /-\1/; s/ /-/g') V=$(sed -nE 's/^ *VERSION_LABEL: "(.*)"/\1/p' project.yml | tr 'A-Z' 'a-z' | sed -E 's/ (rc|beta) /-\1/; s/ /-/g')
BUILD=$(sed -nE 's/^ *CURRENT_PROJECT_VERSION: "(.*)"/\1/p' project.yml) BUILD=$(sed -nE 's/^ *CURRENT_PROJECT_VERSION: "(.*)"/\1/p' project.yml)
LABEL=$(sed -nE 's/^ *VERSION_LABEL: "(.*)"/\1/p' project.yml)
BRANCH=$(git rev-parse --abbrev-ref HEAD) BRANCH=$(git rev-parse --abbrev-ref HEAD)
die() { echo "$*" >&2; exit 1; } die() { echo "$*" >&2; exit 1; }
case $MODE in case $MODE in
dev) WANT=dev; IPA=build/dev/$NAME-$V-dev.ipa; TAG=$TAGP$V-dev.$BUILD; TITLE="Stemify iOS $LABEL Dev Build $BUILD"; PRE=true; UP=http://10.0.0.11:8093; Q='?source=dev' ;; dev) WANT=dev; IPA=build/dev/$NAME-$V-dev.ipa; TAG=$TAGP$V-dev.$BUILD; PRE=true; UP=http://10.0.0.11:8093; Q='?source=dev' ;;
release) WANT=main; IPA=build/release/$NAME-$V.ipa; TAG=$TAGP$V; TITLE="Stemify iOS $LABEL"; PRE=false; UP=http://10.0.0.11:8093; Q='?source=personal' ;; public) WANT=main; IPA=build/public/$NAME-$V.ipa; TAG=$TAGP$V; PRE=false; UP=http://10.0.0.11:8093; Q='?source=personal' ;;
*) die "usage: $0 dev|release" ;; *) die "usage: $0 dev|public" ;;
esac esac
[ "$BRANCH" = "$WANT" ] || die "$MODE builds publish from $WANT (on $BRANCH)" [ "$BRANCH" = "$WANT" ] || die "$MODE builds publish from $WANT (on $BRANCH)"
[ -f "$IPA" ] || die "missing $IPA, run scripts/build-remote.sh $MODE" [ -f "$IPA" ] || die "missing $IPA, run scripts/build-remote.sh $MODE"
git diff --quiet HEAD || die "uncommitted changes" git diff --quiet HEAD || die "uncommitted changes"
[ "$(curl -s -o /dev/null -w '%{http_code}' -H "Authorization: token $T" $API/releases/tags/$TAG)" = 404 ] \ [ "$(curl -s -o /dev/null -w '%{http_code}' -H "Authorization: token $T" $API/releases/tags/$TAG)" = 404 ] \
|| die "$TAG already exists, bump CURRENT_PROJECT_VERSION (dev) or VERSION_LABEL (release)" || die "$TAG already exists, bump CURRENT_PROJECT_VERSION (dev) or VERSION_LABEL (public)"
git push -q -u origin $BRANCH git push -q -u origin $BRANCH
BODY=${NOTES:-$(git log -1 --format=%s)} BODY=${NOTES:-$(git log -1 --format=%s)}
ID=$(jq -n --arg t "$TAG" --arg n "$TITLE" --arg c "$(git rev-parse HEAD)" --arg b "$BODY" --argjson p $PRE \ ID=$(jq -n --arg t "$TAG" --arg c "$(git rev-parse HEAD)" --arg b "$BODY" --argjson p $PRE \
'{tag_name:$t, target_commitish:$c, name:$n, body:$b, prerelease:$p}' | '{tag_name:$t, target_commitish:$c, name:$t, body:$b, prerelease:$p}' |
curl -fsS -H "Authorization: token $T" -H 'Content-Type: application/json' -d @- $API/releases | jq -r .id) curl -fsS -H "Authorization: token $T" -H 'Content-Type: application/json' -d @- $API/releases | jq -r .id)
curl -fsS -o /dev/null -H "Authorization: token $T" -F "attachment=@$IPA" "$API/releases/$ID/assets?name=$(basename $IPA)" curl -fsS -o /dev/null -H "Authorization: token $T" -F "attachment=@$IPA" "$API/releases/$ID/assets?name=$(basename $IPA)"
curl -fsS -o /dev/null -X POST --data-binary @$IPA "$UP/api/upload/ipa$Q" curl -fsS -o /dev/null -X POST --data-binary @$IPA "$UP/api/upload/ipa$Q"
echo "published $TAG ($(basename $IPA)) to Gitea and $UP" echo "published $TAG ($(basename $IPA)) to Gitea and $UP"
if [ $MODE = release ]; then if [ $MODE = public ]; then
GITEA_TOKEN=$T python3 scripts/make-source.py GITEA_TOKEN=$T python3 scripts/make-source.py
git add source.json && git commit -qm "iOS source.json for $TAG" && git push -q origin main git add source.json && git commit -qm "iOS source.json for $TAG" && git push -q origin main
fi fi
+7 -7
View File
@@ -1,9 +1,9 @@
{ {
"name": "Stemify", "name": "Stemify",
"identifier": "org.cdnutter.stemify.source", "identifier": "org.cdnutter.stemify.source",
"sourceURL": "https://git.iamchrisama.com/cdnutter/stemify/raw/branch/main/ios/source.json", "sourceURL": "https://gitea.iamchrisama.com/cdnutter/stemify/raw/branch/main/ios/source.json",
"iconURL": "https://git.iamchrisama.com/cdnutter/stemify/raw/branch/main/ios/Stemify/Resources/Assets.xcassets/AppIcon.appiconset/icon.png", "iconURL": "https://gitea.iamchrisama.com/cdnutter/stemify/raw/branch/main/ios/Stemify/Resources/Assets.xcassets/AppIcon.appiconset/icon.png",
"website": "https://git.iamchrisama.com/cdnutter/stemify", "website": "https://gitea.iamchrisama.com/cdnutter/stemify",
"apps": [ "apps": [
{ {
"name": "Stemify", "name": "Stemify",
@@ -11,7 +11,7 @@
"developerName": "cdnutter", "developerName": "cdnutter",
"subtitle": "Plex music player with live stem mixing.", "subtitle": "Plex music player with live stem mixing.",
"localizedDescription": "Plays your Plex library and lets you mute vocals or remix stems on the fly. Works offline with downloads, and in the car with CarPlay.", "localizedDescription": "Plays your Plex library and lets you mute vocals or remix stems on the fly. Works offline with downloads, and in the car with CarPlay.",
"iconURL": "https://git.iamchrisama.com/cdnutter/stemify/raw/branch/main/ios/Stemify/Resources/Assets.xcassets/AppIcon.appiconset/icon.png", "iconURL": "https://gitea.iamchrisama.com/cdnutter/stemify/raw/branch/main/ios/Stemify/Resources/Assets.xcassets/AppIcon.appiconset/icon.png",
"tintColor": "#FA2D48", "tintColor": "#FA2D48",
"category": "entertainment", "category": "entertainment",
"versions": [ "versions": [
@@ -21,7 +21,7 @@
"buildVersion": "52", "buildVersion": "52",
"date": "2026-11-20T12:25:58-08:00", "date": "2026-11-20T12:25:58-08:00",
"localizedDescription": "Folded art-left: art's left edge matches the controls' padding", "localizedDescription": "Folded art-left: art's left edge matches the controls' padding",
"downloadURL": "https://git.iamchrisama.com/cdnutter/stemify/releases/download/ios-v0.10.1/stemify-0.10.1.ipa", "downloadURL": "https://gitea.iamchrisama.com/cdnutter/stemify/releases/download/ios-v0.10.1/stemify-0.10.1.ipa",
"size": 3142623, "size": 3142623,
"minOSVersion": "17.0" "minOSVersion": "17.0"
}, },
@@ -31,7 +31,7 @@
"buildVersion": "40", "buildVersion": "40",
"date": "2026-11-19T22:26:40-08:00", "date": "2026-11-19T22:26:40-08:00",
"localizedDescription": "## iOS\n\n- New app icon: glowing stem-colored capsules on a night gradient.\n- Plays straight from Plex when the stem server is off or can't be reached. Stems come back once it's reachable again.\n- Picks the Plex server address again after a network change, when the app returns to the foreground, and when a stream fails.\n- Folded Now Playing uses the space at the bottom and shows bigger art.\n- iPhone Duo:\n - Folded is portrait only, and unfolded is landscape only.\n - Left-aligned art applies only when folded.\n - Unfolded stem bars are full width with roomier rows.\n - Deck stems fill the pane down to the hinge and the bottom edge.\n - Tab bar slots stay put across fold and unfold.\n\n## Web player\n\n- New layout: icon sidebar, blurred-art album headers, track table with an album column, play on card hover.\n- Graphite is the new default theme.\n- Album art can expand into a tile in the sidebar.\n- The mixer has vertical channel strips with live level meters. Drag anywhere on a strip, or use the wheel or arrow keys.\n- Save mix and Add to playlist buttons sit under the mixer.\n- The queue button moved to the right side of the player bar.\n- Tracks without stems are tagged NO STEMS.\n- Explanatory text is gone, and the playlist list is gone from the sidebar.\n- Assets are cache-busted, so a plain reload picks up new versions.", "localizedDescription": "## iOS\n\n- New app icon: glowing stem-colored capsules on a night gradient.\n- Plays straight from Plex when the stem server is off or can't be reached. Stems come back once it's reachable again.\n- Picks the Plex server address again after a network change, when the app returns to the foreground, and when a stream fails.\n- Folded Now Playing uses the space at the bottom and shows bigger art.\n- iPhone Duo:\n - Folded is portrait only, and unfolded is landscape only.\n - Left-aligned art applies only when folded.\n - Unfolded stem bars are full width with roomier rows.\n - Deck stems fill the pane down to the hinge and the bottom edge.\n - Tab bar slots stay put across fold and unfold.\n\n## Web player\n\n- New layout: icon sidebar, blurred-art album headers, track table with an album column, play on card hover.\n- Graphite is the new default theme.\n- Album art can expand into a tile in the sidebar.\n- The mixer has vertical channel strips with live level meters. Drag anywhere on a strip, or use the wheel or arrow keys.\n- Save mix and Add to playlist buttons sit under the mixer.\n- The queue button moved to the right side of the player bar.\n- Tracks without stems are tagged NO STEMS.\n- Explanatory text is gone, and the playlist list is gone from the sidebar.\n- Assets are cache-busted, so a plain reload picks up new versions.",
"downloadURL": "https://git.iamchrisama.com/cdnutter/stemify/releases/download/ios-v0.10.0/stemify-0.10.0.ipa", "downloadURL": "https://gitea.iamchrisama.com/cdnutter/stemify/releases/download/ios-v0.10.0/stemify-0.10.0.ipa",
"size": 3124915, "size": 3124915,
"minOSVersion": "17.0" "minOSVersion": "17.0"
}, },
@@ -41,7 +41,7 @@
"buildVersion": "31", "buildVersion": "31",
"date": "2026-11-18T17:21:50-08:00", "date": "2026-11-18T17:21:50-08:00",
"localizedDescription": "Stemify iOS 0.9.0: Duo split layout, Library Layout in Settings, folded Duo fixes.", "localizedDescription": "Stemify iOS 0.9.0: Duo split layout, Library Layout in Settings, folded Duo fixes.",
"downloadURL": "https://git.iamchrisama.com/cdnutter/stemify/releases/download/ios-v0.9.0/stemify-0.9.0.ipa", "downloadURL": "https://gitea.iamchrisama.com/cdnutter/stemify/releases/download/ios-v0.9.0/stemify-0.9.0.ipa",
"size": 2710062, "size": 2710062,
"minOSVersion": "17.0" "minOSVersion": "17.0"
} }