diff --git a/frontend/src/components/AudioResamplerPage.tsx b/frontend/src/components/AudioResamplerPage.tsx
index 31a1861..3615b87 100644
--- a/frontend/src/components/AudioResamplerPage.tsx
+++ b/frontend/src/components/AudioResamplerPage.tsx
@@ -363,12 +363,12 @@ export function AudioResamplerPage() {
}} style={{ "--wails-drop-target": "drop" } as React.CSSProperties}>
{files.length === 0 ? (<>
{isDragging
- ? "Drop your FLAC files here"
- : "Drag and drop FLAC files here, or click the button below to select"}
+ ? "Drop your audio files here"
+ : "Drag and drop audio files here, or click the button below to select"}
diff --git a/frontend/src/components/DebugLoggerPage.tsx b/frontend/src/components/DebugLoggerPage.tsx
index 4b94fc8..ec463cd 100644
--- a/frontend/src/components/DebugLoggerPage.tsx
+++ b/frontend/src/components/DebugLoggerPage.tsx
@@ -2,6 +2,7 @@ import { useState, useEffect, useRef } from "react";
import { Trash2, Copy, Check, FileDown } from "lucide-react";
import { Button } from "@/components/ui/button";
import { logger, type LogEntry } from "@/lib/logger";
+import { useDownloadQueueData } from "@/hooks/useDownloadQueueData";
import { ExportFailedDownloads } from "../../wailsjs/go/main/App";
import { toastWithSound as toast } from "@/lib/toast-with-sound";
const levelColors: Record = {
@@ -23,6 +24,13 @@ export function DebugLoggerPage() {
const [logs, setLogs] = useState([]);
const [copied, setCopied] = useState(false);
const scrollRef = useRef(null);
+ const queueInfo = useDownloadQueueData();
+ const hasDownloadActivity = queueInfo.queue.length > 0 ||
+ queueInfo.queued_count > 0 ||
+ queueInfo.completed_count > 0 ||
+ queueInfo.failed_count > 0 ||
+ queueInfo.skipped_count > 0;
+ const canExportFailed = hasDownloadActivity && queueInfo.failed_count > 0;
useEffect(() => {
const unsubscribe = logger.subscribe(() => {
setLogs(logger.getLogs());
@@ -54,6 +62,9 @@ export function DebugLoggerPage() {
}
};
const handleExportFailed = async () => {
+ if (!canExportFailed) {
+ return;
+ }
try {
const message = await ExportFailedDownloads();
if (message.startsWith("Successfully")) {
@@ -72,7 +83,7 @@ export function DebugLoggerPage() {
Debug Logs
-
+
Export Failed
diff --git a/frontend/src/components/HistoryPage.tsx b/frontend/src/components/HistoryPage.tsx
index a5c488c..41e5ccf 100644
--- a/frontend/src/components/HistoryPage.tsx
+++ b/frontend/src/components/HistoryPage.tsx
@@ -9,6 +9,7 @@ import { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, Pagi
import { GetDownloadHistory, ClearDownloadHistory, GetPreviewURL, GetFetchHistory, DeleteDownloadHistoryItem, DeleteFetchHistoryItem, ClearFetchHistoryByType } from "../../wailsjs/go/main/App";
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
import { openExternal } from "@/lib/utils";
+import { SPOTIFY_PREVIEW_VOLUME } from "@/lib/preview";
import { TidalIcon, QobuzIcon, AmazonIcon } from "./PlatformIcons";
const formatDate = (timestamp: number) => {
const date = new Date(timestamp * 1000);
@@ -191,7 +192,7 @@ export function HistoryPage({ onHistorySelect }: HistoryPageProps) {
if (url) {
const audio = new Audio(url);
audioRef.current = audio;
- audio.volume = 0.5;
+ audio.volume = SPOTIFY_PREVIEW_VOLUME;
audio.onended = () => setPlayingPreviewId(null);
audio.play();
setPlayingPreviewId(id);
diff --git a/frontend/src/components/Sidebar.tsx b/frontend/src/components/Sidebar.tsx
index 908253b..fcc7862 100644
--- a/frontend/src/components/Sidebar.tsx
+++ b/frontend/src/components/Sidebar.tsx
@@ -33,8 +33,8 @@ export function Sidebar({ currentPage, onPageChange }: SidebarProps) {
const [isIssuesDialogOpen, setIsIssuesDialogOpen] = useState(false);
const [hasIssueAgreement, setHasIssueAgreement] = useState(false);
const analyzerIconRef = useRef(null);
- const converterIconRef = useRef(null);
const resamplerIconRef = useRef(null);
+ const converterIconRef = useRef(null);
const fileManagerIconRef = useRef(null);
const handleIssuesDialogChange = (open: boolean) => {
setIsIssuesDialogOpen(open);
@@ -116,14 +116,14 @@ export function Sidebar({ currentPage, onPageChange }: SidebarProps) {
Audio Quality Analyzer
- onPageChange("audio-converter")} className="gap-3 cursor-pointer py-2 px-3" {...getAnimatedItemHandlers(converterIconRef)}>
-
- Audio Converter
-
onPageChange("audio-resampler")} className="gap-3 cursor-pointer py-2 px-3" {...getAnimatedItemHandlers(resamplerIconRef)}>
Audio Resampler
+ onPageChange("audio-converter")} className="gap-3 cursor-pointer py-2 px-3" {...getAnimatedItemHandlers(converterIconRef)}>
+
+ Audio Converter
+
onPageChange("file-manager")} className="gap-3 cursor-pointer py-2 px-3" {...getAnimatedItemHandlers(fileManagerIconRef)}>
File Manager
diff --git a/frontend/src/hooks/usePreview.ts b/frontend/src/hooks/usePreview.ts
index 72c3abe..479346d 100644
--- a/frontend/src/hooks/usePreview.ts
+++ b/frontend/src/hooks/usePreview.ts
@@ -1,5 +1,6 @@
import { useState, useEffect } from "react";
import { GetPreviewURL } from "@/../wailsjs/go/main/App";
+import { SPOTIFY_PREVIEW_VOLUME } from "@/lib/preview";
import { toast } from "sonner";
export function usePreview() {
const [loadingPreview, setLoadingPreview] = useState(null);
@@ -38,6 +39,7 @@ export function usePreview() {
return;
}
const audio = new Audio(previewURL);
+ audio.volume = SPOTIFY_PREVIEW_VOLUME;
audio.addEventListener("loadeddata", () => {
setLoadingPreview(null);
setPlayingTrack(trackId);
diff --git a/frontend/src/lib/preview.ts b/frontend/src/lib/preview.ts
new file mode 100644
index 0000000..a82621d
--- /dev/null
+++ b/frontend/src/lib/preview.ts
@@ -0,0 +1 @@
+export const SPOTIFY_PREVIEW_VOLUME = 1;