Fix multiple issues: format API, Gradio availability, storage, UI responsiveness

- Format endpoint now calls ACE-Step /format_input REST API directly instead of
  spawning Python, fixing ENOENT errors on Windows (#44, #27, #34)
- isGradioAvailable() tries /gradio_api/info, /info, / in sequence to handle
  Gradio 4.x/5.x/6.x version differences, fixing generation fallback (#53, #20)
- Storage getUrl/getPublicUrl normalize /audio/ prefix to prevent double-prefix
  URLs when reference tracks are used for cover generation (#10)
- Gradio args: fix normalization_db default from 0.0 to -1.0 (Gradio default)
- Volume popover: add 400ms delay before hiding to prevent accidental dismissal (#51)
- Polling: skip setSongs state update when nothing changed to reduce re-renders (#51)
- FFmpeg: add jsdelivr CDN fallback when unpkg fails (#30)
- Model switching: add switchModelIfNeeded() via /v1/init REST API (#45)
This commit is contained in:
fspecii
2026-03-02 17:43:53 +02:00
parent 553e0bce2f
commit e1625a717d
7 changed files with 208 additions and 63 deletions
+8 -2
View File
@@ -69,6 +69,7 @@ export const Player: React.FC<PlayerProps> = ({
const progressBarRef = useRef<HTMLDivElement>(null);
const fullscreenProgressRef = useRef<HTMLDivElement>(null);
const [isHoveringVolume, setIsHoveringVolume] = useState(false);
const volumeHideTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
const [showDropdown, setShowDropdown] = useState(false);
const [isFullscreen, setIsFullscreen] = useState(false);
const [shareModalOpen, setShareModalOpen] = useState(false);
@@ -755,8 +756,13 @@ export const Player: React.FC<PlayerProps> = ({
{/* Volume Control with Vertical Slider */}
<div
className="relative group hidden md:block"
onMouseEnter={() => setIsHoveringVolume(true)}
onMouseLeave={() => setIsHoveringVolume(false)}
onMouseEnter={() => {
if (volumeHideTimer.current) clearTimeout(volumeHideTimer.current);
setIsHoveringVolume(true);
}}
onMouseLeave={() => {
volumeHideTimer.current = setTimeout(() => setIsHoveringVolume(false), 400);
}}
>
<button
onClick={() => onVolumeChange(volume === 0 ? 0.8 : 0)}