Skip to content
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

Calibre OPDS recognizing cbz files as fb2 #3245

Open
MyWebmasterD opened this issue Nov 25, 2024 · 4 comments
Open

Calibre OPDS recognizing cbz files as fb2 #3245

MyWebmasterD opened this issue Nov 25, 2024 · 4 comments

Comments

@MyWebmasterD
Copy link

Hello,
when downloading from Koreader in OPDS my cbz manga, the extension is changed in fb2 and Koreader is unable to recognize them
I'm using calibre web with docker

@BersTrayan
Copy link

BersTrayan commented Nov 27, 2024

Решение нашёл здесь https://github.com/koreader/koreader/issues/12711#issuecomment-2498628538
Нужно заменить mimetypes
-mimetypes.add_type('application/x-rar', '.cbr') +mimetypes.add_type('application/x-cbr', '.cbr')
-mimetypes.add_type('application/zip', '.cbz') +mimetypes.add_type('application/x-cbz', '.cbz')
в файле /app/calibre-web/cps/__init__.py

@MyWebmasterD
Copy link
Author

yes but unfortunately I can't access that files in my docker installatioon

@BersTrayan
Copy link

BersTrayan commented Nov 28, 2024

yes but unfortunately I can't access that files in my docker installatioon

Получить доступ к этим файлам в контейнере Docker можно. Для этого нужно подключиться к этому контейнеру:
docker exec -it calibre-web bash
Где calibre-web - название вашего контейнера для calibre-web. Узнать можно командой:
docker ps
Внутри выполнить команды:
cp /app/calibre-web/cps/__init__.py /root/
sed 's/\/zip/\/x-cbz/;s/\/x-rar/\/x-cbr/' /root/__init__.py > /app/calibre-web/cps/__init__.py
И перезапустить контейнер.
Правда, это придется делать после каждого обновления контейнера calibre-web, если данные изменения не внесут в основной код.

@MyWebmasterD
Copy link
Author

It worked, thank you man!
I hope they could solve the issue in the next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants