From 790682f2ba3ef475d60cc154019791c02c3a0eae Mon Sep 17 00:00:00 2001 From: Duncan Robertson Date: Thu, 27 Jan 2022 14:23:16 +0000 Subject: [PATCH 1/2] Refactor to use new json format --- KyanBar/Preview Content/exampleTrack.json | 18 +++++++++++------- KyanBar/models/Track.swift | 9 ++++++++- KyanBar/views/TrackView.swift | 2 +- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/KyanBar/Preview Content/exampleTrack.json b/KyanBar/Preview Content/exampleTrack.json index c392bac..25d84ad 100644 --- a/KyanBar/Preview Content/exampleTrack.json +++ b/KyanBar/Preview Content/exampleTrack.json @@ -1,11 +1,15 @@ { + "spotify": "https://open.spotify.com/track/73H5jxtNuncvfrfBuLcItL", "title": "Hotel California - 2013 Remaster", "artist": "Eagles", - "album": "Hotel California (2013 Remaster) (1976)", - "image": "https://i.scdn.co/image/ab67616d0000b2734637341b9f507521afa9a778", - "rating": "Rating: 2", - "voted_by": "Voted by: 4 users", - "played": "Played: 63 times", - "last_played": "Last Played: 2 days ago", - "added_by": "Added by BRH 10 minutes ago" + "album": "Hotel California (2013 Remaster)", + "year": "1976", + "image": "https://i.scdn.co/image/ab67616d0000b273db01d8ba247c49baaa189935", + "metrics": { + "rating" :-5, + "votes" :0, + "plays" :1}, + "added_by": "Duncan Robertson", + "added_at": "5 minutes ago", + "last_played": null } diff --git a/KyanBar/models/Track.swift b/KyanBar/models/Track.swift index 6bfa2cf..d9e8735 100644 --- a/KyanBar/models/Track.swift +++ b/KyanBar/models/Track.swift @@ -12,10 +12,17 @@ struct Track: Decodable { let artist: String let album: String let image: String + let year: String } extension Track { // A construction of `Track` that can be used when no data has // been loaded. - static let placeholder = Track(title: "Loading...", artist: "", album: "", image: "") + static let placeholder = Track( + title: "Loading...", + artist: "", + album: "", + image: "", + year: "" + ) } diff --git a/KyanBar/views/TrackView.swift b/KyanBar/views/TrackView.swift index 24102e8..ed9fa12 100644 --- a/KyanBar/views/TrackView.swift +++ b/KyanBar/views/TrackView.swift @@ -25,7 +25,7 @@ struct TrackView: View { Text(track.title) .fontWeight(.bold) .fixedSize(horizontal: false, vertical: true) - Text(track.album) + Text("\(track.album) (\(track.year))") Text(track.artist).fontWeight(.light) } .font(.system(.footnote, design: .rounded)) From 9108e74ce8d268a73d5b0acf0ee2dca88d7ab532 Mon Sep 17 00:00:00 2001 From: Duncan Robertson Date: Mon, 31 Jan 2022 13:44:20 +0000 Subject: [PATCH 2/2] Bump to v2.2.0 --- KyanBar.xcodeproj/project.pbxproj | 8 ++++---- appcast.xml | 8 ++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/KyanBar.xcodeproj/project.pbxproj b/KyanBar.xcodeproj/project.pbxproj index 28be70b..9ffa566 100644 --- a/KyanBar.xcodeproj/project.pbxproj +++ b/KyanBar.xcodeproj/project.pbxproj @@ -536,7 +536,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 8; DEVELOPMENT_ASSET_PATHS = "\"KyanBar/Preview Content\""; DEVELOPMENT_TEAM = 9QTT9CVFB6; ENABLE_HARDENED_RUNTIME = YES; @@ -549,7 +549,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MARKETING_VERSION = 2.1.0; + MARKETING_VERSION = 2.2.0; PRODUCT_BUNDLE_IDENTIFIER = com.kyan.KyanBar; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -567,7 +567,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 8; DEVELOPMENT_ASSET_PATHS = "\"KyanBar/Preview Content\""; DEVELOPMENT_TEAM = 9QTT9CVFB6; ENABLE_HARDENED_RUNTIME = YES; @@ -580,7 +580,7 @@ "$(inherited)", "@executable_path/../Frameworks", ); - MARKETING_VERSION = 2.1.0; + MARKETING_VERSION = 2.2.0; PRODUCT_BUNDLE_IDENTIFIER = com.kyan.KyanBar; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/appcast.xml b/appcast.xml index 9bb290c..5284911 100644 --- a/appcast.xml +++ b/appcast.xml @@ -2,6 +2,14 @@ KyanBar + + 2.2.0 + Mon, 31 Jan 2022 12:46:46 +0000 + 8 + 2.2.0 + 12.0 + + 2.1.0 Fri, 10 Dec 2021 11:36:43 +0000