feat: adding setting to show/hide user ratings (#1426)

* adding show/hide user ratings setting
This commit is contained in:
Leonardo Salgueiro
2025-12-28 09:04:50 +00:00
committed by GitHub
parent f0942c7795
commit df0d4b7032
9 changed files with 59 additions and 13 deletions
@@ -32,6 +32,7 @@ interface ItemCardControlsProps {
internalState?: ItemListStateActions;
item: Album | AlbumArtist | Artist | Playlist | Song | undefined;
itemType: LibraryItem;
showRating: boolean;
type?: 'compact' | 'default' | 'poster';
}
@@ -180,6 +181,7 @@ export const ItemCardControls = ({
internalState,
item,
itemType,
showRating,
type = 'default',
}: ItemCardControlsProps) => {
const playNowHandler = useMemo(
@@ -267,6 +269,7 @@ export const ItemCardControls = ({
<FavoriteButton isFavorite={isFavorite} onClick={favoriteHandler} />
)}
{controls?.onRating &&
showRating &&
(item?._serverType === ServerType.NAVIDROME ||
item?._serverType === ServerType.SUBSONIC) && (
<RatingButton