Skip to content

New feature: show artist images#1107

Merged
digimezzo merged 62 commits into
digimezzo:masterfrom
FranzDeschler:feature/artist-images
Jul 1, 2026
Merged

New feature: show artist images#1107
digimezzo merged 62 commits into
digimezzo:masterfrom
FranzDeschler:feature/artist-images

Conversation

@FranzDeschler

Copy link
Copy Markdown
Contributor

Dopamine is great! But I´m missing artist images so I added this feature by myself and I hope you like it too.

Startup
During startup, when the user is asked whether to download album images, there is now the option to download artist images as well. This option is disabled by default so Dopamine stays the same until it´s enabled explicitly.
startup-online

Artists & Albums settings
The option can also be enabled or disabled in the "Artists & Albums" section (previously just called "Albums" - but I thought this is the right place for this option).
Here you can also find the options to reload the images in the same way as the album images.
artists+albums

Artists section
When enabled, artist images are downloaded from the internet and displayed in the "Artists" section.
artists

Known Issues
I´m using the existing APIs for loading artist metadata and images. I noticed, that in some cases no image can be found because the last.fm API doesn´t provide a MusicBrainz-Id or the artist is ambiguous. I will try to find a solution for that.

Technical details
Here is an overview over the technical changes I made:

  • In the database, there is a new table called ArtistArtwork that holds artists and the corresponding artwork ID.
  • In the Track table, there is an additional column called ArtistsKey. That key contains the individual artists of the track respecting the artistSplitSeparators and artistSplitExceptions settings.
  • During indexing, the ArtistsKey is generated if missing.
  • If the showArtistImages option is enabled, the images of each individual artist is downloaded and stored in the cache. The cacheId is stored as ArtworkId in the database.
  • If the image could not be loaded because of an error, no entry is added to the ArtistArtwork table and the application retries to download the image the next time.
  • If no image could be found (which is a valid result) the ArtistArtwork table contains a default cache-Id. This defauld-Id simply indicates that there is no artist image and so, an empty image is shown. This solution avoids reloading images that just can´t be found.

No AI - almost
I used AI to do the translations. Everything else is 100% natural intelligence ;-)

Database tests
I noticed that there are no database tests. And I also noticed why. The regular unit tests are executed in the node runtime but the sqlite database is compiled for the electron runtime. I solved this by splitting the tests into the regular tests and separate database-tests.

  1. The regular tests (running in the node runtime) simply ignore the database tests.
  2. The database-tests (npm run test-database-integration) only execute the database tests. In this case, Jest is executed inside the electron runtime. This allows to use an in-memory sqlite database for the tests without the need of rebuilding sqlite.

I know there are a lot of changes. So take your time reviewing and testing.
I gave my best to match your code style and technical approaches. I hope you appreciate my effort and I´m looking forward to see this feature in production one day :-)

# Conflicts:
#	package-lock.json
#	src/app/app.module.ts
#	src/app/services/indexing/indexing.service.spec.ts
#	src/app/services/indexing/indexing.service.ts
#	src/app/ui/components/manage-collection/manage-collection.component.html
#	src/assets/i18n/he.json
@FranzDeschler

Copy link
Copy Markdown
Contributor Author

As mentioned above, the last.fm API sometimes doesn't provide a MusicBrainz-Id or it provides an invalid Id. I improved this by adding the MusicBrainz API as fallback. I don't like using so many different APIs but the MusicBrainz API returns not only one artist, but several findings that also include aliases.
So I can search the result for the correct artist by its name or even by an alias to find the correct Id.
With this solution, I get an artist image for almost every single artist in my entire library.

# Conflicts:
#	src/app/common/application/i18n.spec.ts
#	src/app/data/database-migrator.ts
#	src/app/services/indexing/indexing.service.spec.ts
#	src/app/services/indexing/indexing.service.ts
#	src/assets/i18n/pt-PT.json
@digimezzo

Copy link
Copy Markdown
Owner

@FranzDeschler Sorry for the late reply and thank you for this PR! The feature looks really nice. Please give me some time to review it. Don't desperate if it takes little while. Sometimes live throws me off track. I'll definitely come back to it.

@FranzDeschler

Copy link
Copy Markdown
Contributor Author

@FranzDeschler Sorry for the late reply and thank you for this PR! The feature looks really nice. Please give me some time to review it. Don't desperate if it takes little while. Sometimes live throws me off track. I'll definitely come back to it.

@digimezzo I'm glad to hear you like it :-)
Take your time—I’m only working on these projects in my spare time. So there’s no rush.

@digimezzo digimezzo added this to the Dopamine 3.0.7 milestone Jun 20, 2026

@digimezzo digimezzo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @FranzDeschler

Great work on this pull request, and thank you for taking the time to implement this feature while staying consistent with the existing architecture and logic.

I've left a few review comments. Could you please take a look at them and either address them or let me know if you have concerns, alternative suggestions, or reasons for keeping the current implementation?

I also noticed that recent changes on master have introduced some merge conflicts. Could you please merge the latest master and resolve those conflicts as well?

Thank you!

Comment thread src/app/data/migrations/migration11.ts
Comment thread src/app/services/artist/artist-splitter.ts Outdated
Comment thread src/app/ui/components/collection/collection-artists/artist/artist.component.scss Outdated
Comment thread src/app/services/artist/artist.service.ts
Comment thread src/app/services/artist/artist.service.ts Outdated
# Conflicts:
#	src/app/app.module.ts
#	src/app/data/database-migrator.ts
#	src/app/data/migrations/migration11.ts
#	src/app/services/indexing/indexing.service.spec.ts
#	src/app/services/indexing/indexing.service.ts
#	src/app/ui/components/collection/collection-artists/artist-browser/artist-browser.component.ts
#	src/assets/i18n/vi.json
# Conflicts:
#	src/assets/i18n/ja-JP.json
@digimezzo

Copy link
Copy Markdown
Owner

@FranzDeschler Many many thanks for this PR. You've delivered high quality work. I appreciate the care that you took in implementing this feature and in respecting the established logic. I finished reviewing your changes and I'll now merge them.

@digimezzo digimezzo merged commit 694b9a6 into digimezzo:master Jul 1, 2026
@FranzDeschler

Copy link
Copy Markdown
Contributor Author

Thanks! I´m happy to hear that you appreciate my work. I´m already working on additions to make that feature more complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants