dubyte / dir2opds

Serve an OPDS based on a directory
GNU General Public License v3.0
59 stars 12 forks source link

Unable to download epub if it contains a space in the filename #11

Closed korry73 closed 3 years ago

korry73 commented 3 years ago

If a book has a space in the filename, it cannot be downloaded. Only books w/o a space in the name do.

korry73 commented 3 years ago

when using version 0.0.4 I can download any epub. But the name of the downloaded file is prepended by "Unknown author" and the extension .epub is added at the end, so finaly I get

"Unknown author - .epub"

Could you please change this just to "filename.epub"

dubyte commented 3 years ago

I can reproduce the issue when there is a space.

un fortunately the issue about the name could it be from the ebook reader (opds client) it seems it downloads the file as: filename.epub and rename it after as "Unknown author - .epub"

Which reader are you using?

in the case of moon reader it does: -.epub

So that is something I can not fix from the server. But I will continue investigating

dubyte commented 3 years ago

I released a version that handles the white spaces, Is v0.0.11 basically revert the changes I did in v0.0.5 unfortunately fix the name is not an easy fix, dir2opds is a dumb server it doesn't read book meta data, neither force you to have a structure.

I don't know how that could be fixed but if you open a new issue for that I could investigate. I can not promise it will be resolved. But I will dedicate time to that.

korry73 commented 3 years ago

I am using koreader and it seems it is causing the issue with putting "unknown author" at the beginning and doubling the epub extension. It seems to work correctly in fbreader. But this is not that important. Main thing is to be able to download epubs with spaces in their names.

dubyte commented 3 years ago

ok, are you able to download epub with spaces in their names after the last update?

korry73 commented 3 years ago

Yes, it works perfectly now. I am able to download all epubs. I have made some tests and it seems koreader puts "unknown author" it is a bit annoying, but not a big issue. Thanks, I will close the issue.

dubyte commented 3 years ago

no problem, thanks for reporting this.