|
|
|
@ -21,20 +21,20 @@
|
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
|
|
from __future__ import division, print_function, unicode_literals
|
|
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
|
|
import sys
|
|
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
|
|
from flask import Blueprint, request, flash, redirect, url_for
|
|
|
|
|
from flask import Blueprint, flash, redirect, request, url_for
|
|
|
|
|
from flask_babel import gettext as _
|
|
|
|
|
from flask_login import login_required, current_user
|
|
|
|
|
from flask_login import current_user, login_required
|
|
|
|
|
from sqlalchemy.exc import InvalidRequestError, OperationalError
|
|
|
|
|
from sqlalchemy.sql.expression import func, true
|
|
|
|
|
from sqlalchemy.exc import OperationalError, InvalidRequestError
|
|
|
|
|
|
|
|
|
|
from . import logger, ub, calibre_db, db, config
|
|
|
|
|
from . import calibre_db, config, db, logger, ub
|
|
|
|
|
from .render_template import render_title_template
|
|
|
|
|
from .usermanagement import login_required_if_no_ano
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shelf = Blueprint('shelf', __name__)
|
|
|
|
|
log = logger.create()
|
|
|
|
|
|
|
|
|
@ -240,8 +240,11 @@ def create_edit_shelf(shelf, title, page, shelf_id=False):
|
|
|
|
|
else:
|
|
|
|
|
shelf.is_public = 0
|
|
|
|
|
|
|
|
|
|
if config.config_kobo_sync and "kobo_sync" in to_save:
|
|
|
|
|
if config.config_kobo_sync:
|
|
|
|
|
if "kobo_sync" in to_save:
|
|
|
|
|
shelf.kobo_sync = True
|
|
|
|
|
else:
|
|
|
|
|
shelf.kobo_sync = False
|
|
|
|
|
|
|
|
|
|
if check_shelf_is_unique(shelf, to_save, shelf_id):
|
|
|
|
|
shelf.name = to_save["title"]
|
|
|
|
|