Skip to content

Commit a53dc36

Browse files
committed
Add support for fetching and showing artist image & bio
Adds support for fetching and showing artist image & bio from MusicBrainz, TMDB, and Wikidata, in case images are not available, user can manually set an image via search using those providers or an absolute image URL.
1 parent 9739439 commit a53dc36

29 files changed

Lines changed: 1289 additions & 122 deletions

.swiftlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ custom_rules:
172172
space_after_comment:
173173
included: ".*\\.swift"
174174
name: "Space After Comment"
175-
regex: '(\/\/\w+)'
175+
regex: '(?<!:)(\/\/\w+)'
176176
message: "Add a space after //"
177177
severity: warning
178178

ACKNOWLEDGEMENTS.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,8 +165,38 @@ Individual codec library licenses can be found in their respective source reposi
165165

166166
---
167167

168+
## Online Data Sources
169+
170+
Petrichor fetches artist metadata from the following online services:
171+
172+
### Artist Images
173+
174+
- **MusicBrainz** - https://musicbrainz.org/
175+
- Used to search for artist identifiers and Wikidata links
176+
- Licensed under [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
177+
178+
- **Wikidata / Wikimedia Commons** - https://www.wikidata.org/
179+
- Used to resolve artist images from Wikidata entities
180+
- Licensed under [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
181+
182+
- **TMDB (The Movie Database)** - https://www.themoviedb.org/
183+
- Used as a fallback source for artist images
184+
- This product uses the TMDB API but is not endorsed or certified by TMDB
185+
186+
### Artist Biographies
187+
188+
- **Last.fm** - https://www.last.fm/
189+
- Used to fetch artist biography summaries
190+
191+
### Lyrics
192+
193+
- **LRCLIB** - https://lrclib.net/
194+
- Used to fetch song lyrics when not available locally
195+
196+
---
197+
168198
## Acknowledgments
169199

170-
Petrichor is grateful to all the open source projects and their contributors that make high-quality audio playback on macOS possible.
200+
Petrichor is grateful to all the open source projects, data sources, and their contributors that make this app possible.
171201

172-
_Last Updated: November 2025_
202+
_Last Updated: March 2026_

Configuration/Info.plist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,9 @@
6464
<string>$(LASTFM_API_KEY)</string>
6565
<key>LASTFM_SHARED_SECRET</key>
6666
<string>$(LASTFM_SHARED_SECRET)</string>
67+
68+
<!-- TMDB -->
69+
<key>TMDB_READ_ACCESS_TOKEN</key>
70+
<string>$(TMDB_READ_ACCESS_TOKEN)</string>
6771
</dict>
6872
</plist>
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// Last.fm API Credentials
22
// Copy this file to Secrets.xcconfig and fill in your own values
33
// Get your API key at: https://www.last.fm/api/account/create
4-
LASTFM_API_KEY =
5-
LASTFM_SHARED_SECRET =
4+
LASTFM_API_KEY =
5+
LASTFM_SHARED_SECRET =
6+
7+
// TMDB API Credentials
8+
// Get your token at: https://www.themoviedb.org/settings/api
9+
TMDB_READ_ACCESS_TOKEN =

0 commit comments

Comments
 (0)