janeczku / calibre-web

:books: Web app for browsing, reading and downloading eBooks stored in a Calibre database
GNU General Public License v3.0
12.54k stars 1.32k forks source link

East Asian CBZ/CBR filenames don't seem to allow the CBZ/CBR to load in Comic Reader #1994

Closed blueochotona closed 3 years ago

blueochotona commented 3 years ago

Describe the bug/problem East Asian CBZ/CBR filenames don't seem to allow the CBZ/CBR to load in Comic Reader. When the same file is renamed and added to calibre it will open with the Comic reader.

To Reproduce Steps to reproduce the behavior:

  1. Ready CBZ in browser
  2. Select a CBZ with a Japanese file name
  3. Browser Comic Reader stuck "loading"
  4. uploading the same file but with a Romanji (romanized characters of Japanese)
  5. the rename CBZ can now be read in the browser

Logfile [2021-05-21 10:59:20,957] INFO {cps.web:1382} Serving book: Lu noShou Tie 2020Nian 04Yue Hao - Unknown [2021-05-21 23:24:49,425] INFO {cps.web:1382} Serving book: Xiao Yuan Liu eBooks 2021-02 - Unknown [2021-05-21 23:35:20,825] INFO {cps.web:1382} Serving book: Utsukushikimono 2021-nen natsugo - Unknown

Expected behavior CBZ/CBR with non-english file names be viewable on browser comic reader. E.g. 小原流eBooks 2021-02.cbz, however when using Obararyū.cbz the file is able to load to the browser comic reader.

Screenshots If applicable, add screenshots to help explain your problem. image

Environment (please complete the following information):

Additional context currently no reverse proxy or other settings

Any help will be appreciated . Thank you!

OzzieIsaacs commented 3 years ago

I tried to reproduce the problem but failed. (Test filename: 执omicdemo - Asterix Lionherd.cbr). The filename isn't transferred to the reader. It's loading from the url: .../show/[book_id]/[format]. I see 2 possibilities: The filename stored in calibre database does not match with the filename on your hard disk. -> Is it possible to download the file to your harddisk with the download button in calibre-web? There is something special with the zipfile itself, or the filenames/formats within the zipfile are somehow causing a problem (zipfile = cbz format)

blueochotona commented 3 years ago

Thank you @OzzieIsaacs for helping me with this . :)

The file can be downloaded and is often re-named during the download .

I have to admit that the name manipulation doesn't always allow it to show up . I have shared variations of renaming the file on here :

http://mintpup.com/quickshare/01/ for some strange reason my share wants to append .cbr to it . . when calibre(docker-linuxserver) and calibre-web adds the same file, the extension does not append with cbr - apologies even when uploading it to my FTP share on hostgator the name extends from :

&Premium (アンド プレミアム) 2020年04月号.cbz

image

[2021-05-22 10:15:30,219] INFO {cps:101} Starting Calibre Web...

[2021-05-22 17:04:49,239] INFO {cps.web:1382} Serving book: &Premium (ando puremiamu) 2020Nian 04Yue H - Unknown [2021-05-22 17:04:56,607] INFO {cps.helper:696} Downloading file: /config/Unknown/&Premium (ando puremiamu) 2020Nian 04Yue Hao (8528)/&Premium (ando puremiamu) 2020Nian 04Yue H - Unknown.cbz [2021-05-22 17:09:46,718] INFO {cps.web:1382} Serving book: &Premium (ando puremiamu) 2020Nian 04Yue Hao - Unknown [2021-05-22 17:10:46,329] INFO {cps.web:1382} Serving book: &Premium2020-04 copy - Unknown [2021-05-22 17:11:12,536] INFO {cps.web:1382} Serving book: Premium2020-04 copy - Unknown [2021-05-22 17:11:55,114] INFO {cps.helper:696} Downloading file: /config/Unknown/Premium2020-04 copy (9852)/Premium2020-04 copy - Unknown.cbz [2021-05-22 17:12:20,904] INFO {cps.web:1382} Serving book: Unknown&Premium (ando puremiamu) 2020Nian 04Yue Hao - Unknown [2021-05-22 17:13:29,408] INFO {cps.web:1382} Serving book: Unknown&Premium (ando puremiamu) 2020Nian 04Yue Hao - Unknown

OzzieIsaacs commented 3 years ago

I got the files. For me both files don't work, so it nothing to do with the filename. I will do a release this weekend, afterwards I'll merge the development branch to master. In this I have replaced the backend for the comic viewer. I tried it, it's capable of extracting and displaying the files. So a fix is on it's way

blueochotona commented 3 years ago

No worries :). Look forward to the release. The same file can be opened by Calibre Ebook Viewer, Kybook (iOS) , ComicStrip (macOS). So perhaps it is something else.

image

Thank you for taking out the time to help me look at the files.

OzzieIsaacs commented 3 years ago

The change is now merged to the master branch, please update to the newest nightly build and the files should work (and also extract much faster)