fix: capitalize Terebi application name

This commit is contained in:
2026-10-18 20:05:12 +02:00
parent 0e860b2ef6
commit 2e61bd7864
5 changed files with 22 additions and 21 deletions
+3 -3
View File
@@ -12,10 +12,10 @@ enum TerebiBootstrap {
let payload = app.appendingPathComponent("Contents/Frameworks/libterebi-player.dylib")
guard let library = dlopen(payload.path, RTLD_NOW | RTLD_LOCAL) else {
let detail = dlerror().map { String(cString: $0) } ?? "The dynamic loader could not load the player."
fail("Could not load the player: \(detail)\n\nPlayer library: \(payload.path)\nRebuild and reinstall terebi.")
fail("Could not load the player: \(detail)\n\nPlayer library: \(payload.path)\nRebuild and reinstall Terebi.")
}
guard let entry = dlsym(library, "terebi_app_main") else {
fail("The player library is missing its application entry point. Rebuild and reinstall terebi.")
fail("The player library is missing its application entry point. Rebuild and reinstall Terebi.")
}
// Keep the declared app executable alive so LaunchServices retains its identity.
typealias PlayerMain = @convention(c) () -> Void
@@ -29,7 +29,7 @@ enum TerebiBootstrap {
application.activate(ignoringOtherApps: true)
let alert = NSAlert()
alert.alertStyle = .critical
alert.messageText = "terebi could not start"
alert.messageText = "Terebi could not start"
alert.informativeText = message
alert.addButton(withTitle: "Quit")
alert.runModal()
+11 -11
View File
@@ -220,7 +220,7 @@ final class PlayerModel: ObservableObject {
guard canCast, let source = currentMedia, let handle else { return }
cancelYouTubeResolution()
commandError = nil
casting.start(to: device, source: source, title: fileName ?? "terebi", subtitle: selectedSubtitle,
casting.start(to: device, source: source, title: fileName ?? "Terebi", subtitle: selectedSubtitle,
handle: handle, snapshot: state, playing: playing ?? effectivePlaying,
volume: volume, audibleVolume: lastAudibleVolume)
revealControls()
@@ -555,7 +555,7 @@ final class PlayerModel: ObservableObject {
isSeeking = false
seekPosition = 0
window?.representedURL = source.url
window?.title = fileName ?? "terebi"
window?.title = fileName ?? "Terebi"
revealControls()
systemPlayback?.update()
}
@@ -711,7 +711,7 @@ final class PlayerModel: ObservableObject {
commandError = nil
isSeeking = false
window?.representedURL = nil
window?.title = "terebi"
window?.title = "Terebi"
revealControls()
systemPlayback?.update()
}
@@ -762,7 +762,7 @@ final class PlayerModel: ObservableObject {
func attachWindow(_ window: NSWindow) {
guard self.window !== window else { return }
self.window = window
window.title = fileName ?? "terebi"
window.title = fileName ?? "Terebi"
window.contentMinSize = NSSize(width: 400, height: 240)
compactWindow.normalVideoLayout = { [weak self] in
guard let self, self.showsQueue, self.state.has_video else { return nil }
@@ -1978,7 +1978,7 @@ private struct PlayerContent: View {
private func compactTitleLabel(progress: String?, constrained: Bool) -> some View {
HStack(spacing: 0) {
Text(model.fileName ?? "terebi")
Text(model.fileName ?? "Terebi")
.lineLimit(1)
.truncationMode(.tail)
.frame(minWidth: 0, maxWidth: constrained ? .infinity : nil, alignment: .leading)
@@ -2069,11 +2069,11 @@ private struct PlayerContent: View {
} else {
Image(systemName: "play.rectangle.fill").font(.system(size: 14))
}
Text(model.fileName ?? "terebi")
Text(model.fileName ?? "Terebi")
.font(.system(size: 13, weight: .semibold))
.lineLimit(1)
.truncationMode(.tail)
.help(model.fileName ?? "terebi")
.help(model.fileName ?? "Terebi")
}
.padding(.horizontal, 8)
.frame(height: 24)
@@ -2491,7 +2491,7 @@ private struct PlayerContent: View {
.foregroundStyle(Color(SunsetPalette.accent))
.accessibilityHidden(true)
VStack(alignment: .leading, spacing: 4) {
Text("terebi").font(.system(size: 20, weight: .semibold))
Text("Terebi").font(.system(size: 20, weight: .semibold))
.foregroundStyle(Color(SunsetPalette.text))
Text("Open media to get started")
.font(.callout)
@@ -2603,7 +2603,7 @@ private struct PlayerContent: View {
}
.font(.system(size: 11, weight: .medium))
.accessibilityElement(children: .combine)
.help((model.fileName ?? "terebi") + (progress.map { " · \($0)" } ?? ""))
.help((model.fileName ?? "Terebi") + (progress.map { " · \($0)" } ?? ""))
.padding(.horizontal, 8)
.frame(height: 28)
.background(PlayerGlass(cornerRadius: 10).clipShape(RoundedRectangle(cornerRadius: 10)).allowsHitTesting(false))
@@ -2848,7 +2848,7 @@ struct TerebiApp: App {
@StateObject private var model = PlayerModel.shared
var body: some Scene {
Window("\(model.fileName ?? "terebi")", id: "terebi") {
Window("\(model.fileName ?? "Terebi")", id: "terebi") {
PlayerContent(model: model)
.focusedSceneObject(model)
}
@@ -2874,7 +2874,7 @@ public func terebiAppMain() {
NSApp.activate(ignoringOtherApps: true)
let alert = NSAlert()
alert.alertStyle = .critical
alert.messageText = "Could not load terebi configuration"
alert.messageText = "Could not load Terebi configuration"
alert.informativeText = error.localizedDescription
alert.runModal()
exit(78)