Merge remote-tracking branch 'prefer_kepub/prefer-kepub' into master (send kepub instead of epub)
This commit is contained in:
commit
388e46ee81
1 changed files with 4 additions and 2 deletions
|
@ -52,7 +52,7 @@ from .services import SyncToken as SyncToken
|
||||||
from .web import download_required
|
from .web import download_required
|
||||||
from .kobo_auth import requires_kobo_auth, get_auth_token
|
from .kobo_auth import requires_kobo_auth, get_auth_token
|
||||||
|
|
||||||
KOBO_FORMATS = {"KEPUB": ["KEPUB", "EPUB3"], "EPUB": ["EPUB"]}
|
KOBO_FORMATS = {"KEPUB": ["KEPUB"], "EPUB": ["EPUB3", "EPUB"]}
|
||||||
KOBO_STOREAPI_URL = "https://storeapi.kobo.com"
|
KOBO_STOREAPI_URL = "https://storeapi.kobo.com"
|
||||||
KOBO_IMAGEHOST_URL = "https://kbimages1-a.akamaihd.net"
|
KOBO_IMAGEHOST_URL = "https://kbimages1-a.akamaihd.net"
|
||||||
|
|
||||||
|
@ -350,7 +350,9 @@ def get_seriesindex(book):
|
||||||
|
|
||||||
def get_metadata(book):
|
def get_metadata(book):
|
||||||
download_urls = []
|
download_urls = []
|
||||||
for book_data in book.data:
|
kepub = [data for data in book.data if data.format == 'KEPUB']
|
||||||
|
|
||||||
|
for book_data in kepub if len(kepub) > 0 else book.data:
|
||||||
if book_data.format not in KOBO_FORMATS:
|
if book_data.format not in KOBO_FORMATS:
|
||||||
continue
|
continue
|
||||||
for kobo_format in KOBO_FORMATS[book_data.format]:
|
for kobo_format in KOBO_FORMATS[book_data.format]:
|
||||||
|
|
Loading…
Reference in a new issue