Bump deps
This commit is contained in:
parent
6ca85079fa
commit
ebf8d8e67d
5 changed files with 217 additions and 210 deletions
10
package.json
10
package.json
|
@ -14,10 +14,10 @@
|
|||
"lint": "prettier --check . && eslint ."
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/compat": "^1.2.5",
|
||||
"@eslint/compat": "^1.2.6",
|
||||
"@eslint/js": "^9.19.0",
|
||||
"@sveltejs/adapter-auto": "^4.0.0",
|
||||
"@sveltejs/kit": "^2.16.1",
|
||||
"@sveltejs/kit": "^2.17.1",
|
||||
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
||||
"@tailwindcss/forms": "^0.5.10",
|
||||
"@tailwindcss/typography": "^0.5.16",
|
||||
|
@ -29,14 +29,14 @@
|
|||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-svelte": "^3.3.3",
|
||||
"prettier-plugin-tailwindcss": "^0.6.10",
|
||||
"svelte": "^5.19.5",
|
||||
"svelte": "^5.19.7",
|
||||
"svelte-check": "^4.1.4",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "^5.7.3",
|
||||
"typescript-eslint": "^8.22.0",
|
||||
"typescript-eslint": "^8.23.0",
|
||||
"vite": "^6.0.11"
|
||||
},
|
||||
"dependencies": {
|
||||
"youtube-dl-exec": "^3.0.13"
|
||||
"youtube-dl-exec": "^3.0.15"
|
||||
}
|
||||
}
|
||||
|
|
208
pnpm-lock.yaml
generated
208
pnpm-lock.yaml
generated
|
@ -9,24 +9,24 @@ importers:
|
|||
.:
|
||||
dependencies:
|
||||
youtube-dl-exec:
|
||||
specifier: ^3.0.13
|
||||
version: 3.0.13
|
||||
specifier: ^3.0.15
|
||||
version: 3.0.15
|
||||
devDependencies:
|
||||
'@eslint/compat':
|
||||
specifier: ^1.2.5
|
||||
version: 1.2.5(eslint@9.19.0(jiti@1.21.7))
|
||||
specifier: ^1.2.6
|
||||
version: 1.2.6(eslint@9.19.0(jiti@1.21.7))
|
||||
'@eslint/js':
|
||||
specifier: ^9.19.0
|
||||
version: 9.19.0
|
||||
'@sveltejs/adapter-auto':
|
||||
specifier: ^4.0.0
|
||||
version: 4.0.0(@sveltejs/kit@2.16.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))
|
||||
version: 4.0.0(@sveltejs/kit@2.17.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))
|
||||
'@sveltejs/kit':
|
||||
specifier: ^2.16.1
|
||||
version: 2.16.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
specifier: ^2.17.1
|
||||
version: 2.17.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
'@sveltejs/vite-plugin-svelte':
|
||||
specifier: ^5.0.3
|
||||
version: 5.0.3(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
version: 5.0.3(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
'@tailwindcss/forms':
|
||||
specifier: ^0.5.10
|
||||
version: 0.5.10(tailwindcss@3.4.17)
|
||||
|
@ -44,7 +44,7 @@ importers:
|
|||
version: 10.0.1(eslint@9.19.0(jiti@1.21.7))
|
||||
eslint-plugin-svelte:
|
||||
specifier: ^2.46.1
|
||||
version: 2.46.1(eslint@9.19.0(jiti@1.21.7))(svelte@5.19.5)
|
||||
version: 2.46.1(eslint@9.19.0(jiti@1.21.7))(svelte@5.19.7)
|
||||
globals:
|
||||
specifier: ^15.14.0
|
||||
version: 15.14.0
|
||||
|
@ -53,16 +53,16 @@ importers:
|
|||
version: 3.4.2
|
||||
prettier-plugin-svelte:
|
||||
specifier: ^3.3.3
|
||||
version: 3.3.3(prettier@3.4.2)(svelte@5.19.5)
|
||||
version: 3.3.3(prettier@3.4.2)(svelte@5.19.7)
|
||||
prettier-plugin-tailwindcss:
|
||||
specifier: ^0.6.10
|
||||
version: 0.6.11(prettier-plugin-svelte@3.3.3(prettier@3.4.2)(svelte@5.19.5))(prettier@3.4.2)
|
||||
version: 0.6.11(prettier-plugin-svelte@3.3.3(prettier@3.4.2)(svelte@5.19.7))(prettier@3.4.2)
|
||||
svelte:
|
||||
specifier: ^5.19.5
|
||||
version: 5.19.5
|
||||
specifier: ^5.19.7
|
||||
version: 5.19.7
|
||||
svelte-check:
|
||||
specifier: ^4.1.4
|
||||
version: 4.1.4(svelte@5.19.5)(typescript@5.7.3)
|
||||
version: 4.1.4(svelte@5.19.7)(typescript@5.7.3)
|
||||
tailwindcss:
|
||||
specifier: ^3.4.17
|
||||
version: 3.4.17
|
||||
|
@ -70,8 +70,8 @@ importers:
|
|||
specifier: ^5.7.3
|
||||
version: 5.7.3
|
||||
typescript-eslint:
|
||||
specifier: ^8.22.0
|
||||
version: 8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
specifier: ^8.23.0
|
||||
version: 8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
vite:
|
||||
specifier: ^6.0.11
|
||||
version: 6.0.11(jiti@1.21.7)(yaml@2.7.0)
|
||||
|
@ -246,8 +246,8 @@ packages:
|
|||
resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==}
|
||||
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
|
||||
|
||||
'@eslint/compat@1.2.5':
|
||||
resolution: {integrity: sha512-5iuG/StT+7OfvhoBHPlmxkPA9om6aDUFgmD4+mWKAGsYt4vCe8rypneG03AuseyRHBmcCLXQtIH5S26tIoggLg==}
|
||||
'@eslint/compat@1.2.6':
|
||||
resolution: {integrity: sha512-k7HNCqApoDHM6XzT30zGoETj+D+uUcZUb+IVAJmar3u6bvHf7hhHJcWx09QHj4/a2qrKZMWU0E16tvkiAdv06Q==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^9.10.0
|
||||
|
@ -448,8 +448,8 @@ packages:
|
|||
peerDependencies:
|
||||
'@sveltejs/kit': ^2.0.0
|
||||
|
||||
'@sveltejs/kit@2.16.1':
|
||||
resolution: {integrity: sha512-2pF5sgGJx9brYZ/9nNDYnh5KX0JguPF14dnvvtf/MqrvlWrDj/e7Rk3LBJPecFLLK1GRs6ZniD24gFPqZm/NFw==}
|
||||
'@sveltejs/kit@2.17.1':
|
||||
resolution: {integrity: sha512-CpoGSLqE2MCmcQwA2CWJvOsZ9vW+p/1H3itrFykdgajUNAEyQPbsaSn7fZb6PLHQwe+07njxje9ss0fjZoCAyw==}
|
||||
engines: {node: '>=18.13'}
|
||||
hasBin: true
|
||||
peerDependencies:
|
||||
|
@ -491,51 +491,51 @@ packages:
|
|||
'@types/json-schema@7.0.15':
|
||||
resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==}
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.22.0':
|
||||
resolution: {integrity: sha512-4Uta6REnz/xEJMvwf72wdUnC3rr4jAQf5jnTkeRQ9b6soxLxhDEbS/pfMPoJLDfFPNVRdryqWUIV/2GZzDJFZw==}
|
||||
'@typescript-eslint/eslint-plugin@8.23.0':
|
||||
resolution: {integrity: sha512-vBz65tJgRrA1Q5gWlRfvoH+w943dq9K1p1yDBY2pc+a1nbBLZp7fB9+Hk8DaALUbzjqlMfgaqlVPT1REJdkt/w==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
'@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <5.8.0'
|
||||
|
||||
'@typescript-eslint/parser@8.22.0':
|
||||
resolution: {integrity: sha512-MqtmbdNEdoNxTPzpWiWnqNac54h8JDAmkWtJExBVVnSrSmi9z+sZUt0LfKqk9rjqmKOIeRhO4fHHJ1nQIjduIQ==}
|
||||
'@typescript-eslint/parser@8.23.0':
|
||||
resolution: {integrity: sha512-h2lUByouOXFAlMec2mILeELUbME5SZRN/7R9Cw2RD2lRQQY08MWMM+PmVVKKJNK1aIwqTo9t/0CvOxwPbRIE2Q==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <5.8.0'
|
||||
|
||||
'@typescript-eslint/scope-manager@8.22.0':
|
||||
resolution: {integrity: sha512-/lwVV0UYgkj7wPSw0o8URy6YI64QmcOdwHuGuxWIYznO6d45ER0wXUbksr9pYdViAofpUCNJx/tAzNukgvaaiQ==}
|
||||
'@typescript-eslint/scope-manager@8.23.0':
|
||||
resolution: {integrity: sha512-OGqo7+dXHqI7Hfm+WqkZjKjsiRtFUQHPdGMXzk5mYXhJUedO7e/Y7i8AK3MyLMgZR93TX4bIzYrfyVjLC+0VSw==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/type-utils@8.22.0':
|
||||
resolution: {integrity: sha512-NzE3aB62fDEaGjaAYZE4LH7I1MUwHooQ98Byq0G0y3kkibPJQIXVUspzlFOmOfHhiDLwKzMlWxaNv+/qcZurJA==}
|
||||
'@typescript-eslint/type-utils@8.23.0':
|
||||
resolution: {integrity: sha512-iIuLdYpQWZKbiH+RkCGc6iu+VwscP5rCtQ1lyQ7TYuKLrcZoeJVpcLiG8DliXVkUxirW/PWlmS+d6yD51L9jvA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <5.8.0'
|
||||
|
||||
'@typescript-eslint/types@8.22.0':
|
||||
resolution: {integrity: sha512-0S4M4baNzp612zwpD4YOieP3VowOARgK2EkN/GBn95hpyF8E2fbMT55sRHWBq+Huaqk3b3XK+rxxlM8sPgGM6A==}
|
||||
'@typescript-eslint/types@8.23.0':
|
||||
resolution: {integrity: sha512-1sK4ILJbCmZOTt9k4vkoulT6/y5CHJ1qUYxqpF1K/DBAd8+ZUL4LlSCxOssuH5m4rUaaN0uS0HlVPvd45zjduQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.22.0':
|
||||
resolution: {integrity: sha512-SJX99NAS2ugGOzpyhMza/tX+zDwjvwAtQFLsBo3GQxiGcvaKlqGBkmZ+Y1IdiSi9h4Q0Lr5ey+Cp9CGWNY/F/w==}
|
||||
'@typescript-eslint/typescript-estree@8.23.0':
|
||||
resolution: {integrity: sha512-LcqzfipsB8RTvH8FX24W4UUFk1bl+0yTOf9ZA08XngFwMg4Kj8A+9hwz8Cr/ZS4KwHrmo9PJiLZkOt49vPnuvQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4 <5.8.0'
|
||||
|
||||
'@typescript-eslint/utils@8.22.0':
|
||||
resolution: {integrity: sha512-T8oc1MbF8L+Bk2msAvCUzjxVB2Z2f+vXYfcucE2wOmYs7ZUwco5Ep0fYZw8quNwOiw9K8GYVL+Kgc2pETNTLOg==}
|
||||
'@typescript-eslint/utils@8.23.0':
|
||||
resolution: {integrity: sha512-uB/+PSo6Exu02b5ZEiVtmY6RVYO7YU5xqgzTIVZwTHvvK3HsL8tZZHFaTLFtRG3CsV4A5mhOv+NZx5BlhXPyIA==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
typescript: '>=4.8.4 <5.8.0'
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.22.0':
|
||||
resolution: {integrity: sha512-AWpYAXnUgvLNabGTy3uBylkgZoosva/miNd1I8Bz3SjotmQPbVqhO4Cczo8AsZ44XVErEBPr/CRSgaj8sG7g0w==}
|
||||
'@typescript-eslint/visitor-keys@8.23.0':
|
||||
resolution: {integrity: sha512-oWWhcWDLwDfu++BGTZcmXWqpwtkwb5o7fxUIGksMQQDSdPW9prsSnfIOZMlsj4vBOSrcnjIUZMiIjODgGosFhQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
|
||||
acorn-jsx@5.3.2:
|
||||
|
@ -1515,8 +1515,8 @@ packages:
|
|||
svelte:
|
||||
optional: true
|
||||
|
||||
svelte@5.19.5:
|
||||
resolution: {integrity: sha512-vVAntseegJX80sgbY8CxQISSE/VoDSfP7VZHoQaf2+z+2XOPOz/N+k455HJmO9O0g8oxTtuE0TBhC/5LAP4lPg==}
|
||||
svelte@5.19.7:
|
||||
resolution: {integrity: sha512-I0UUp2MpB5gF8aqHJVklOcRcoLgQNnBolSwLMMqDepE9gVwmGeYBmJp1/obzae72QpxdPIymA4AunIm2x70LBg==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
tailwindcss@3.4.17:
|
||||
|
@ -1551,8 +1551,8 @@ packages:
|
|||
resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
ts-api-utils@2.0.0:
|
||||
resolution: {integrity: sha512-xCt/TOAc+EOHS1XPnijD3/yzpH6qg2xppZO1YDqGoVsNXfQfzHpOdNuXwrwOU8u4ITXJyDCTyt8w5g1sZv9ynQ==}
|
||||
ts-api-utils@2.0.1:
|
||||
resolution: {integrity: sha512-dnlgjFSVetynI8nzgJ+qF62efpglpWRk8isUEWZGWlJYySCTD6aKvbUDu+zbPeDakk3bg5H4XpitHukgfL1m9w==}
|
||||
engines: {node: '>=18.12'}
|
||||
peerDependencies:
|
||||
typescript: '>=4.8.4'
|
||||
|
@ -1567,8 +1567,8 @@ packages:
|
|||
type@2.7.3:
|
||||
resolution: {integrity: sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ==}
|
||||
|
||||
typescript-eslint@8.22.0:
|
||||
resolution: {integrity: sha512-Y2rj210FW1Wb6TWXzQc5+P+EWI9/zdS57hLEc0gnyuvdzWo8+Y8brKlbj0muejonhMI/xAZCnZZwjbIfv1CkOw==}
|
||||
typescript-eslint@8.23.0:
|
||||
resolution: {integrity: sha512-/LBRo3HrXr5LxmrdYSOCvoAMm7p2jNizNfbIpCgvG4HMsnoprRUOce/+8VJ9BDYWW68rqIENE/haVLWPeFZBVQ==}
|
||||
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
|
||||
peerDependencies:
|
||||
eslint: ^8.57.0 || ^9.0.0
|
||||
|
@ -1669,8 +1669,8 @@ packages:
|
|||
resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
youtube-dl-exec@3.0.13:
|
||||
resolution: {integrity: sha512-xMCKTHGSEDCshEIwzAGRsysBVoXsLePLvEq/oOAU5gSP1kjgyHx+fiwNqO8RJZbt4LxuJG9foT6cy7iNbTqNhg==}
|
||||
youtube-dl-exec@3.0.15:
|
||||
resolution: {integrity: sha512-QVXOxeUSeID8UzE+HmQ5TN7xDMf0xI22MUslb3n/jTHTd8uXw2F9wbCR+I34HFZcNKY6qxTcmDy6REbJAMPing==}
|
||||
engines: {node: '>= 18'}
|
||||
|
||||
zimmerframe@1.1.2:
|
||||
|
@ -1767,7 +1767,7 @@ snapshots:
|
|||
|
||||
'@eslint-community/regexpp@4.12.1': {}
|
||||
|
||||
'@eslint/compat@1.2.5(eslint@9.19.0(jiti@1.21.7))':
|
||||
'@eslint/compat@1.2.6(eslint@9.19.0(jiti@1.21.7))':
|
||||
optionalDependencies:
|
||||
eslint: 9.19.0(jiti@1.21.7)
|
||||
|
||||
|
@ -1923,14 +1923,14 @@ snapshots:
|
|||
'@rollup/rollup-win32-x64-msvc@4.32.0':
|
||||
optional: true
|
||||
|
||||
'@sveltejs/adapter-auto@4.0.0(@sveltejs/kit@2.16.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))':
|
||||
'@sveltejs/adapter-auto@4.0.0(@sveltejs/kit@2.17.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))':
|
||||
dependencies:
|
||||
'@sveltejs/kit': 2.16.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
'@sveltejs/kit': 2.17.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
import-meta-resolve: 4.1.0
|
||||
|
||||
'@sveltejs/kit@2.16.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))':
|
||||
'@sveltejs/kit@2.17.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))':
|
||||
dependencies:
|
||||
'@sveltejs/vite-plugin-svelte': 5.0.3(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
'@sveltejs/vite-plugin-svelte': 5.0.3(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
'@types/cookie': 0.6.0
|
||||
cookie: 0.6.0
|
||||
devalue: 5.1.1
|
||||
|
@ -1942,26 +1942,26 @@ snapshots:
|
|||
sade: 1.8.1
|
||||
set-cookie-parser: 2.7.1
|
||||
sirv: 3.0.0
|
||||
svelte: 5.19.5
|
||||
svelte: 5.19.7
|
||||
vite: 6.0.11(jiti@1.21.7)(yaml@2.7.0)
|
||||
|
||||
'@sveltejs/vite-plugin-svelte-inspector@4.0.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))':
|
||||
'@sveltejs/vite-plugin-svelte-inspector@4.0.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))':
|
||||
dependencies:
|
||||
'@sveltejs/vite-plugin-svelte': 5.0.3(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
'@sveltejs/vite-plugin-svelte': 5.0.3(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
debug: 4.4.0
|
||||
svelte: 5.19.5
|
||||
svelte: 5.19.7
|
||||
vite: 6.0.11(jiti@1.21.7)(yaml@2.7.0)
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))':
|
||||
'@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))':
|
||||
dependencies:
|
||||
'@sveltejs/vite-plugin-svelte-inspector': 4.0.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.5)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
'@sveltejs/vite-plugin-svelte-inspector': 4.0.1(@sveltejs/vite-plugin-svelte@5.0.3(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0)))(svelte@5.19.7)(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
debug: 4.4.0
|
||||
deepmerge: 4.3.1
|
||||
kleur: 4.1.5
|
||||
magic-string: 0.30.17
|
||||
svelte: 5.19.5
|
||||
svelte: 5.19.7
|
||||
vite: 6.0.11(jiti@1.21.7)(yaml@2.7.0)
|
||||
vitefu: 1.0.5(vite@6.0.11(jiti@1.21.7)(yaml@2.7.0))
|
||||
transitivePeerDependencies:
|
||||
|
@ -1986,81 +1986,81 @@ snapshots:
|
|||
|
||||
'@types/json-schema@7.0.15': {}
|
||||
|
||||
'@typescript-eslint/eslint-plugin@8.22.0(@typescript-eslint/parser@8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)':
|
||||
'@typescript-eslint/eslint-plugin@8.23.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)':
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.12.1
|
||||
'@typescript-eslint/parser': 8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
'@typescript-eslint/scope-manager': 8.22.0
|
||||
'@typescript-eslint/type-utils': 8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
'@typescript-eslint/utils': 8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
'@typescript-eslint/visitor-keys': 8.22.0
|
||||
'@typescript-eslint/parser': 8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
'@typescript-eslint/scope-manager': 8.23.0
|
||||
'@typescript-eslint/type-utils': 8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
'@typescript-eslint/utils': 8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
'@typescript-eslint/visitor-keys': 8.23.0
|
||||
eslint: 9.19.0(jiti@1.21.7)
|
||||
graphemer: 1.4.0
|
||||
ignore: 5.3.2
|
||||
natural-compare: 1.4.0
|
||||
ts-api-utils: 2.0.0(typescript@5.7.3)
|
||||
ts-api-utils: 2.0.1(typescript@5.7.3)
|
||||
typescript: 5.7.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/parser@8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)':
|
||||
'@typescript-eslint/parser@8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/scope-manager': 8.22.0
|
||||
'@typescript-eslint/types': 8.22.0
|
||||
'@typescript-eslint/typescript-estree': 8.22.0(typescript@5.7.3)
|
||||
'@typescript-eslint/visitor-keys': 8.22.0
|
||||
'@typescript-eslint/scope-manager': 8.23.0
|
||||
'@typescript-eslint/types': 8.23.0
|
||||
'@typescript-eslint/typescript-estree': 8.23.0(typescript@5.7.3)
|
||||
'@typescript-eslint/visitor-keys': 8.23.0
|
||||
debug: 4.4.0
|
||||
eslint: 9.19.0(jiti@1.21.7)
|
||||
typescript: 5.7.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/scope-manager@8.22.0':
|
||||
'@typescript-eslint/scope-manager@8.23.0':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.22.0
|
||||
'@typescript-eslint/visitor-keys': 8.22.0
|
||||
'@typescript-eslint/types': 8.23.0
|
||||
'@typescript-eslint/visitor-keys': 8.23.0
|
||||
|
||||
'@typescript-eslint/type-utils@8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)':
|
||||
'@typescript-eslint/type-utils@8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/typescript-estree': 8.22.0(typescript@5.7.3)
|
||||
'@typescript-eslint/utils': 8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
'@typescript-eslint/typescript-estree': 8.23.0(typescript@5.7.3)
|
||||
'@typescript-eslint/utils': 8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
debug: 4.4.0
|
||||
eslint: 9.19.0(jiti@1.21.7)
|
||||
ts-api-utils: 2.0.0(typescript@5.7.3)
|
||||
ts-api-utils: 2.0.1(typescript@5.7.3)
|
||||
typescript: 5.7.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/types@8.22.0': {}
|
||||
'@typescript-eslint/types@8.23.0': {}
|
||||
|
||||
'@typescript-eslint/typescript-estree@8.22.0(typescript@5.7.3)':
|
||||
'@typescript-eslint/typescript-estree@8.23.0(typescript@5.7.3)':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.22.0
|
||||
'@typescript-eslint/visitor-keys': 8.22.0
|
||||
'@typescript-eslint/types': 8.23.0
|
||||
'@typescript-eslint/visitor-keys': 8.23.0
|
||||
debug: 4.4.0
|
||||
fast-glob: 3.3.3
|
||||
is-glob: 4.0.3
|
||||
minimatch: 9.0.5
|
||||
semver: 7.6.3
|
||||
ts-api-utils: 2.0.0(typescript@5.7.3)
|
||||
ts-api-utils: 2.0.1(typescript@5.7.3)
|
||||
typescript: 5.7.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/utils@8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)':
|
||||
'@typescript-eslint/utils@8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0(jiti@1.21.7))
|
||||
'@typescript-eslint/scope-manager': 8.22.0
|
||||
'@typescript-eslint/types': 8.22.0
|
||||
'@typescript-eslint/typescript-estree': 8.22.0(typescript@5.7.3)
|
||||
'@typescript-eslint/scope-manager': 8.23.0
|
||||
'@typescript-eslint/types': 8.23.0
|
||||
'@typescript-eslint/typescript-estree': 8.23.0(typescript@5.7.3)
|
||||
eslint: 9.19.0(jiti@1.21.7)
|
||||
typescript: 5.7.3
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@typescript-eslint/visitor-keys@8.22.0':
|
||||
'@typescript-eslint/visitor-keys@8.23.0':
|
||||
dependencies:
|
||||
'@typescript-eslint/types': 8.22.0
|
||||
'@typescript-eslint/types': 8.23.0
|
||||
eslint-visitor-keys: 4.2.0
|
||||
|
||||
acorn-jsx@5.3.2(acorn@8.14.0):
|
||||
|
@ -2312,7 +2312,7 @@ snapshots:
|
|||
dependencies:
|
||||
eslint: 9.19.0(jiti@1.21.7)
|
||||
|
||||
eslint-plugin-svelte@2.46.1(eslint@9.19.0(jiti@1.21.7))(svelte@5.19.5):
|
||||
eslint-plugin-svelte@2.46.1(eslint@9.19.0(jiti@1.21.7))(svelte@5.19.7):
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.1(eslint@9.19.0(jiti@1.21.7))
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
|
@ -2325,9 +2325,9 @@ snapshots:
|
|||
postcss-safe-parser: 6.0.0(postcss@8.5.1)
|
||||
postcss-selector-parser: 6.1.2
|
||||
semver: 7.6.3
|
||||
svelte-eslint-parser: 0.43.0(svelte@5.19.5)
|
||||
svelte-eslint-parser: 0.43.0(svelte@5.19.7)
|
||||
optionalDependencies:
|
||||
svelte: 5.19.5
|
||||
svelte: 5.19.7
|
||||
transitivePeerDependencies:
|
||||
- ts-node
|
||||
|
||||
|
@ -2811,16 +2811,16 @@ snapshots:
|
|||
|
||||
prelude-ls@1.2.1: {}
|
||||
|
||||
prettier-plugin-svelte@3.3.3(prettier@3.4.2)(svelte@5.19.5):
|
||||
prettier-plugin-svelte@3.3.3(prettier@3.4.2)(svelte@5.19.7):
|
||||
dependencies:
|
||||
prettier: 3.4.2
|
||||
svelte: 5.19.5
|
||||
svelte: 5.19.7
|
||||
|
||||
prettier-plugin-tailwindcss@0.6.11(prettier-plugin-svelte@3.3.3(prettier@3.4.2)(svelte@5.19.5))(prettier@3.4.2):
|
||||
prettier-plugin-tailwindcss@0.6.11(prettier-plugin-svelte@3.3.3(prettier@3.4.2)(svelte@5.19.7))(prettier@3.4.2):
|
||||
dependencies:
|
||||
prettier: 3.4.2
|
||||
optionalDependencies:
|
||||
prettier-plugin-svelte: 3.3.3(prettier@3.4.2)(svelte@5.19.5)
|
||||
prettier-plugin-svelte: 3.3.3(prettier@3.4.2)(svelte@5.19.7)
|
||||
|
||||
prettier@3.4.2: {}
|
||||
|
||||
|
@ -2956,19 +2956,19 @@ snapshots:
|
|||
|
||||
supports-preserve-symlinks-flag@1.0.0: {}
|
||||
|
||||
svelte-check@4.1.4(svelte@5.19.5)(typescript@5.7.3):
|
||||
svelte-check@4.1.4(svelte@5.19.7)(typescript@5.7.3):
|
||||
dependencies:
|
||||
'@jridgewell/trace-mapping': 0.3.25
|
||||
chokidar: 4.0.3
|
||||
fdir: 6.4.3
|
||||
picocolors: 1.1.1
|
||||
sade: 1.8.1
|
||||
svelte: 5.19.5
|
||||
svelte: 5.19.7
|
||||
typescript: 5.7.3
|
||||
transitivePeerDependencies:
|
||||
- picomatch
|
||||
|
||||
svelte-eslint-parser@0.43.0(svelte@5.19.5):
|
||||
svelte-eslint-parser@0.43.0(svelte@5.19.7):
|
||||
dependencies:
|
||||
eslint-scope: 7.2.2
|
||||
eslint-visitor-keys: 3.4.3
|
||||
|
@ -2976,9 +2976,9 @@ snapshots:
|
|||
postcss: 8.5.1
|
||||
postcss-scss: 4.0.9(postcss@8.5.1)
|
||||
optionalDependencies:
|
||||
svelte: 5.19.5
|
||||
svelte: 5.19.7
|
||||
|
||||
svelte@5.19.5:
|
||||
svelte@5.19.7:
|
||||
dependencies:
|
||||
'@ampproject/remapping': 2.3.0
|
||||
'@jridgewell/sourcemap-codec': 1.5.0
|
||||
|
@ -3047,7 +3047,7 @@ snapshots:
|
|||
|
||||
totalist@3.0.1: {}
|
||||
|
||||
ts-api-utils@2.0.0(typescript@5.7.3):
|
||||
ts-api-utils@2.0.1(typescript@5.7.3):
|
||||
dependencies:
|
||||
typescript: 5.7.3
|
||||
|
||||
|
@ -3059,11 +3059,11 @@ snapshots:
|
|||
|
||||
type@2.7.3: {}
|
||||
|
||||
typescript-eslint@8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3):
|
||||
typescript-eslint@8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3):
|
||||
dependencies:
|
||||
'@typescript-eslint/eslint-plugin': 8.22.0(@typescript-eslint/parser@8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
'@typescript-eslint/parser': 8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
'@typescript-eslint/utils': 8.22.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
'@typescript-eslint/eslint-plugin': 8.23.0(@typescript-eslint/parser@8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3))(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
'@typescript-eslint/parser': 8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
'@typescript-eslint/utils': 8.23.0(eslint@9.19.0(jiti@1.21.7))(typescript@5.7.3)
|
||||
eslint: 9.19.0(jiti@1.21.7)
|
||||
typescript: 5.7.3
|
||||
transitivePeerDependencies:
|
||||
|
@ -3121,7 +3121,7 @@ snapshots:
|
|||
|
||||
yocto-queue@0.1.0: {}
|
||||
|
||||
youtube-dl-exec@3.0.13:
|
||||
youtube-dl-exec@3.0.15:
|
||||
dependencies:
|
||||
bin-version-check: 6.0.0
|
||||
dargs: 7.0.0
|
||||
|
|
|
@ -1,80 +0,0 @@
|
|||
import { DOWNLOAD_PATH } from '$env/static/private';
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import youtubedl from 'youtube-dl-exec';
|
||||
|
||||
const isAudioFormat = (format: string) => {
|
||||
let isAudio = false;
|
||||
|
||||
switch (format) {
|
||||
case 'mp3':
|
||||
isAudio = true;
|
||||
break;
|
||||
default:
|
||||
isAudio = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return isAudio;
|
||||
};
|
||||
|
||||
const isVideoFormat = (format: string) => {
|
||||
let isVideo = false;
|
||||
|
||||
switch (format) {
|
||||
case 'mp4':
|
||||
isVideo = true;
|
||||
break;
|
||||
default:
|
||||
isVideo = false;
|
||||
break;
|
||||
}
|
||||
|
||||
return isVideo;
|
||||
}
|
||||
|
||||
export const actions = {
|
||||
download: async ({ request, cookies }) => {
|
||||
const data = await request.formData();
|
||||
|
||||
const obj = {};
|
||||
for (const element of data) {
|
||||
obj[element[0]] = element[1];
|
||||
}
|
||||
|
||||
const { format, source, link } = obj;
|
||||
|
||||
if (!(format && source && link)) {
|
||||
throw redirect(307, '/');
|
||||
}
|
||||
|
||||
console.info(`Asked ${source} download of ${link}`);
|
||||
|
||||
switch (source) {
|
||||
case 'youtube':
|
||||
const options = {
|
||||
output: `${DOWNLOAD_PATH}/%(artist)s-%(title)s.%(ext)s`,
|
||||
embedThumbnail: true
|
||||
}
|
||||
|
||||
if (isAudioFormat(format)) {
|
||||
options.extractAudio = true;
|
||||
options.audioFormat = format;
|
||||
}
|
||||
|
||||
isVideoFormat(format) ? options.format = format : ''
|
||||
|
||||
const output = await youtubedl(link);
|
||||
|
||||
console.log(output);
|
||||
console.info(`Downloaded ${link} to ${output}`);
|
||||
|
||||
break;
|
||||
case 'spotify':
|
||||
break;
|
||||
default:
|
||||
console.error('ops');
|
||||
}
|
||||
|
||||
return { success: true };
|
||||
}
|
||||
};
|
|
@ -1,7 +1,4 @@
|
|||
<script>
|
||||
import { enhance } from '$app/forms';
|
||||
|
||||
let { form } = $props();
|
||||
let source = $state('youtube');
|
||||
let link = $state('');
|
||||
let format = $state('mp3');
|
||||
|
@ -13,29 +10,27 @@
|
|||
showModal = !showModal;
|
||||
};
|
||||
|
||||
const handleSubmit = (e) => {
|
||||
const handleSubmit = async (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
console.log({
|
||||
source,
|
||||
link,
|
||||
format
|
||||
});
|
||||
};
|
||||
|
||||
const onFormSubmit = ({ formElement, formData, action, cancel, submitter }) => {
|
||||
loading = true;
|
||||
// `formElement` is this `<form>` element
|
||||
// `formData` is its `FormData` object that's about to be submitted
|
||||
// `action` is the URL to which the form is posted
|
||||
// calling `cancel()` will prevent the submission
|
||||
// `submitter` is the `HTMLElement` that caused the form to be submitted
|
||||
const searchParams = new URLSearchParams();
|
||||
searchParams.append('source', source);
|
||||
searchParams.append('link', link);
|
||||
searchParams.append('format', format);
|
||||
|
||||
return async ({ result, update }) => {
|
||||
loading = false;
|
||||
error = result.type !== 'success';
|
||||
// `result` is an `ActionResult` object
|
||||
// `update` is a function which triggers the default logic that would be triggered if this callback wasn't set
|
||||
};
|
||||
const response = await fetch(`/download?${searchParams.toString()}`);
|
||||
const file = window.URL.createObjectURL(await response.blob());
|
||||
|
||||
const anchor = document.createElement('a');
|
||||
anchor.setAttribute('download', true);
|
||||
anchor.href = file;
|
||||
anchor.click();
|
||||
};
|
||||
|
||||
$effect(() => {
|
||||
|
@ -66,7 +61,7 @@
|
|||
</button>
|
||||
|
||||
<h1 class="mb-6 text-center text-xl">🐙 Scaricatore 🐙</h1>
|
||||
<form method="POST" action="?/download" class="space-y-6" use:enhance={onFormSubmit}>
|
||||
<form class="space-y-6" onsubmit={handleSubmit}>
|
||||
<!-- Source Selection -->
|
||||
<fieldset class="space-y-4">
|
||||
<legend class="text-green-400">Choose Source:</legend>
|
||||
|
@ -125,8 +120,8 @@
|
|||
</div>
|
||||
|
||||
<!-- Submit Button -->
|
||||
<button
|
||||
type="submit"
|
||||
<a
|
||||
{href}
|
||||
class="w-full rounded-lg border-4 border-pink-700 bg-pink-500 px-4 py-3 text-black transition hover:bg-pink-600 active:border-yellow-500"
|
||||
>
|
||||
Start Download!
|
||||
|
|
92
src/routes/download/+server.ts
Normal file
92
src/routes/download/+server.ts
Normal file
|
@ -0,0 +1,92 @@
|
|||
import { DOWNLOAD_PATH } from '$env/static/private';
|
||||
import { redirect } from '@sveltejs/kit';
|
||||
import ytdl from 'youtube-dl-exec';
|
||||
|
||||
import { json, error } from '@sveltejs/kit';
|
||||
import type { RequestHandler } from './$types';
|
||||
import { spawn } from 'child_process';
|
||||
|
||||
|
||||
/**
|
||||
* Fetch YouTube metadata (title, uploader/artist)
|
||||
*/
|
||||
async function getYouTubeMetadata(link: string) {
|
||||
return await ytdl(link, {
|
||||
dumpSingleJson: true,
|
||||
noCheckCertificates: true,
|
||||
noWarnings: true,
|
||||
preferFreeFormats: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Streams the YouTube video/audio using youtube-dl-exec
|
||||
*/
|
||||
function streamYouTube(link: string, format: string): ReadableStream<Uint8Array> {
|
||||
return new ReadableStream({
|
||||
start(controller) {
|
||||
const args = [
|
||||
'-o',
|
||||
'-',
|
||||
format === 'mp3' ? '--embed-metadata' : '',
|
||||
format === 'mp3' ? '--embed-thumbnail' : '',
|
||||
'--format',
|
||||
format === 'mp3' ? 'bestaudio' : 'best',
|
||||
'--audio-format',
|
||||
format === 'mp3' ? 'mp3' : '',
|
||||
'--no-playlist'
|
||||
].filter(Boolean);
|
||||
|
||||
const process = spawn('yt-dlp', [...args, link], { stdio: ['ignore', 'pipe', 'ignore'] });
|
||||
|
||||
process.stdout.on('data', (chunk) => controller.enqueue(chunk));
|
||||
process.stdout.on('end', () => controller.close());
|
||||
process.stdout.on('error', (err) => {
|
||||
console.error('Stream error:', err);
|
||||
controller.error(err);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Sanitize filename by removing unsafe characters
|
||||
*/
|
||||
function sanitizeFilename(name: string): string {
|
||||
return name.replace(/[\/:*?"<>|]/g, '').trim();
|
||||
}
|
||||
|
||||
export const GET: RequestHandler = async ({ url }) => {
|
||||
// Get query params
|
||||
const link = url.searchParams.get('link');
|
||||
const format = url.searchParams.get('format'); // mp3, mp4
|
||||
const source = url.searchParams.get('source'); // youtube or spotify
|
||||
|
||||
// Validate input
|
||||
if (!link || !format || !source) {
|
||||
throw error(400, 'Missing required query parameters: link, format, or source');
|
||||
}
|
||||
|
||||
if (source !== 'youtube') {
|
||||
throw error(400, 'Currently, only YouTube is supported');
|
||||
}
|
||||
|
||||
try {
|
||||
// Fetch metadata for filename
|
||||
const metadata = await getYouTubeMetadata(link);
|
||||
const { title, uploader } = metadata;
|
||||
const safeTitle = sanitizeFilename(`${uploader} - ${title}`);
|
||||
const filename = `${safeTitle}.${format}`;
|
||||
|
||||
console.log(filename)
|
||||
// Stream video/audio
|
||||
return new Response(streamYouTube(link, format), {
|
||||
headers: {
|
||||
'Content-Type': format === 'mp3' ? 'audio/mpeg' : 'video/mp4',
|
||||
'Content-Disposition': `attachment; filename="${filename}"`
|
||||
}
|
||||
});
|
||||
} catch (err) {
|
||||
console.error('Error fetching metadata:', err);
|
||||
throw error(500, 'Failed to fetch video metadata');
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue