mirror of
https://github.com/Psychotoxical/psysonic.git
synced 2026-07-21 23:05:46 +00:00
fix(playback): cross-server browse, Lucky Mix, and Now Playing (#768)
* fix(playback): keep browsed server when queue plays elsewhere Lucky Mix on a non-playback server now clears the old queue and pins the active server before building. Now Playing metadata uses apiForServer against the queue server instead of forcing ensurePlaybackServerActive on every activeServerId change. * docs: note PR #768 in CHANGELOG and settings credits * fix(now-playing): gate AudioMuse similar artists on playback server Match getArtistInfoForServer credentials: when browsing another server while the queue plays elsewhere, similar-artist count follows the queue server's AudioMuse flag, not the browsed server.
This commit is contained in:
@@ -3,7 +3,7 @@ import { usePlaybackCoverArt } from '../hooks/usePlaybackCoverArt';
|
||||
import type { SubsonicArtistInfo, SubsonicSong } from '../api/subsonicTypes';
|
||||
import React, { useState, useRef, useEffect, useCallback, useMemo, memo } from 'react';
|
||||
import { usePlaybackLibraryNavigate } from '../hooks/usePlaybackLibraryNavigate';
|
||||
import { useEnsurePlaybackServerOnMount } from '../hooks/useEnsurePlaybackServerOnMount';
|
||||
import { usePlaybackServerId } from '../hooks/usePlaybackServerId';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Music, ExternalLink, Cast, Users, Radio, Clock, SkipForward, Info, Calendar, Disc3, Play, EyeOff, LayoutGrid, RotateCcw, Eye } from 'lucide-react';
|
||||
import { open as shellOpen } from '@tauri-apps/plugin-shell';
|
||||
@@ -46,8 +46,11 @@ import { useNowPlayingStarLove } from '../hooks/useNowPlayingStarLove';
|
||||
export default function NowPlaying() {
|
||||
const { t } = useTranslation();
|
||||
const stableNavigate = usePlaybackLibraryNavigate();
|
||||
const subsonicReady = useEnsurePlaybackServerOnMount();
|
||||
const activeServerId = useAuthStore(s => s.activeServerId ?? '');
|
||||
const playbackServerId = usePlaybackServerId();
|
||||
const audiomuseNavidromeByServer = useAuthStore(s => s.audiomuseNavidromeByServer);
|
||||
const audiomuseNavidromeEnabled = Boolean(
|
||||
playbackServerId && audiomuseNavidromeByServer[playbackServerId],
|
||||
);
|
||||
|
||||
const currentTrack = usePlayerStore(s => s.currentTrack);
|
||||
const currentRadio = usePlayerStore(s => s.currentRadio);
|
||||
@@ -56,9 +59,6 @@ export default function NowPlaying() {
|
||||
const activeTab = useLyricsStore(s => s.activeTab);
|
||||
const isQueueVisible = usePlayerStore(s => s.isQueueVisible);
|
||||
const toggleQueue = usePlayerStore(s => s.toggleQueue);
|
||||
const audiomuseNavidromeEnabled = useAuthStore(
|
||||
s => !!(s.activeServerId && s.audiomuseNavidromeByServer[s.activeServerId]),
|
||||
);
|
||||
const enableBandsintown = useAuthStore(s => s.enableBandsintown);
|
||||
const setEnableBandsintown = useAuthStore(s => s.setEnableBandsintown);
|
||||
const lastfmUsername = useAuthStore(s => s.lastfmUsername);
|
||||
@@ -81,8 +81,8 @@ export default function NowPlaying() {
|
||||
songId, artistId, albumId, artistName,
|
||||
enableBandsintown, audiomuseNavidromeEnabled,
|
||||
lastfmUsername, currentTrack,
|
||||
subsonicServerId: activeServerId,
|
||||
fetchEnabled: subsonicReady,
|
||||
subsonicServerId: playbackServerId,
|
||||
fetchEnabled: Boolean(playbackServerId),
|
||||
});
|
||||
|
||||
// Star + Last.fm love + their toggle callbacks
|
||||
|
||||
Reference in New Issue
Block a user