Notter7 commited on
Commit
14ebdc0
·
verified ·
1 Parent(s): 69f77a3

Fix browser history audio export

Browse files
Files changed (1) hide show
  1. frontend/src/App.jsx +8 -0
frontend/src/App.jsx CHANGED
@@ -496,6 +496,14 @@ function App() {
496
 
497
  const handleNativeExport = async (e, sourceIdentifier, fallbackName, mode) => {
498
  if (e) { e.preventDefault(); e.stopPropagation(); }
 
 
 
 
 
 
 
 
499
  try {
500
  const { save } = await import('@tauri-apps/plugin-dialog');
501
  const ext = fallbackName.includes('.') ? fallbackName.split('.').pop() : 'wav';
 
496
 
497
  const handleNativeExport = async (e, sourceIdentifier, fallbackName, mode) => {
498
  if (e) { e.preventDefault(); e.stopPropagation(); }
499
+ if (!isTauri) {
500
+ const filename = fallbackName || sourceIdentifier || 'audio.wav';
501
+ const audioUrl = sourceIdentifier?.startsWith?.('http')
502
+ ? sourceIdentifier
503
+ : `${API}/audio/${sourceIdentifier}`;
504
+ await triggerDownload(audioUrl, filename);
505
+ return;
506
+ }
507
  try {
508
  const { save } = await import('@tauri-apps/plugin-dialog');
509
  const ext = fallbackName.includes('.') ? fallbackName.split('.').pop() : 'wav';