1
0
mirror of https://github.com/janeczku/calibre-web synced 2026-06-02 02:32:11 +00:00

Make kobo resources editable (#3472)

This commit is contained in:
Ozzie Isaacs
2026-01-10 12:36:20 +01:00
parent 2700b4f0d1
commit 36ef81dd91
2 changed files with 10 additions and 3 deletions
+9 -2
View File
@@ -41,13 +41,12 @@ from werkzeug.datastructures import Headers
from sqlalchemy import func
from sqlalchemy.sql.expression import and_, or_
from sqlalchemy.exc import StatementError
from sqlalchemy.sql import select
import requests
from . import config, logger, kobo_auth, db, calibre_db, helper, shelf as shelf_lib, ub, csrf, kobo_sync_status
from . import isoLanguages
from .epub import get_epub_layout
from .constants import COVER_THUMBNAIL_SMALL, COVER_THUMBNAIL_MEDIUM, COVER_THUMBNAIL_LARGE
from .constants import COVER_THUMBNAIL_SMALL, COVER_THUMBNAIL_MEDIUM, COVER_THUMBNAIL_LARGE, BASE_DIR
from .helper import get_download_link
from .services import SyncToken as SyncToken
from .web import download_required
@@ -1134,6 +1133,14 @@ def download_book(book_id, book_format):
def NATIVE_KOBO_RESOURCES():
kobo_file = os.path.join(BASE_DIR, "kobo_resources.txt")
try:
if os.path.isfile(kobo_file):
with open(kobo_file, "r") as f:
lines = f.read()
return json.loads(lines)
except Exception as e:
log.error(e)
return {
"account_page": "https://www.kobo.com/account/settings",
"account_page_rakuten": "https://my.rakuten.co.jp/",
+1 -1
View File
@@ -44,4 +44,4 @@ natsort>=2.2.0,<8.5.0
comicapi>=2.2.0,<3.3.0
# Kobo integration
jsonschema>=3.2.0,<4.24.0
jsonschema>=3.2.0,<4.30.0