From 9b7950202211dc5189b326768815c92c1dec8c98 Mon Sep 17 00:00:00 2001 From: Kendall Garner <17521368+kgarner7@users.noreply.github.com> Date: Sat, 7 Jun 2025 20:36:41 -0700 Subject: [PATCH] config option for listenbrainz/lastfm links --- src/i18n/locales/en.json | 4 ++ .../components/album-detail-content.tsx | 42 ++++++++-------- .../album-artist-detail-content.tsx | 42 ++++++++-------- .../components/general/control-settings.tsx | 49 ++++++++++++++++++- src/renderer/store/settings.store.ts | 4 ++ 5 files changed, 99 insertions(+), 42 deletions(-) diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 6154d651..1c44c054 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -587,6 +587,8 @@ "imageAspectRatio_description": "if enabled, cover art will be shown using their native aspect ratio. for art that is not 1:1, the remaining space will be empty", "language": "language", "language_description": "sets the language for the application ($t(common.restartRequired))", + "lastfm": "show last.fm links", + "lastfm_description": "show links to last.fm on artist/album pages", "lastfmApiKey": "{{lastfm}} API key", "lastfmApiKey_description": "the API key for {{lastfm}}. required for cover art", "lyricFetch": "fetch lyrics from the internet", @@ -605,6 +607,8 @@ "mpvExecutablePath_description": "sets the path to the mpv executable. if left empty, the default path will be used", "mpvExtraParameters": "mpv parameters", "mpvExtraParameters_help": "one per line", + "musicbrainz": "show musicbrainz links", + "musicbrainz_description": "show links to musicbrainz on artist/album pages, where mbid exists", "passwordStore": "passwords/secret store", "passwordStore_description": "what password/secret store to use. change this if you are having issues storing passwords.", "playbackStyle": "playback style", diff --git a/src/renderer/features/albums/components/album-detail-content.tsx b/src/renderer/features/albums/components/album-detail-content.tsx index c5b4e23f..33d21980 100644 --- a/src/renderer/features/albums/components/album-detail-content.tsx +++ b/src/renderer/features/albums/components/album-detail-content.tsx @@ -90,7 +90,7 @@ export const AlbumDetailContent = ({ background, tableRef }: AlbumDetailContentP const status = useCurrentStatus(); const isFocused = useAppFocus(); const currentSong = useCurrentSong(); - const { externalLinks } = useGeneralSettings(); + const { lastFM, musicBrainz } = useGeneralSettings(); const genreRoute = useGenreRoute(); const columnDefs = useMemo( @@ -407,27 +407,29 @@ export const AlbumDetailContent = ({ background, tableRef }: AlbumDetailContentP )} - {externalLinks ? ( + {lastFM || musicBrainz ? ( - - {mbzId ? ( + {lastFM && ( + + )} + {musicBrainz && mbzId ? ( - {mbzId ? ( + {lastFM && ( + + )} + {musicBrainz && mbzId ? (