Commit Graph

205 Commits

Author SHA1 Message Date
Ozzie Isaacs
6e5a1a1f4d Merge remote-tracking branch 'add_Babelio/patch-1' into master 2021-04-18 12:05:00 +02:00
Ozzie Isaacs
39bbee0eeb Books sort with non Books table column working #1938 2021-04-17 10:27:30 +02:00
malletfils
3973362457
Update db.py
Just adding support for Babelio (french website about books) in the link section
2021-04-14 19:57:02 +02:00
Ozzie Isaacs
90f2b3fb21 Refactored list checkbox sort 2021-04-12 18:39:09 +02:00
Ozzieisaacs
b6177b27f4 Sorting of users in table according to selection possible 2021-04-11 19:59:20 +02:00
Ozzie Isaacs
2d73f541c0 Bugfix sort books list and user list
Prevent transferring password hash to client
2021-04-08 19:37:08 +02:00
Ozzie Isaacs
8acd1f1fe4 Code refactoring and improved error handling for edit user list
Update teststatus
2021-04-06 17:29:42 +02:00
Ozzie Isaacs
2b17bf4114 Update tests
Fixes upload book
2021-03-23 18:57:04 +01:00
Ozzie Isaacs
fc85586809 Bugfixes for sqlalchemy 1.4.0 2021-03-22 16:33:21 +01:00
Ozzie Isaacs
9864d932e0 Changed user.nickname to user.name
Added function to view downloads of all users for admins
2021-03-21 18:55:02 +01:00
Ozzie Isaacs
59ebc1af8a Code refactoring 2021-03-21 08:20:04 +01:00
Ozzie Isaacs
5d8d796807 Compatibility for sqlalchemy 2.0 2021-03-20 10:09:08 +01:00
Ozzie Isaacs
f3d88fc746 Update sqlalchemy 1.4 working 2021-03-20 09:31:29 +01:00
Ozzie Isaacs
f52fa41439 Fix restart server
Some code cosmetics
2021-03-14 14:29:40 +01:00
Zaroz
5511925ba2
Removed elif "url" identifier format type
Removed elif "url" identifier format type, since else output is identical
2021-03-03 21:18:08 -06:00
Zaroz
940c9c45d7
Updated db.py
changed __repr__ else statement to allow for custom id entries
2021-03-02 23:46:02 -06:00
jvoisin
bc876a159e Declare variables before using them
It should fix the following stacktrace:

