You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Thumbnails don't load if their filename contains a "%" character.
I have also investigated the issue.
The docker logs are:
0|YoutubeDL-Material | URIError: URI malformed
0|YoutubeDL-Material | at decodeURIComponent (<anonymous>)
0|YoutubeDL-Material | at /app/app.js:1684:21
...(truncated)
The error apparently comes when it's trying to decode the URI path parameter.
So the backend here is actually trying to decode an already valid filepath.
For example with a filepath audio/100%Bug.webp: decodeURIComponent("audio/100%Bug.webp") will return an error.
A solution is to simply remove the decodeURIComponent function if it served no purpose.
To Reproduce
Steps to reproduce the behavior:
Download any video that has a % character or set a custom output name which contains a "%" ("100%Bug" for example)
Go to the main page and see your files
Expected behavior
Your files should display the thumbnail, as usual.
Screenshots
Environment
YoutubeDL-Material v4.3.2
Docker tag: latest (optional)
The text was updated successfully, but these errors were encountered:
Of course, if you download a single video and put a custom output name which doesn't have any "%" in it, everything work fine, but you can't always do that with subscriptions.
Kramoule
added a commit
to Kramoule/YoutubeDL-Material
that referenced
this issue
May 18, 2024
Describe the bug
Thumbnails don't load if their filename contains a "%" character.
I have also investigated the issue.
The docker logs are:
The error apparently comes when it's trying to decode the URI path parameter.
YoutubeDL-Material/backend/app.js
Lines 1620 to 1621 in 58f4313
But the Express documentation says that req.params is already decoded:
(Source: https://expressjs.com/en/4x/api.html#req.params)
So the backend here is actually trying to decode an already valid filepath.
For example with a filepath
audio/100%Bug.webp
:decodeURIComponent("audio/100%Bug.webp")
will return an error.A solution is to simply remove the
decodeURIComponent
function if it served no purpose.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Your files should display the thumbnail, as usual.
Screenshots
Environment
The text was updated successfully, but these errors were encountered: