Skip to content

Commit

Permalink
Merge pull request #46 from kyan/dr-json
Browse files Browse the repository at this point in the history
Use updated JSON endpoint
  • Loading branch information
whomwah authored Jan 31, 2022
2 parents 091b307 + 9108e74 commit d9e715e
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 13 deletions.
8 changes: 4 additions & 4 deletions KyanBar.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand All @@ -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;
Expand Down
18 changes: 11 additions & 7 deletions KyanBar/Preview Content/exampleTrack.json
Original file line number Diff line number Diff line change
@@ -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
}
9 changes: 8 additions & 1 deletion KyanBar/models/Track.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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: ""
)
}
2 changes: 1 addition & 1 deletion KyanBar/views/TrackView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
8 changes: 8 additions & 0 deletions appcast.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
<rss xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle" version="2.0">
<channel>
<title>KyanBar</title>
<item>
<title>2.2.0</title>
<pubDate>Mon, 31 Jan 2022 12:46:46 +0000</pubDate>
<sparkle:version>8</sparkle:version>
<sparkle:shortVersionString>2.2.0</sparkle:shortVersionString>
<sparkle:minimumSystemVersion>12.0</sparkle:minimumSystemVersion>
<enclosure url="https://github.com/kyan/kyan_bar/releases/download/2.2.0/KyanBar.2.2.0.zip" length="1541108" type="application/octet-stream" sparkle:edSignature="ys/3AmGgiQKTLuh0F7bVbMJ9I3jEBEJYi7WxImjiGlCKO79BzPeTWHYXaqEbzsfCVF1YcERAsntZw6HAzGuwAQ=="/>
</item>
<item>
<title>2.1.0</title>
<pubDate>Fri, 10 Dec 2021 11:36:43 +0000</pubDate>
Expand Down

0 comments on commit d9e715e

Please sign in to comment.