```
[2021-02-18 14:46:14,771] ERROR {cps:1891} Exception on / [GET]
Traceback (most recent call last):
  File "/opt/calibre/vendor/flask/app.py", line 2447, in wsgi_app
    response = self.full_dispatch_request()
  File "/opt/calibre/vendor/flask/app.py", line 1952, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/opt/calibre/vendor/flask/app.py", line 1821, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/opt/calibre/vendor/flask/_compat.py", line 39, in reraise
    raise value
  File "/opt/calibre/vendor/flask/app.py", line 1950, in full_dispatch_request
    rv = self.dispatch_request()
  File "/opt/calibre/vendor/flask/app.py", line 1936, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/opt/calibre/cps/usermanagement.py", line 38, in decorated_view
    return login_required(func)(*args, **kwargs)
  File "/opt/calibre/vendor/flask_login/utils.py", line 272, in decorated_view
    return func(*args, **kwargs)
  File "/opt/calibre/cps/web.py", line 719, in index
    return render_books_list("newest", sort_param, 1, page)
  File "/opt/calibre/cps/web.py", line 422, in render_books_list
    entries, random, pagination = calibre_db.fill_indexpage(page, 0, db.Books, True, order)
  File "/opt/calibre/cps/db.py", line 610, in fill_indexpage
    return self.fill_indexpage_with_archived_books(page, pagesize, database, db_filter, order, False, *join)
  File "/opt/calibre/cps/db.py", line 635, in fill_indexpage_with_archived_books
    #    book = self.order_authors(book)
UnboundLocalError: local variable 'entries' referenced before assignment
```
2021-02-18 17:02:58 +01:00
Ozzie Isaacs
a9cedb3fca Add logger to db.py 2021-01-23 13:35:30 +01:00
Ozzie Isaacs
e5f754ed0e improved session handling 2021-01-11 14:18:01 +01:00
Ozzie Isaacs
6f9e52792a No autoflush on metadata.db change 2021-01-10 11:01:54 +01:00
Ozzieisaacs
27dcbcd7e1 paged and orderable shelfs
Fix for non writable settings db with non configured calibre-web
2020-12-27 10:24:51 +01:00
Ozzieisaacs
b637a63e71 Refactored exception logging 2020-12-12 08:11:00 +01:00
OzzieIsaacs
8f36128fe3 Merge branch 'session' into Develop 2020-12-08 11:49:39 +01:00
Ozzieisaacs
f677dcb1f4 Fix missing optional parameter initSession 2020-12-08 08:19:18 +01:00
Ozzieisaacs
1a9b220ec2 Session no longer expires on commit (only in worker thread) 2020-12-08 08:04:46 +01:00
Ozzieisaacs
d15d252af7 Session no longer expires on commit 2020-12-08 08:01:42 +01:00
Ozzieisaacs
777c2726d3 Changed session_handing 2020-12-07 08:52:52 +01:00
jvoisin
2c99e71626 Remove a superfluous space 2020-10-29 18:17:32 +01:00
Ozzieisaacs
e16c0caebb Fix opds search 2020-10-10 12:53:10 +02:00
Ozzieisaacs
2e67bd2407 Fix add to shelf from search 2020-10-10 10:32:53 +02:00
OzzieIsaacs
d70ded0993 Fix for search 2020-10-10 07:47:27 +02:00
OzzieIsaacs
bb03026589 Fixes from merge problems 2020-10-10 07:30:03 +02:00
OzzieIsaacs
3b8e5ddfb3 Merge remote-tracking branch 'worker/db' into Develop
# Conflicts:
#	cps/tasks/convert.py
2020-10-06 21:40:47 +02:00
Ozzieisaacs
6e6f144b7a Paginated search and advanced search
Wraparound on books list deactivated
2020-10-04 19:23:06 +02:00
Ozzieisaacs
7c8f6ce62f Merge branch 'master' into Develop
# Conflicts:
#	cps/comic.py
#	cps/editbooks.py
#	cps/isoLanguages.py
2020-09-26 07:54:38 +02:00
Ozzieisaacs
2d712a3841 Fix #1612 2020-09-20 10:03:05 +02:00
blitzmann
0480edce2a Clarify need for WeakSet 2020-09-18 21:52:45 -04:00
Alexander Yakovlev
4eded82102
Add ISFDB 2020-09-15 17:39:13 +07:00
Alexander Yakovlev
ec4ff83465
Add ISSN tags 2020-09-15 13:50:34 +07:00
Alexander Yakovlev
8745b8b051
nice title for Litres tags 2020-09-15 13:47:57 +07:00
Alexander Yakovlev
4e28c3cadb
add Litres references 2020-09-15 13:41:01 +07:00
blitzmann
76c724c783 Remove global session object, this is now wrapped in the CalibreDB class 2020-09-13 21:37:47 -04:00
blitzmann
032cb59388 Fix resetting the session when first configuring the calibre-db on first boot up 2020-09-13 13:16:11 -04:00
blitzmann
18d16f9a8b Initial attempt at setting up CalibreDB as a class that carries the engine and DB connection, and the instance being the session 2020-09-11 22:52:40 -04:00
OzzieIsaacs
670cbcd336 Merge branch 'master' into Develop 2020-09-07 21:33:11 +02:00
Ozzieisaacs
449d31e8a1 Refactored update_dir_structure_file 2020-09-07 21:26:59 +02:00
Ozzieisaacs
1450a21d00 Fix links to amazon (#1461) 2020-09-07 18:27:43 +02:00
Ozzieisaacs
e012726cd4 Fix #1461 (parse Amazon_* identifiers) 2020-09-06 19:31:31 +02:00
Ozzieisaacs
f49688fdb9 Fix #1461 (parse Amazon_* identifiers) 2020-09-06 19:31:03 +02:00
Ozzieisaacs
e32b017431 Revert "Test revert global Session"
This reverts commit 393869e538.
2020-09-06 10:59:34 +02:00
Ozzieisaacs
393869e538 Test revert global Session 2020-09-06 10:27:10 +02:00
Ozzieisaacs
eaed53e25b Fix for author edit error (2 same sort_authors lead maybe to choose wrong one) 2020-09-05 18:23:14 +02:00
OzzieIsaacs
feacbe8ebd Possible Fix for database crash after adding new format and accessing calibre database afterwards 2020-09-05 10:24:32 +02:00
blitzmann
6322919bc7 Merge branch 'Develop' into tasks
# Conflicts:
#	cps/db.py
2020-08-25 00:15:41 -04:00
blitzmann
5ec1283bb1 Remove threading for the calibre DB class 2020-08-24 21:03:59 -04:00
blitzmann
0f28dc5e55 Remove the queue stuff for CalibreDB (is no longer used) 2020-08-23 23:17:07 -04:00
blitzmann
bf41b04cfa Remove convert task from db.py - with the fixed from #1565, this no longer seems to be needed 2020-08-23 13:07:24 -04:00
blitzmann
414043ded1 Remove references to old worker, turn off calibre_db task queue (for now until I can determine if it's needed still), and attempt to re-implement email progress tracking (not working at the moment) 2020-08-22 23:35:48 -04:00
OzzieIsaacs
ad144922fb Merge with master 2020-08-22 09:23:29 +02:00
OzzieIsaacs
1535bdbcd8 Merge remote-tracking branch 'memorydatabase/issue/1564' 2020-08-15 12:08:59 +02:00
OzzieIsaacs
f9c6fb30bf Excluded series type again, as it causes problems upon reconnect 2020-08-14 19:43:54 +02:00
Ozzie Isaacs
94ad93ebd7 Added series like custom columns #1501 2020-08-11 18:56:34 +02:00
blitzmann
0e1ec5034e Fix for #1564 - using memory database in multiple threads.
See also: https://docs.sqlalchemy.org/en/13/dialects/sqlite.html#using-a-memory-database-in-multiple-threads
2020-08-11 12:44:55 -04:00
Ozzieisaacs
c18d5786dd Improved validation check 2020-06-12 13:45:07 +02:00
Ozzieisaacs
1c681ee378 Improvements for books table editor 2020-06-11 21:19:09 +02:00
Ozzieisaacs
4038cb5b85 Internal paged Search prepared
Search for table list is working
2020-06-08 17:34:03 +02:00
Ozzieisaacs
0dd0605a1f Book list for merging 2020-06-06 21:21:10 +02:00
Ozzieisaacs
827b0c6e50 Changed pubdate to timestamp 2020-06-06 09:52:35 +02:00
Ozzieisaacs
27ed918896 Enabled search for archived books 2020-05-27 19:19:17 +02:00
Ozzieisaacs
46197d82b5 Edit and Upload books refactored 2020-05-24 20:19:43 +02:00
OzzieIsaacs
d0e15da352 Fix lcase function 2020-05-23 12:51:48 +02:00
Ozzieisaacs
5f0660a4e5 Refactored helper.py and db.py 2020-05-23 10:16:29 +02:00
OzzieIsaacs
b7535b9526 Merging master branch
- fix title sort function
- fix focus on search
2020-05-21 22:31:29 +02:00
Ozzieisaacs
098dab889a Fixed title sorting routine 2020-05-21 19:37:54 +02:00
Ozzieisaacs
1a458fe39f Fix for #1407 converting books should now be possible again 2020-05-21 18:16:11 +02:00
Ozzieisaacs
b75497231e Additional fix for #1407 (metadata.db is now held in memory, app.db is attached to it -> joins between both databases possible -> book_read_link is joined for getting result) 2020-05-21 09:28:35 +02:00
Ozzieisaacs
47641eee59 Merge branch 'master' into Develop 2020-05-12 16:16:04 +02:00
Ozzieisaacs
b48afa38ac Fix #1386 (Add asin to recognized identifiers) 2020-05-12 14:44:57 +02:00
Ozzieisaacs
16a3deec2c Merge branch 'master' into Develop
# Conflicts:
#	cps/helper.py
2020-05-10 19:24:55 +02:00
jvoisin
dd3b562f1a Change some links from http to https 2020-05-09 17:11:56 +02:00
Ozzieisaacs
718d50a037 Starting again without traceback (moved gdriveutil import) 2020-05-09 12:17:28 +02:00
Ozzieisaacs
e1439b529b Config Options for limiting email size, change username to e-mail adress, use kepubify
Added work on Unrar5 decompression (breaks comic reader totally)
2020-05-04 18:19:30 +02:00
Ozzieisaacs
0adcd1b3d9 UI Improvements
Added additional restrictions to Calibre DB interface
2020-05-03 10:55:33 +02:00
Ozzieisaacs
b160a8de0b Merge branch 'master' into Develop
# Conflicts:
#	cps/__init__.py
#	cps/comic.py
#	cps/editbooks.py
#	cps/helper.py
#	cps/kobo.py
#	cps/translations/nl/LC_MESSAGES/messages.mo
#	cps/translations/nl/LC_MESSAGES/messages.po
#	cps/ub.py
#	cps/uploader.py
#	cps/web.py
2020-04-30 18:08:28 +02:00
Ozzieisaacs
2d92818613 Code cosmetics 2020-04-27 20:01:13 +02:00
Ozzieisaacs
24c743d23d Code cosmetics 2020-04-19 19:08:58 +02:00
Ozzieisaacs
4749eccfa5 Added fix for python2 regex
Fix for python2 attributeError instead of TypeError on login with wrong openLDAP setting
Added default empty string on LDAPCertificate
Fix ldap as scheme for tls connection
Enabled add user on LDAP Authentication
LDAP config port is now number input
Added header for user import config
Added python ldap version to about section
Fix: It's no longer possible to login via fallback password as long as LDAP server is available
Fix: TypeError on bind is now catched and transformed to error message
Update Readme
Fixes for ldap
2020-04-14 10:58:32 +02:00
Ozzieisaacs
65105d9dbe Merge remote-tracking branch 'cc/develop/custom_float' into Develop 2020-01-15 17:58:23 +01:00
Ozzieisaacs
1c630eb604 fixes from tests 2019-12-30 15:16:09 +01:00
Ozzieisaacs
f705889c23 Inital Kobo 2019-12-17 20:28:20 +01:00
Ozzieisaacs
26a7d9ef30 Merge branch 'Develop'
# Conflicts:
#	cps/__init__.py
#	cps/about.py
#	cps/admin.py
#	cps/cli.py
#	cps/config_sql.py
#	cps/constants.py
#	cps/converter.py
#	cps/db.py
#	cps/editbooks.py
#	cps/gdriveutils.py
#	cps/helper.py
#	cps/logger.py
#	cps/oauth.py
#	cps/server.py
#	cps/services/simpleldap.py
#	cps/ub.py
#	cps/web.py
#	cps/worker.py
#	optional-requirements.txt
#	setup.cfg
#	setup.py
2019-07-17 19:07:05 +02:00
Daniel Pavel
a836df9a5a more robust disposing of database session
avoid spamming the log with debug messages from libraries
2019-07-14 14:44:48 +03:00
Ozzieisaacs
4708347c16 Merge branch 'Develop'
# Conflicts:
#	MANIFEST.in
#	README.md
#	cps/helper.py
#	cps/static/js/archive/archive.js
#	cps/translations/nl/LC_MESSAGES/messages.mo
#	cps/translations/nl/LC_MESSAGES/messages.po
#	cps/ub.py
#	cps/updater.py
#	cps/web.py
#	cps/worker.py
#	optional-requirements.txt
2019-07-13 20:54:21 +02:00
Daniel Pavel
006e596c72 Moved config class into separate file.
Moved Goodreads and LDAP services into separate package.
2019-07-07 16:05:51 +03:00
Ozzieisaacs
572b5427c7 Fix Encoding issues for python2 2019-06-23 21:11:45 +02:00
Ozzieisaacs
14b6202eec Code cosmetics
Fixes func in helper,web
Fixes for pdf reader
fixes for calling from another folder
renamed to calibreweb for importing in python caller script
2019-06-08 13:45:27 +02:00
Ozzieisaacs
50973ffb72 Merge remote-tracking branch 'constants/Develop-logging-cleanup' into Develop 2019-06-08 06:52:41 +02:00
Daniel Pavel
b89ab9ff10 logging clean-up
- moved most constants to separate file
- sorted and cleaned-up imports
- moved logging setup to separate file
2019-06-06 18:10:22 +03:00
Ozzieisaacs
bb0d5c5538 Working for pip and "normal" start for python3 and python2 2019-06-02 09:33:45 +02:00
Ozzieisaacs
406d1c76c9 Sorting and filtering of lists working (except file formats)
Refactored and bugfixing show_cover
Refactored import of helper in web.py
Fix for displaying /me (gettext) throwing error 500
Fix get search results throwing error 500
Fix routing books_list for python2.7
Fix for "me" and "settings" pages
Update sidebarview and list view
2019-04-22 19:11:35 +02:00