auth code changes / misc

This commit is contained in:
2025-11-25 05:56:46 -05:00
parent fb64a0f99a
commit 05aa48af14
7 changed files with 65 additions and 57 deletions

View File

@@ -283,7 +283,9 @@ export default function MediaRequestForm() {
link.href = url;
const sanitize = (str) => str.replace(/[\\/:*?"<>|]/g, "_");
const filename = `${sanitize(artist)} - ${sanitize(title)}.flac`;
const urlPath = new URL(data.stream_url).pathname;
const extension = urlPath.split('.').pop().split('?')[0] || 'flac';
const filename = `${sanitize(artist)} - ${sanitize(title)}.${extension}`;
link.download = filename;
document.body.appendChild(link);