From 4afb4869861da1d43f143debefe9d00e5b0b51d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E6=AA=8E?= Date: Thu, 2 Mar 2017 19:59:35 +0800 Subject: [PATCH] add languages field for BookMeta --- cps/book_formats.py | 6 ++++-- cps/epub.py | 3 ++- cps/fb2.py | 3 ++- cps/uploader.py | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cps/book_formats.py b/cps/book_formats.py index 64ec86e8..e2911561 100644 --- a/cps/book_formats.py +++ b/cps/book_formats.py @@ -63,7 +63,8 @@ def default_meta(tmp_file_path, original_file_name, original_file_extension): description="", tags="", series="", - series_id="") + series_id="", + languages=None) def pdf_meta(tmp_file_path, original_file_name, original_file_extension): @@ -91,7 +92,8 @@ def pdf_meta(tmp_file_path, original_file_name, original_file_extension): description=subject, tags="", series="", - series_id="") + series_id="", + languages=None) def pdf_preview(tmp_file_path, tmp_dir): diff --git a/cps/epub.py b/cps/epub.py index 62520aa3..e3e03cca 100644 --- a/cps/epub.py +++ b/cps/epub.py @@ -88,4 +88,5 @@ def get_epub_info(tmp_file_path, original_file_name, original_file_extension): description=epub_metadata['description'], tags="", series="", - series_id="") + series_id="", + languages=None) diff --git a/cps/fb2.py b/cps/fb2.py index 205f69ce..98aefdeb 100644 --- a/cps/fb2.py +++ b/cps/fb2.py @@ -59,4 +59,5 @@ def get_fb2_info(tmp_file_path, original_file_extension): description=description, tags="", series="", - series_id="") + series_id="", + languages=None) diff --git a/cps/uploader.py b/cps/uploader.py index 41283361..2772e033 100644 --- a/cps/uploader.py +++ b/cps/uploader.py @@ -7,7 +7,7 @@ import hashlib from collections import namedtuple import book_formats -BookMeta = namedtuple('BookMeta', 'file_path, extension, title, author, cover, description, tags, series, series_id') +BookMeta = namedtuple('BookMeta', 'file_path, extension, title, author, cover, description, tags, series, series_id, languages') """ :rtype: BookMeta