From ec1ffcb0b16fb0af21e4e2e499b039340230907f Mon Sep 17 00:00:00 2001 From: Sven Date: Wed, 8 Apr 2026 17:47:47 +0200 Subject: [PATCH] =?UTF-8?q?Version=201.3=20f=C3=BCr=20App=20Store?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project.pbxproj | 8 +-- .../SubsonicLogo.imageset/Contents.json | 15 ++++ .../SubsonicLogo.imageset/subsonic_94696.svg | 24 +++++++ ViewsComponentsProviderBadge.swift | 70 +++++++++++++------ 4 files changed, 90 insertions(+), 27 deletions(-) create mode 100644 Mobile Music Assistant/Assets.xcassets/SubsonicLogo.imageset/Contents.json create mode 100644 Mobile Music Assistant/Assets.xcassets/SubsonicLogo.imageset/subsonic_94696.svg diff --git a/Mobile Music Assistant.xcodeproj/project.pbxproj b/Mobile Music Assistant.xcodeproj/project.pbxproj index ec18de1..aaa5109 100644 --- a/Mobile Music Assistant.xcodeproj/project.pbxproj +++ b/Mobile Music Assistant.xcodeproj/project.pbxproj @@ -274,8 +274,8 @@ INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -310,8 +310,8 @@ INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchScreen_Generation = YES; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", diff --git a/Mobile Music Assistant/Assets.xcassets/SubsonicLogo.imageset/Contents.json b/Mobile Music Assistant/Assets.xcassets/SubsonicLogo.imageset/Contents.json new file mode 100644 index 0000000..aa28631 --- /dev/null +++ b/Mobile Music Assistant/Assets.xcassets/SubsonicLogo.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "subsonic_94696.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/Mobile Music Assistant/Assets.xcassets/SubsonicLogo.imageset/subsonic_94696.svg b/Mobile Music Assistant/Assets.xcassets/SubsonicLogo.imageset/subsonic_94696.svg new file mode 100644 index 0000000..258feee --- /dev/null +++ b/Mobile Music Assistant/Assets.xcassets/SubsonicLogo.imageset/subsonic_94696.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ViewsComponentsProviderBadge.swift b/ViewsComponentsProviderBadge.swift index 93c7dcd..5b2f909 100644 --- a/ViewsComponentsProviderBadge.swift +++ b/ViewsComponentsProviderBadge.swift @@ -48,12 +48,21 @@ struct ProviderBadge: View { var body: some View { HStack(spacing: 4) { ForEach(providers, id: \.self) { provider in - Image(systemName: provider.icon) - .font(.system(size: 9, weight: .bold)) - .foregroundStyle(.white) - .frame(width: 20, height: 20) - .background(.black.opacity(0.55)) - .clipShape(Circle()) + if let assetName = provider.logoAssetName { + Image(assetName) + .resizable() + .aspectRatio(contentMode: .fill) + .frame(width: 30, height: 30) + .background(.black.opacity(0.55)) + .clipShape(Circle()) + } else { + Image(systemName: provider.icon) + .font(.system(size: 14, weight: .bold)) + .foregroundStyle(.white) + .frame(width: 30, height: 30) + .background(.black.opacity(0.55)) + .clipShape(Circle()) + } } } } @@ -76,24 +85,35 @@ enum MusicProvider: Hashable { case filesystem case jellyfin case dlna + case ardAudiothek - /// SF Symbol name for this provider. + /// Asset catalog image name for providers that have a custom logo. + /// Returns `nil` when the provider uses an SF Symbol instead. + var logoAssetName: String? { + switch self { + case .subsonic: return "SubsonicLogo" + default: return nil + } + } + + /// SF Symbol name for this provider (used when `logoAssetName` is nil). var icon: String { switch self { - case .library: return "building.columns.fill" - case .subsonic: return "ferry.fill" - case .spotify: return "antenna.radiowaves.left.and.right.circle.fill" - case .tidal: return "water.waves" - case .qobuz: return "hifispeaker.fill" - case .plex: return "play.square.stack.fill" - case .ytmusic: return "play.rectangle.fill" - case .appleMusic: return "applelogo" - case .deezer: return "waveform" - case .soundcloud: return "cloud.fill" - case .tunein: return "radio.fill" - case .filesystem: return "folder.fill" - case .jellyfin: return "server.rack" - case .dlna: return "wifi" + case .library: return "building.columns.fill" + case .subsonic: return "ferry.fill" + case .spotify: return "antenna.radiowaves.left.and.right.circle.fill" + case .tidal: return "water.waves" + case .qobuz: return "hifispeaker.fill" + case .plex: return "play.square.stack.fill" + case .ytmusic: return "play.rectangle.fill" + case .appleMusic: return "applelogo" + case .deezer: return "waveform" + case .soundcloud: return "cloud.fill" + case .tunein: return "radio.fill" + case .filesystem: return "folder.fill" + case .jellyfin: return "server.rack" + case .dlna: return "wifi" + case .ardAudiothek: return "antenna.radiowaves.left.and.right" } } @@ -115,6 +135,8 @@ enum MusicProvider: Hashable { if scheme.hasPrefix("filesystem") { return .filesystem } if scheme.hasPrefix("jellyfin") { return .jellyfin } if scheme.hasPrefix("dlna") { return .dlna } + if scheme.hasPrefix("ard_audiothek") { return .ardAudiothek } + if scheme.hasPrefix("ard") { return .ardAudiothek } return nil } @@ -134,8 +156,10 @@ enum MusicProvider: Hashable { if k.hasPrefix("soundcloud") { return .soundcloud } if k.hasPrefix("tunein") { return .tunein } if k.hasPrefix("filesystem") { return .filesystem } - if k.hasPrefix("jellyfin") { return .jellyfin } - if k.hasPrefix("dlna") { return .dlna } + if k.hasPrefix("jellyfin") { return .jellyfin } + if k.hasPrefix("dlna") { return .dlna } + if k.hasPrefix("ard_audiothek") { return .ardAudiothek } + if k.hasPrefix("ard") { return .ardAudiothek } // Image-only metadata providers — not a music source if k == "lastfm" || k == "musicbrainz" || k == "fanarttv" { return nil }