-
-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio with hashtags in filenames are not loaded #3124
Comments
This seems to be due to an oversight where file names are not escaped when the URL is generated. I experimentally added the escaping to Edit: Doing the escaping yourself doesn't work because the code checks to see if it's a file. If the file name is already escaped, it fails and the correct URL isn't generated. |
Description
I have a folder with two audio files and I'm trying to play them:
Minimal app:
When the app is run this is what I see on screen:
![Screenshot 2024-05-25 alle 09 51 52](https://private-user-images.githubusercontent.com/16792495/333781795-d744e9eb-5a17-42a0-9bf6-2852c31a3a9b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA3MjczODIsIm5iZiI6MTcyMDcyNzA4MiwicGF0aCI6Ii8xNjc5MjQ5NS8zMzM3ODE3OTUtZDc0NGU5ZWItNWExNy00MmEwLTliZjYtMjg1MmMzMWEzYTliLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzExVDE5NDQ0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVhYzE2MzgyZjRkOGE3NjNmN2Q0NzNlYjcyNzJjNWYzMThiY2Y3MDBmNzUwMGE4OGNjNzNiNzc2NjRjOWUzNTEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.hYhmzuDnRnzLceYz8Bhbzi_kFa_fV9C0nWWJ4KRc-sQ)
And this is what I see in the console:
$ python app.py NiceGUI ready to go on http:https://localhost:8002 http:https://127.0.0.1:8002/artist+-+#title.mp3 not found http:https://127.0.0.1:8002/_nicegui/auto/media/9ea021d92f620e392dc6848d57e79cca/artist - not found http:https://127.0.0.1:8002/_nicegui/auto/media/9ea021d92f620e392dc6848d57e79cca/artist - not found
using Python 3.11.7 on macOS Sonoma 14.4
Tried URL escaping the file name and parsing file name with Path, but without success. Has this already happened to others before?
The text was updated successfully, but these errors were encountered: