mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
some fixes
This commit is contained in:
@@ -9,7 +9,6 @@ import { useIsMobile } from '../hooks/useIsMobile';
|
|||||||
import { useThemeStore } from '../store/themeStore';
|
import { useThemeStore } from '../store/themeStore';
|
||||||
import StarRating from './StarRating';
|
import StarRating from './StarRating';
|
||||||
import type { EntityRatingSupportLevel } from '../api/subsonic';
|
import type { EntityRatingSupportLevel } from '../api/subsonic';
|
||||||
import { useThemeStore } from '../store/themeStore';
|
|
||||||
|
|
||||||
function formatDuration(seconds: number): string {
|
function formatDuration(seconds: number): string {
|
||||||
const h = Math.floor(seconds / 3600);
|
const h = Math.floor(seconds / 3600);
|
||||||
@@ -130,7 +129,6 @@ export default function AlbumHeader({
|
|||||||
const totalDuration = songs.reduce((acc, s) => acc + s.duration, 0);
|
const totalDuration = songs.reduce((acc, s) => acc + s.duration, 0);
|
||||||
const totalSize = songs.reduce((acc, s) => acc + (s.size ?? 0), 0);
|
const totalSize = songs.reduce((acc, s) => acc + (s.size ?? 0), 0);
|
||||||
const formatLabel = [...new Set(songs.map(s => s.suffix).filter((f): f is string => !!f))].map(f => f.toUpperCase()).join(' / ');
|
const formatLabel = [...new Set(songs.map(s => s.suffix).filter((f): f is string => !!f))].map(f => f.toUpperCase()).join(' / ');
|
||||||
const enableCoverArtBackground = useThemeStore(s => s.enableCoverArtBackground);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -117,10 +117,6 @@ export default function PlaylistDetail() {
|
|||||||
const enablePlaylistCoverPhoto = useThemeStore(s => s.enablePlaylistCoverPhoto);
|
const enablePlaylistCoverPhoto = useThemeStore(s => s.enablePlaylistCoverPhoto);
|
||||||
const showBitrate = useThemeStore(s => s.showBitrate);
|
const showBitrate = useThemeStore(s => s.showBitrate);
|
||||||
|
|
||||||
const enableCoverArtBackground = useThemeStore(s => s.enableCoverArtBackground);
|
|
||||||
const enablePlaylistCoverPhoto = useThemeStore(s => s.enablePlaylistCoverPhoto);
|
|
||||||
const showBitrate = useThemeStore(s => s.showBitrate);
|
|
||||||
|
|
||||||
const [playlist, setPlaylist] = useState<SubsonicPlaylist | null>(null);
|
const [playlist, setPlaylist] = useState<SubsonicPlaylist | null>(null);
|
||||||
const [songs, setSongs] = useState<SubsonicSong[]>([]);
|
const [songs, setSongs] = useState<SubsonicSong[]>([]);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user