enable album play buttons if yt enabled

This commit is contained in:
jeffvli
2026-02-07 14:44:24 -08:00
parent 3a50dee7a2
commit 3ad5447871
2 changed files with 6 additions and 4 deletions
@@ -17,7 +17,7 @@ import {
import { useSetFavorite } from '/@/renderer/features/shared/hooks/use-set-favorite';
import { useSetRating } from '/@/renderer/features/shared/hooks/use-set-rating';
import { AppRoute } from '/@/renderer/router/routes';
import { useCurrentServerId, useShowRatings } from '/@/renderer/store';
import { useCurrentServerId, useIntegrationsSettings, useShowRatings } from '/@/renderer/store';
import { usePlayButtonBehavior } from '/@/renderer/store/settings.store';
import { formatDateAbsoluteUTC, formatDurationString } from '/@/renderer/utils';
import { normalizeReleaseTypes } from '/@/renderer/utils/normalize-release-types';
@@ -43,6 +43,7 @@ export const AlbumDetailHeader = forwardRef<HTMLDivElement>((_props, ref) => {
);
const isExternal = detailQuery?.data?._serverType === ServerType.EXTERNAL;
const { youtube: youtubeEnabled } = useIntegrationsSettings();
const showRating =
!isExternal &&
@@ -257,7 +258,7 @@ export const AlbumDetailHeader = forwardRef<HTMLDivElement>((_props, ref) => {
/>
</Group>
<LibraryHeaderMenu
disabled={isExternal}
disabled={isExternal && !youtubeEnabled}
favorite={detailQuery?.data?.userFavorite}
onFavorite={handleFavorite}
onMore={handleMoreOptions}
@@ -17,7 +17,7 @@ import { LibraryContainer } from '/@/renderer/features/shared/components/library
import { LibraryHeaderBar } from '/@/renderer/features/shared/components/library-header-bar';
import { PageErrorBoundary } from '/@/renderer/features/shared/components/page-error-boundary';
import { useFastAverageColor } from '/@/renderer/hooks';
import { useAlbumBackground, useCurrentServerId } from '/@/renderer/store';
import { useAlbumBackground, useCurrentServerId, useIntegrationsSettings } from '/@/renderer/store';
import { Spinner } from '/@/shared/components/spinner/spinner';
import { LibraryItem, ServerType } from '/@/shared/types/domain-types';
@@ -28,6 +28,7 @@ const AlbumDetailRoute = () => {
const { albumId } = useParams() as { albumId: string };
const serverId = useCurrentServerId();
const { youtube: youtubeEnabled } = useIntegrationsSettings();
const isMbz = isMbzAlbumId(albumId);
const location = useLocation();
@@ -72,7 +73,7 @@ const AlbumDetailRoute = () => {
children: (
<LibraryHeaderBar>
<LibraryHeaderBar.PlayButton
disabled={isExternal}
disabled={isExternal && !youtubeEnabled}
ids={[albumId]}
itemType={LibraryItem.ALBUM}
variant="default"