codex 1.6.0__py3-none-any.whl → 1.6.0a0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of codex might be problematic. Click here for more details.
- codex/exceptions.py +18 -22
- codex/integrity.py +3 -66
- codex/librarian/covers/coverd.py +2 -2
- codex/librarian/covers/create.py +29 -50
- codex/librarian/covers/path.py +6 -8
- codex/librarian/covers/purge.py +18 -28
- codex/librarian/covers/tasks.py +2 -3
- codex/librarian/importer/{aggregate.py → aggregate_metadata.py} +88 -58
- codex/librarian/importer/{extract.py → clean_metadata.py} +4 -33
- codex/librarian/importer/const.py +13 -46
- codex/librarian/importer/create_comics.py +17 -101
- codex/librarian/importer/create_fks.py +134 -99
- codex/librarian/importer/deleted.py +28 -103
- codex/librarian/importer/failed_imports.py +64 -42
- codex/librarian/importer/importerd.py +290 -71
- codex/librarian/importer/link_comics.py +26 -26
- codex/librarian/importer/moved.py +81 -128
- codex/librarian/importer/query_fks.py +122 -142
- codex/librarian/importer/status.py +39 -8
- codex/librarian/importer/tasks.py +9 -26
- codex/librarian/importer/update_comics.py +89 -0
- codex/librarian/janitor/cleanup.py +2 -26
- codex/librarian/janitor/failed_imports.py +1 -1
- codex/librarian/janitor/janitor.py +1 -13
- codex/librarian/janitor/janitord.py +1 -1
- codex/librarian/janitor/status.py +0 -1
- codex/librarian/janitor/tasks.py +0 -5
- codex/librarian/librariand.py +5 -9
- codex/librarian/notifier/notifierd.py +1 -1
- codex/librarian/notifier/tasks.py +4 -4
- codex/librarian/search/update.py +1 -1
- codex/librarian/watchdog/db_snapshot.py +6 -9
- codex/librarian/watchdog/emitter.py +0 -3
- codex/librarian/watchdog/event_batcherd.py +3 -19
- codex/librarian/watchdog/events.py +36 -176
- codex/librarian/watchdog/observers.py +3 -13
- codex/middleware.py +2 -1
- codex/migrations/0027_sort_name.py +149 -0
- codex/models/admin.py +2 -0
- codex/models/base.py +0 -3
- codex/models/comic.py +9 -13
- codex/models/{util.py → const.py} +2 -15
- codex/models/groups.py +14 -28
- codex/models/library.py +3 -11
- codex/models/paths.py +14 -61
- codex/permissions.py +1 -1
- codex/search/backend_search.py +8 -5
- codex/search/query.py +2 -25
- codex/search/writing.py +1 -1
- codex/serializers/admin.py +44 -53
- codex/serializers/browser/choices.py +42 -37
- codex/serializers/browser/filters.py +131 -32
- codex/serializers/browser/metadata.py +1 -45
- codex/serializers/browser/mixins.py +4 -37
- codex/serializers/browser/page.py +6 -3
- codex/serializers/browser/settings.py +11 -42
- codex/serializers/choices.py +1 -14
- codex/serializers/models/pycountry.py +51 -11
- codex/serializers/opds/v2.py +16 -10
- codex/serializers/opds/v2_unused.py +3 -5
- codex/serializers/reader.py +7 -21
- codex/serializers/redirect.py +2 -3
- codex/serializers/route.py +7 -16
- codex/settings/settings.py +8 -23
- codex/startup.py +3 -77
- codex/static_root/assets/VCheckbox-Aq_ImMNC.da711f8b6a15.js +1 -0
- codex/static_root/assets/VCheckbox-Aq_ImMNC.da711f8b6a15.js.br +0 -0
- codex/static_root/assets/VCheckbox-Aq_ImMNC.da711f8b6a15.js.gz +0 -0
- codex/static_root/assets/VCheckbox-Aq_ImMNC.js +1 -0
- codex/static_root/assets/VCheckbox-Aq_ImMNC.js.br +0 -0
- codex/static_root/assets/VCheckbox-Aq_ImMNC.js.gz +0 -0
- codex/static_root/assets/{VCheckboxBtn-DxNOKONG.5ab34c4c47aa.js → VCheckboxBtn-D3izCBa7.54f4d7f48bbf.js} +1 -1
- codex/static_root/assets/VCheckboxBtn-D3izCBa7.54f4d7f48bbf.js.br +0 -0
- codex/static_root/assets/VCheckboxBtn-D3izCBa7.54f4d7f48bbf.js.gz +0 -0
- codex/static_root/assets/{VCheckboxBtn-DxNOKONG.js → VCheckboxBtn-D3izCBa7.js} +1 -1
- codex/static_root/assets/VCheckboxBtn-D3izCBa7.js.br +0 -0
- codex/static_root/assets/VCheckboxBtn-D3izCBa7.js.gz +0 -0
- codex/static_root/assets/VCombobox-DLL1EsSN.55622a0cd4ab.js +1 -0
- codex/static_root/assets/VCombobox-DLL1EsSN.55622a0cd4ab.js.br +0 -0
- codex/static_root/assets/VCombobox-DLL1EsSN.55622a0cd4ab.js.gz +0 -0
- codex/static_root/assets/VCombobox-DLL1EsSN.js +1 -0
- codex/static_root/assets/VCombobox-DLL1EsSN.js.br +0 -0
- codex/static_root/assets/VCombobox-DLL1EsSN.js.gz +0 -0
- codex/static_root/assets/{VDialog-lQ13FnRR.1c801ad756b2.css → VDialog-C5Nxd_zP.css} +1 -1
- codex/static_root/assets/VDialog-C5Nxd_zP.css.br +0 -0
- codex/static_root/assets/VDialog-C5Nxd_zP.css.gz +0 -0
- codex/static_root/assets/{VDialog-lQ13FnRR.css → VDialog-C5Nxd_zP.d327f505ef0e.css} +1 -1
- codex/static_root/assets/VDialog-C5Nxd_zP.d327f505ef0e.css.br +0 -0
- codex/static_root/assets/VDialog-C5Nxd_zP.d327f505ef0e.css.gz +0 -0
- codex/static_root/assets/VDialog-yDKzaGEj.e8dba78ac8db.js +1 -0
- codex/static_root/assets/VDialog-yDKzaGEj.e8dba78ac8db.js.br +0 -0
- codex/static_root/assets/VDialog-yDKzaGEj.e8dba78ac8db.js.gz +0 -0
- codex/static_root/assets/VDialog-yDKzaGEj.js +1 -0
- codex/static_root/assets/VDialog-yDKzaGEj.js.br +0 -0
- codex/static_root/assets/VDialog-yDKzaGEj.js.gz +0 -0
- codex/static_root/assets/VExpansionPanels-Cpo8QLLq.d733b7906e00.js +1 -0
- codex/static_root/assets/VExpansionPanels-Cpo8QLLq.d733b7906e00.js.br +0 -0
- codex/static_root/assets/VExpansionPanels-Cpo8QLLq.d733b7906e00.js.gz +0 -0
- codex/static_root/assets/VExpansionPanels-Cpo8QLLq.js +1 -0
- codex/static_root/assets/VExpansionPanels-Cpo8QLLq.js.br +0 -0
- codex/static_root/assets/VExpansionPanels-Cpo8QLLq.js.gz +0 -0
- codex/static_root/assets/VRadioGroup-DEezv8bL.4a609e74e507.js +1 -0
- codex/static_root/assets/VRadioGroup-DEezv8bL.4a609e74e507.js.br +0 -0
- codex/static_root/assets/VRadioGroup-DEezv8bL.4a609e74e507.js.gz +0 -0
- codex/static_root/assets/VRadioGroup-DEezv8bL.js +1 -0
- codex/static_root/assets/VRadioGroup-DEezv8bL.js.br +0 -0
- codex/static_root/assets/VRadioGroup-DEezv8bL.js.gz +0 -0
- codex/static_root/assets/VSelect-BKXcujPy.8871035f5634.js +1 -0
- codex/static_root/assets/VSelect-BKXcujPy.8871035f5634.js.br +0 -0
- codex/static_root/assets/VSelect-BKXcujPy.8871035f5634.js.gz +0 -0
- codex/static_root/assets/VSelect-BKXcujPy.js +1 -0
- codex/static_root/assets/VSelect-BKXcujPy.js.br +0 -0
- codex/static_root/assets/VSelect-BKXcujPy.js.gz +0 -0
- codex/static_root/assets/VSelectionControl-DJAPiluk.402a7ad84a8e.js +1 -0
- codex/static_root/assets/VSelectionControl-DJAPiluk.402a7ad84a8e.js.br +0 -0
- codex/static_root/assets/VSelectionControl-DJAPiluk.402a7ad84a8e.js.gz +0 -0
- codex/static_root/assets/VSelectionControl-DJAPiluk.js +1 -0
- codex/static_root/assets/VSelectionControl-DJAPiluk.js.br +0 -0
- codex/static_root/assets/VSelectionControl-DJAPiluk.js.gz +0 -0
- codex/static_root/assets/VSlideGroup-C-kO93Va.8c9e31362dc5.js +1 -0
- codex/static_root/assets/VSlideGroup-C-kO93Va.8c9e31362dc5.js.br +0 -0
- codex/static_root/assets/VSlideGroup-C-kO93Va.8c9e31362dc5.js.gz +0 -0
- codex/static_root/assets/VSlideGroup-C-kO93Va.js +1 -0
- codex/static_root/assets/VSlideGroup-C-kO93Va.js.br +0 -0
- codex/static_root/assets/VSlideGroup-C-kO93Va.js.gz +0 -0
- codex/static_root/assets/{VTable-2RHFqfg6.f0f2106b158b.js → VTable-9vsIQObs.0a135029e924.js} +1 -1
- codex/static_root/assets/VTable-9vsIQObs.0a135029e924.js.br +0 -0
- codex/static_root/assets/VTable-9vsIQObs.0a135029e924.js.gz +0 -0
- codex/static_root/assets/{VTable-2RHFqfg6.js → VTable-9vsIQObs.js} +1 -1
- codex/static_root/assets/VTable-9vsIQObs.js.br +0 -0
- codex/static_root/assets/VTable-9vsIQObs.js.gz +0 -0
- codex/static_root/assets/VTextField-DI9HAmWh.0de01739bbf9.js +1 -0
- codex/static_root/assets/VTextField-DI9HAmWh.0de01739bbf9.js.br +0 -0
- codex/static_root/assets/VTextField-DI9HAmWh.0de01739bbf9.js.gz +0 -0
- codex/static_root/assets/VTextField-DI9HAmWh.js +1 -0
- codex/static_root/assets/VTextField-DI9HAmWh.js.br +0 -0
- codex/static_root/assets/VTextField-DI9HAmWh.js.gz +0 -0
- codex/static_root/assets/VTextField-DuIIp-VY.580110ad24dc.css +1 -0
- codex/static_root/assets/VTextField-DuIIp-VY.580110ad24dc.css.br +0 -0
- codex/static_root/assets/VTextField-DuIIp-VY.580110ad24dc.css.gz +0 -0
- codex/static_root/assets/VTextField-DuIIp-VY.css +1 -0
- codex/static_root/assets/VTextField-DuIIp-VY.css.br +0 -0
- codex/static_root/assets/VTextField-DuIIp-VY.css.gz +0 -0
- codex/static_root/assets/VWindowItem-DpnYkF3y.017d99c27b7b.js +1 -0
- codex/static_root/assets/VWindowItem-DpnYkF3y.017d99c27b7b.js.br +0 -0
- codex/static_root/assets/VWindowItem-DpnYkF3y.017d99c27b7b.js.gz +0 -0
- codex/static_root/assets/VWindowItem-DpnYkF3y.js +1 -0
- codex/static_root/assets/VWindowItem-DpnYkF3y.js.br +0 -0
- codex/static_root/assets/VWindowItem-DpnYkF3y.js.gz +0 -0
- codex/static_root/assets/admin-2BTkfSQA.e7ef29cb106d.js +1 -0
- codex/static_root/assets/admin-2BTkfSQA.e7ef29cb106d.js.br +0 -0
- codex/static_root/assets/admin-2BTkfSQA.e7ef29cb106d.js.gz +0 -0
- codex/static_root/assets/admin-2BTkfSQA.js +1 -0
- codex/static_root/assets/admin-2BTkfSQA.js.br +0 -0
- codex/static_root/assets/admin-2BTkfSQA.js.gz +0 -0
- codex/static_root/assets/{admin-B8Bp2Uih.82c98714bcf1.css → admin-BbrOU9Y9.29936748af9e.css} +1 -1
- codex/static_root/assets/admin-BbrOU9Y9.29936748af9e.css.br +0 -0
- codex/static_root/assets/admin-BbrOU9Y9.29936748af9e.css.gz +0 -0
- codex/static_root/assets/{admin-B8Bp2Uih.css → admin-BbrOU9Y9.css} +1 -1
- codex/static_root/assets/admin-BbrOU9Y9.css.br +0 -0
- codex/static_root/assets/admin-BbrOU9Y9.css.gz +0 -0
- codex/static_root/assets/admin-drawer-panel-BF0dMvEE.1514926c78e8.css +1 -0
- codex/static_root/assets/admin-drawer-panel-BF0dMvEE.1514926c78e8.css.br +0 -0
- codex/static_root/assets/admin-drawer-panel-BF0dMvEE.1514926c78e8.css.gz +0 -0
- codex/static_root/assets/admin-drawer-panel-BF0dMvEE.css +1 -0
- codex/static_root/assets/admin-drawer-panel-BF0dMvEE.css.br +0 -0
- codex/static_root/assets/admin-drawer-panel-BF0dMvEE.css.gz +0 -0
- codex/static_root/assets/admin-drawer-panel-mtdde7vY.c172dbae9463.js +30 -0
- codex/static_root/assets/admin-drawer-panel-mtdde7vY.c172dbae9463.js.br +0 -0
- codex/static_root/assets/admin-drawer-panel-mtdde7vY.c172dbae9463.js.gz +0 -0
- codex/static_root/assets/admin-drawer-panel-mtdde7vY.js +30 -0
- codex/static_root/assets/admin-drawer-panel-mtdde7vY.js.br +0 -0
- codex/static_root/assets/admin-drawer-panel-mtdde7vY.js.gz +0 -0
- codex/static_root/assets/browser-BA-AwUn-.23bb4b2f6a29.js +1 -0
- codex/static_root/assets/browser-BA-AwUn-.23bb4b2f6a29.js.br +0 -0
- codex/static_root/assets/browser-BA-AwUn-.23bb4b2f6a29.js.gz +0 -0
- codex/static_root/assets/browser-BA-AwUn-.js +1 -0
- codex/static_root/assets/browser-BA-AwUn-.js.br +0 -0
- codex/static_root/assets/browser-BA-AwUn-.js.gz +0 -0
- codex/static_root/assets/browser-CZeVqRNy.ccfca9a05bfe.css +1 -0
- codex/static_root/assets/browser-CZeVqRNy.ccfca9a05bfe.css.br +0 -0
- codex/static_root/assets/browser-CZeVqRNy.ccfca9a05bfe.css.gz +0 -0
- codex/static_root/assets/browser-CZeVqRNy.css +1 -0
- codex/static_root/assets/browser-CZeVqRNy.css.br +0 -0
- codex/static_root/assets/browser-CZeVqRNy.css.gz +0 -0
- codex/static_root/assets/change-password-dialog-C8YONrId.49aa6df6a91d.js +1 -0
- codex/static_root/assets/change-password-dialog-C8YONrId.49aa6df6a91d.js.br +0 -0
- codex/static_root/assets/change-password-dialog-C8YONrId.49aa6df6a91d.js.gz +0 -0
- codex/static_root/assets/change-password-dialog-C8YONrId.js +1 -0
- codex/static_root/assets/change-password-dialog-C8YONrId.js.br +0 -0
- codex/static_root/assets/change-password-dialog-C8YONrId.js.gz +0 -0
- codex/static_root/assets/change-password-dialog-HvIvmmIE.73be0c8a8278.css +1 -0
- codex/static_root/assets/change-password-dialog-HvIvmmIE.73be0c8a8278.css.br +0 -0
- codex/static_root/assets/change-password-dialog-HvIvmmIE.73be0c8a8278.css.gz +0 -0
- codex/static_root/assets/change-password-dialog-HvIvmmIE.css +1 -0
- codex/static_root/assets/change-password-dialog-HvIvmmIE.css.br +0 -0
- codex/static_root/assets/change-password-dialog-HvIvmmIE.css.gz +0 -0
- codex/static_root/assets/confirm-dialog-Clg-o2G-.e11d8efef3fb.js +1 -0
- codex/static_root/assets/confirm-dialog-Clg-o2G-.e11d8efef3fb.js.br +0 -0
- codex/static_root/assets/confirm-dialog-Clg-o2G-.e11d8efef3fb.js.gz +0 -0
- codex/static_root/assets/confirm-dialog-Clg-o2G-.js +1 -0
- codex/static_root/assets/confirm-dialog-Clg-o2G-.js.br +0 -0
- codex/static_root/assets/confirm-dialog-Clg-o2G-.js.gz +0 -0
- codex/static_root/assets/datetime-column-DejrPZxl.9fd36bef6fdd.js +1 -0
- codex/static_root/assets/datetime-column-DejrPZxl.9fd36bef6fdd.js.br +0 -0
- codex/static_root/assets/datetime-column-DejrPZxl.9fd36bef6fdd.js.gz +0 -0
- codex/static_root/assets/datetime-column-DejrPZxl.js +1 -0
- codex/static_root/assets/datetime-column-DejrPZxl.js.br +0 -0
- codex/static_root/assets/datetime-column-DejrPZxl.js.gz +0 -0
- codex/static_root/assets/datetime-column-Dg_RxTVM.1fa7c5cbead7.css +1 -0
- codex/static_root/assets/datetime-column-Dg_RxTVM.1fa7c5cbead7.css.br +0 -0
- codex/static_root/assets/datetime-column-Dg_RxTVM.css +1 -0
- codex/static_root/assets/datetime-column-Dg_RxTVM.css.br +0 -0
- codex/static_root/assets/filter-DHo57nTp.4d79a276d806.js +1 -0
- codex/static_root/assets/filter-DHo57nTp.4d79a276d806.js.br +0 -0
- codex/static_root/assets/filter-DHo57nTp.4d79a276d806.js.gz +0 -0
- codex/static_root/assets/filter-DHo57nTp.js +1 -0
- codex/static_root/assets/filter-DHo57nTp.js.br +0 -0
- codex/static_root/assets/filter-DHo57nTp.js.gz +0 -0
- codex/static_root/assets/flag-tab-BacZLlVi.8deba6a5370d.css +1 -0
- codex/static_root/assets/flag-tab-BacZLlVi.8deba6a5370d.css.br +0 -0
- codex/static_root/assets/flag-tab-BacZLlVi.8deba6a5370d.css.gz +0 -0
- codex/static_root/assets/flag-tab-BacZLlVi.css +1 -0
- codex/static_root/assets/flag-tab-BacZLlVi.css.br +0 -0
- codex/static_root/assets/flag-tab-BacZLlVi.css.gz +0 -0
- codex/static_root/assets/flag-tab-CagMLGSE.125739911c45.js +1 -0
- codex/static_root/assets/flag-tab-CagMLGSE.125739911c45.js.br +0 -0
- codex/static_root/assets/flag-tab-CagMLGSE.125739911c45.js.gz +0 -0
- codex/static_root/assets/flag-tab-CagMLGSE.js +1 -0
- codex/static_root/assets/flag-tab-CagMLGSE.js.br +0 -0
- codex/static_root/assets/flag-tab-CagMLGSE.js.gz +0 -0
- codex/static_root/assets/{group-tab-D5vWrihT.js → group-tab-BTAjhv32.ac196780d0a9.js} +1 -1
- codex/static_root/assets/group-tab-BTAjhv32.ac196780d0a9.js.br +0 -0
- codex/static_root/assets/group-tab-BTAjhv32.ac196780d0a9.js.gz +0 -0
- codex/static_root/assets/{group-tab-D5vWrihT.1afb2ce453ff.js → group-tab-BTAjhv32.js} +1 -1
- codex/static_root/assets/group-tab-BTAjhv32.js.br +0 -0
- codex/static_root/assets/group-tab-BTAjhv32.js.gz +0 -0
- codex/static_root/assets/http-error-DaHEsKbT.55d56ce2b9b4.js +1 -0
- codex/static_root/assets/http-error-DaHEsKbT.55d56ce2b9b4.js.br +0 -0
- codex/static_root/assets/http-error-DaHEsKbT.55d56ce2b9b4.js.gz +0 -0
- codex/static_root/assets/http-error-DaHEsKbT.js +1 -0
- codex/static_root/assets/http-error-DaHEsKbT.js.br +0 -0
- codex/static_root/assets/http-error-DaHEsKbT.js.gz +0 -0
- codex/static_root/assets/http-error-_wlDqEcp.5b78d3e332c9.css +1 -0
- codex/static_root/assets/{http-error-DKulXuTl.95e42988d5d5.css.br → http-error-_wlDqEcp.5b78d3e332c9.css.br} +0 -0
- codex/static_root/assets/http-error-_wlDqEcp.5b78d3e332c9.css.gz +0 -0
- codex/static_root/assets/http-error-_wlDqEcp.css +1 -0
- codex/static_root/assets/{http-error-DKulXuTl.css.br → http-error-_wlDqEcp.css.br} +0 -0
- codex/static_root/assets/http-error-_wlDqEcp.css.gz +0 -0
- codex/static_root/assets/index-DUjeNg4x.36d50c91b2c1.js +1 -0
- codex/static_root/assets/index-DUjeNg4x.36d50c91b2c1.js.br +0 -0
- codex/static_root/assets/index-DUjeNg4x.36d50c91b2c1.js.gz +0 -0
- codex/static_root/assets/index-DUjeNg4x.js +1 -0
- codex/static_root/assets/index-DUjeNg4x.js.br +0 -0
- codex/static_root/assets/index-DUjeNg4x.js.gz +0 -0
- codex/static_root/assets/library-tab-CXbkxNZt.954f2850a439.css +1 -0
- codex/static_root/assets/library-tab-CXbkxNZt.954f2850a439.css.br +2 -0
- codex/static_root/assets/library-tab-CXbkxNZt.954f2850a439.css.gz +0 -0
- codex/static_root/assets/library-tab-CXbkxNZt.css +1 -0
- codex/static_root/assets/library-tab-CXbkxNZt.css.br +2 -0
- codex/static_root/assets/library-tab-CXbkxNZt.css.gz +0 -0
- codex/static_root/assets/library-tab-Cud4639b.7f5a50aaabe8.js +1 -0
- codex/static_root/assets/library-tab-Cud4639b.7f5a50aaabe8.js.br +0 -0
- codex/static_root/assets/library-tab-Cud4639b.7f5a50aaabe8.js.gz +0 -0
- codex/static_root/assets/library-tab-Cud4639b.js +1 -0
- codex/static_root/assets/library-tab-Cud4639b.js.br +0 -0
- codex/static_root/assets/library-tab-Cud4639b.js.gz +0 -0
- codex/static_root/assets/main-BnzL_Byv.22f98ee91990.js +32 -0
- codex/static_root/assets/main-BnzL_Byv.22f98ee91990.js.br +0 -0
- codex/static_root/assets/main-BnzL_Byv.22f98ee91990.js.gz +0 -0
- codex/static_root/assets/main-BnzL_Byv.js +32 -0
- codex/static_root/assets/main-BnzL_Byv.js.br +0 -0
- codex/static_root/assets/main-BnzL_Byv.js.gz +0 -0
- codex/static_root/assets/{main-Ztp855PW.d46d718fac45.css → main-sK7HC5h4.6f04ddfc5f1a.css} +1 -1
- codex/static_root/assets/main-sK7HC5h4.6f04ddfc5f1a.css.br +0 -0
- codex/static_root/assets/{main-Ztp855PW.d46d718fac45.css.gz → main-sK7HC5h4.6f04ddfc5f1a.css.gz} +0 -0
- codex/static_root/assets/{main-Ztp855PW.css → main-sK7HC5h4.css} +1 -1
- codex/static_root/assets/main-sK7HC5h4.css.br +0 -0
- codex/static_root/assets/{main-Ztp855PW.css.gz → main-sK7HC5h4.css.gz} +0 -0
- codex/static_root/assets/pagination-toolbar-B3wS4_7p.7695fafdefce.css +1 -0
- codex/static_root/assets/pagination-toolbar-B3wS4_7p.7695fafdefce.css.br +0 -0
- codex/static_root/assets/pagination-toolbar-B3wS4_7p.7695fafdefce.css.gz +0 -0
- codex/static_root/assets/pagination-toolbar-B3wS4_7p.css +1 -0
- codex/static_root/assets/pagination-toolbar-B3wS4_7p.css.br +0 -0
- codex/static_root/assets/pagination-toolbar-B3wS4_7p.css.gz +0 -0
- codex/static_root/assets/pagination-toolbar-Covpd-k8.b71277bd7a2d.js +1 -0
- codex/static_root/assets/pagination-toolbar-Covpd-k8.b71277bd7a2d.js.br +0 -0
- codex/static_root/assets/pagination-toolbar-Covpd-k8.b71277bd7a2d.js.gz +0 -0
- codex/static_root/assets/pagination-toolbar-Covpd-k8.js +1 -0
- codex/static_root/assets/pagination-toolbar-Covpd-k8.js.br +0 -0
- codex/static_root/assets/pagination-toolbar-Covpd-k8.js.gz +0 -0
- codex/static_root/assets/pdf-doc-CD2lnB32.1cef3bf498be.js +35 -0
- codex/static_root/assets/pdf-doc-CD2lnB32.1cef3bf498be.js.br +0 -0
- codex/static_root/assets/pdf-doc-CD2lnB32.1cef3bf498be.js.gz +0 -0
- codex/static_root/assets/pdf-doc-CD2lnB32.js +35 -0
- codex/static_root/assets/pdf-doc-CD2lnB32.js.br +0 -0
- codex/static_root/assets/pdf-doc-CD2lnB32.js.gz +0 -0
- codex/static_root/assets/reader-Dspy46e8.925a6b05bfcf.css +1 -0
- codex/static_root/assets/reader-Dspy46e8.925a6b05bfcf.css.br +0 -0
- codex/static_root/assets/reader-Dspy46e8.925a6b05bfcf.css.gz +0 -0
- codex/static_root/assets/reader-Dspy46e8.css +1 -0
- codex/static_root/assets/reader-Dspy46e8.css.br +0 -0
- codex/static_root/assets/reader-Dspy46e8.css.gz +0 -0
- codex/static_root/assets/reader-L85y7IXD.6de58f450421.js +2 -0
- codex/static_root/assets/reader-L85y7IXD.6de58f450421.js.br +0 -0
- codex/static_root/assets/reader-L85y7IXD.6de58f450421.js.gz +0 -0
- codex/static_root/assets/reader-L85y7IXD.js +2 -0
- codex/static_root/assets/reader-L85y7IXD.js.br +0 -0
- codex/static_root/assets/reader-L85y7IXD.js.gz +0 -0
- codex/static_root/assets/relation-chips-BpuqEeqM.1372d8a3e6cf.js +1 -0
- codex/static_root/assets/relation-chips-BpuqEeqM.1372d8a3e6cf.js.br +0 -0
- codex/static_root/assets/relation-chips-BpuqEeqM.1372d8a3e6cf.js.gz +0 -0
- codex/static_root/assets/relation-chips-BpuqEeqM.js +1 -0
- codex/static_root/assets/relation-chips-BpuqEeqM.js.br +0 -0
- codex/static_root/assets/relation-chips-BpuqEeqM.js.gz +0 -0
- codex/static_root/assets/{relation-chips-Bsc-gUxE.98e65384c3c9.css → relation-chips-D6T6FX7G.css} +1 -1
- codex/static_root/assets/relation-chips-D6T6FX7G.css.br +0 -0
- codex/static_root/assets/relation-chips-D6T6FX7G.css.gz +0 -0
- codex/static_root/assets/{relation-chips-Bsc-gUxE.css → relation-chips-D6T6FX7G.db095b2497e4.css} +1 -1
- codex/static_root/assets/relation-chips-D6T6FX7G.db095b2497e4.css.br +0 -0
- codex/static_root/assets/relation-chips-D6T6FX7G.db095b2497e4.css.gz +0 -0
- codex/static_root/assets/settings-drawer-BgUazs7O.7bbeb1fd98f1.css +1 -0
- codex/static_root/assets/settings-drawer-BgUazs7O.7bbeb1fd98f1.css.br +0 -0
- codex/static_root/assets/settings-drawer-BgUazs7O.7bbeb1fd98f1.css.gz +0 -0
- codex/static_root/assets/settings-drawer-BgUazs7O.css +1 -0
- codex/static_root/assets/settings-drawer-BgUazs7O.css.br +0 -0
- codex/static_root/assets/settings-drawer-BgUazs7O.css.gz +0 -0
- codex/static_root/assets/settings-drawer-CLMcxfVd.b9619341ad48.js +2 -0
- codex/static_root/assets/settings-drawer-CLMcxfVd.b9619341ad48.js.br +0 -0
- codex/static_root/assets/settings-drawer-CLMcxfVd.b9619341ad48.js.gz +0 -0
- codex/static_root/assets/settings-drawer-CLMcxfVd.js +2 -0
- codex/static_root/assets/settings-drawer-CLMcxfVd.js.br +0 -0
- codex/static_root/assets/settings-drawer-CLMcxfVd.js.gz +0 -0
- codex/static_root/assets/stats-tab-CQa3-W05.3d7c61418528.js +1 -0
- codex/static_root/assets/stats-tab-CQa3-W05.3d7c61418528.js.br +0 -0
- codex/static_root/assets/stats-tab-CQa3-W05.3d7c61418528.js.gz +0 -0
- codex/static_root/assets/stats-tab-CQa3-W05.js +1 -0
- codex/static_root/assets/stats-tab-CQa3-W05.js.br +0 -0
- codex/static_root/assets/stats-tab-CQa3-W05.js.gz +0 -0
- codex/static_root/assets/stats-tab-TsyG3wH_.b93c080356fc.css +1 -0
- codex/static_root/assets/stats-tab-TsyG3wH_.b93c080356fc.css.br +2 -0
- codex/static_root/assets/stats-tab-TsyG3wH_.b93c080356fc.css.gz +0 -0
- codex/static_root/assets/stats-tab-TsyG3wH_.css +1 -0
- codex/static_root/assets/stats-tab-TsyG3wH_.css.br +2 -0
- codex/static_root/assets/stats-tab-TsyG3wH_.css.gz +0 -0
- codex/static_root/assets/task-tab-OPhBm-O2.8f31f4215114.js +1 -0
- codex/static_root/assets/task-tab-OPhBm-O2.8f31f4215114.js.br +0 -0
- codex/static_root/assets/task-tab-OPhBm-O2.8f31f4215114.js.gz +0 -0
- codex/static_root/assets/task-tab-OPhBm-O2.js +1 -0
- codex/static_root/assets/task-tab-OPhBm-O2.js.br +0 -0
- codex/static_root/assets/task-tab-OPhBm-O2.js.gz +0 -0
- codex/static_root/assets/to-case-kUm8NPpW.5b3369f511b8.js +1 -0
- codex/static_root/assets/to-case-kUm8NPpW.js +1 -0
- codex/static_root/assets/unauthorized-ClQNhRb5.32a8a84d1781.js +1 -0
- codex/static_root/assets/unauthorized-ClQNhRb5.32a8a84d1781.js.br +0 -0
- codex/static_root/assets/unauthorized-ClQNhRb5.32a8a84d1781.js.gz +0 -0
- codex/static_root/assets/unauthorized-ClQNhRb5.js +1 -0
- codex/static_root/assets/unauthorized-ClQNhRb5.js.br +0 -0
- codex/static_root/assets/unauthorized-ClQNhRb5.js.gz +0 -0
- codex/static_root/assets/{unauthorized-CibJYD8o.4c2de98c2b53.css → unauthorized-DWgytUow.ca2f13dbdbf5.css} +1 -1
- codex/static_root/assets/unauthorized-DWgytUow.ca2f13dbdbf5.css.br +0 -0
- codex/static_root/assets/unauthorized-DWgytUow.ca2f13dbdbf5.css.gz +0 -0
- codex/static_root/assets/{unauthorized-CibJYD8o.css → unauthorized-DWgytUow.css} +1 -1
- codex/static_root/assets/unauthorized-DWgytUow.css.br +0 -0
- codex/static_root/assets/unauthorized-DWgytUow.css.gz +0 -0
- codex/static_root/assets/user-tab-BKkxa2WL.50d83951c09f.js +1 -0
- codex/static_root/assets/user-tab-BKkxa2WL.50d83951c09f.js.br +0 -0
- codex/static_root/assets/user-tab-BKkxa2WL.50d83951c09f.js.gz +0 -0
- codex/static_root/assets/user-tab-BKkxa2WL.js +1 -0
- codex/static_root/assets/user-tab-BKkxa2WL.js.br +0 -0
- codex/static_root/assets/user-tab-BKkxa2WL.js.gz +0 -0
- codex/static_root/js/choices-admin.248384ece3f6.json +1 -0
- codex/static_root/js/choices-admin.248384ece3f6.json.br +0 -0
- codex/static_root/js/choices-admin.248384ece3f6.json.gz +0 -0
- codex/static_root/js/choices-admin.json +1 -1
- codex/static_root/js/choices-admin.json.br +0 -0
- codex/static_root/js/choices-admin.json.gz +0 -0
- codex/static_root/js/choices.b60817ba0a93.json +1 -0
- codex/static_root/js/choices.b60817ba0a93.json.br +0 -0
- codex/static_root/js/choices.b60817ba0a93.json.gz +0 -0
- codex/static_root/js/choices.json +1 -1
- codex/static_root/js/choices.json.br +0 -0
- codex/static_root/js/choices.json.gz +0 -0
- codex/static_root/manifest.c5fa10a7dfdc.json +641 -0
- codex/static_root/manifest.c5fa10a7dfdc.json.br +0 -0
- codex/static_root/manifest.c5fa10a7dfdc.json.gz +0 -0
- codex/static_root/manifest.json +298 -279
- codex/static_root/manifest.json.br +0 -0
- codex/static_root/manifest.json.gz +0 -0
- codex/static_root/staticfiles.json +1 -1
- codex/status_controller.py +2 -11
- codex/urls/api/auth.py +1 -2
- codex/urls/api/browser.py +4 -13
- codex/urls/api/reader.py +9 -3
- codex/urls/api/v3.py +0 -2
- codex/urls/opds/binary.py +1 -1
- codex/views/admin/api_key.py +8 -7
- codex/views/admin/flag.py +7 -2
- codex/views/admin/group.py +6 -2
- codex/views/admin/library.py +37 -44
- codex/views/admin/stats.py +83 -20
- codex/views/admin/tasks.py +12 -26
- codex/views/admin/user.py +9 -3
- codex/views/auth.py +54 -31
- codex/views/bookmark.py +72 -92
- codex/views/browser/base.py +90 -42
- codex/views/browser/browser.py +371 -92
- codex/views/browser/{annotations.py → browser_annotations.py} +121 -67
- codex/views/browser/browser_breadcrumbs.py +175 -0
- codex/views/browser/browser_order_by.py +63 -0
- codex/views/browser/choices.py +85 -38
- codex/views/browser/const.py +3 -0
- codex/views/browser/filters/annotations.py +19 -87
- codex/views/browser/filters/bookmark.py +12 -24
- codex/views/browser/filters/field.py +6 -8
- codex/views/browser/filters/group.py +14 -35
- codex/views/browser/filters/search.py +20 -31
- codex/views/browser/metadata.py +73 -112
- codex/views/browser/session.py +12 -0
- codex/views/const.py +0 -140
- codex/views/cover.py +77 -0
- codex/views/download.py +8 -5
- codex/views/frontend.py +2 -4
- codex/views/opds/authentication_v1.py +45 -46
- codex/views/opds/binary.py +10 -5
- codex/views/opds/const.py +0 -13
- codex/views/opds/urls.py +4 -6
- codex/views/opds/util.py +12 -4
- codex/views/opds/v1/entry/links.py +33 -18
- codex/views/opds/v1/facets.py +7 -7
- codex/views/opds/v1/feed.py +45 -55
- codex/views/opds/v1/links.py +5 -7
- codex/views/opds/v1/opensearch_v1.py +6 -2
- codex/views/opds/v2/feed.py +26 -25
- codex/views/opds/v2/links.py +2 -4
- codex/views/opds/v2/publications.py +54 -34
- codex/views/opds/v2/top_links.py +2 -2
- codex/views/reader/page.py +8 -15
- codex/views/reader/reader.py +322 -19
- codex/views/reader/{settings.py → session.py} +2 -4
- codex/views/session.py +102 -83
- codex/views/template.py +3 -3
- codex/views/version.py +2 -2
- codex/websockets/consumers.py +10 -14
- {codex-1.6.0.dist-info → codex-1.6.0a0.dist-info}/METADATA +15 -22
- {codex-1.6.0.dist-info → codex-1.6.0a0.dist-info}/RECORD +449 -467
- codex/librarian/importer/cache.py +0 -93
- codex/librarian/importer/create_covers.py +0 -96
- codex/librarian/importer/importer.py +0 -96
- codex/librarian/importer/init.py +0 -265
- codex/librarian/importer/link_covers.py +0 -73
- codex/librarian/importer/query_covers.py +0 -52
- codex/migrations/0027_import_order_and_covers.py +0 -280
- codex/serializers/browser/mtime.py +0 -21
- codex/serializers/fields.py +0 -149
- codex/serializers/settings.py +0 -12
- codex/static_root/assets/VCheckbox-DanrzdHo.8ec5e2094cbf.js +0 -1
- codex/static_root/assets/VCheckbox-DanrzdHo.8ec5e2094cbf.js.br +0 -0
- codex/static_root/assets/VCheckbox-DanrzdHo.8ec5e2094cbf.js.gz +0 -0
- codex/static_root/assets/VCheckbox-DanrzdHo.js +0 -1
- codex/static_root/assets/VCheckbox-DanrzdHo.js.br +0 -0
- codex/static_root/assets/VCheckbox-DanrzdHo.js.gz +0 -0
- codex/static_root/assets/VCheckboxBtn-DxNOKONG.5ab34c4c47aa.js.br +0 -0
- codex/static_root/assets/VCheckboxBtn-DxNOKONG.5ab34c4c47aa.js.gz +0 -0
- codex/static_root/assets/VCheckboxBtn-DxNOKONG.js.br +0 -0
- codex/static_root/assets/VCheckboxBtn-DxNOKONG.js.gz +0 -0
- codex/static_root/assets/VCombobox-DDvdoPTG.11d080e8edd7.js +0 -1
- codex/static_root/assets/VCombobox-DDvdoPTG.11d080e8edd7.js.br +0 -0
- codex/static_root/assets/VCombobox-DDvdoPTG.11d080e8edd7.js.gz +0 -0
- codex/static_root/assets/VCombobox-DDvdoPTG.js +0 -1
- codex/static_root/assets/VCombobox-DDvdoPTG.js.br +0 -0
- codex/static_root/assets/VCombobox-DDvdoPTG.js.gz +0 -0
- codex/static_root/assets/VDialog-Bd5dN_E1.457666d7fce1.js +0 -1
- codex/static_root/assets/VDialog-Bd5dN_E1.457666d7fce1.js.br +0 -0
- codex/static_root/assets/VDialog-Bd5dN_E1.457666d7fce1.js.gz +0 -0
- codex/static_root/assets/VDialog-Bd5dN_E1.js +0 -1
- codex/static_root/assets/VDialog-Bd5dN_E1.js.br +0 -0
- codex/static_root/assets/VDialog-Bd5dN_E1.js.gz +0 -0
- codex/static_root/assets/VDialog-lQ13FnRR.1c801ad756b2.css.br +0 -0
- codex/static_root/assets/VDialog-lQ13FnRR.1c801ad756b2.css.gz +0 -0
- codex/static_root/assets/VDialog-lQ13FnRR.css.br +0 -0
- codex/static_root/assets/VDialog-lQ13FnRR.css.gz +0 -0
- codex/static_root/assets/VExpansionPanels-DqTuYpTR.12673cf9f391.js +0 -1
- codex/static_root/assets/VExpansionPanels-DqTuYpTR.12673cf9f391.js.br +0 -0
- codex/static_root/assets/VExpansionPanels-DqTuYpTR.12673cf9f391.js.gz +0 -0
- codex/static_root/assets/VExpansionPanels-DqTuYpTR.js +0 -1
- codex/static_root/assets/VExpansionPanels-DqTuYpTR.js.br +0 -0
- codex/static_root/assets/VExpansionPanels-DqTuYpTR.js.gz +0 -0
- codex/static_root/assets/VRadioGroup-DKb8XPr-.3cf6bf5bf3bc.js +0 -1
- codex/static_root/assets/VRadioGroup-DKb8XPr-.3cf6bf5bf3bc.js.br +0 -0
- codex/static_root/assets/VRadioGroup-DKb8XPr-.3cf6bf5bf3bc.js.gz +0 -0
- codex/static_root/assets/VRadioGroup-DKb8XPr-.js +0 -1
- codex/static_root/assets/VRadioGroup-DKb8XPr-.js.br +0 -0
- codex/static_root/assets/VRadioGroup-DKb8XPr-.js.gz +0 -0
- codex/static_root/assets/VSelect-C_yPbyCG.08bd6b53a7ce.js +0 -1
- codex/static_root/assets/VSelect-C_yPbyCG.08bd6b53a7ce.js.br +0 -0
- codex/static_root/assets/VSelect-C_yPbyCG.08bd6b53a7ce.js.gz +0 -0
- codex/static_root/assets/VSelect-C_yPbyCG.js +0 -1
- codex/static_root/assets/VSelect-C_yPbyCG.js.br +0 -0
- codex/static_root/assets/VSelect-C_yPbyCG.js.gz +0 -0
- codex/static_root/assets/VSelectionControl-CmFPvGMS.802c9b3e6e28.js +0 -1
- codex/static_root/assets/VSelectionControl-CmFPvGMS.802c9b3e6e28.js.br +0 -0
- codex/static_root/assets/VSelectionControl-CmFPvGMS.802c9b3e6e28.js.gz +0 -0
- codex/static_root/assets/VSelectionControl-CmFPvGMS.js +0 -1
- codex/static_root/assets/VSelectionControl-CmFPvGMS.js.br +0 -0
- codex/static_root/assets/VSelectionControl-CmFPvGMS.js.gz +0 -0
- codex/static_root/assets/VSlideGroup-D5FZWsM1.a47491fe3e6d.js +0 -1
- codex/static_root/assets/VSlideGroup-D5FZWsM1.a47491fe3e6d.js.br +0 -0
- codex/static_root/assets/VSlideGroup-D5FZWsM1.a47491fe3e6d.js.gz +0 -0
- codex/static_root/assets/VSlideGroup-D5FZWsM1.js +0 -1
- codex/static_root/assets/VSlideGroup-D5FZWsM1.js.br +0 -0
- codex/static_root/assets/VSlideGroup-D5FZWsM1.js.gz +0 -0
- codex/static_root/assets/VTable-2RHFqfg6.f0f2106b158b.js.br +0 -0
- codex/static_root/assets/VTable-2RHFqfg6.f0f2106b158b.js.gz +0 -0
- codex/static_root/assets/VTable-2RHFqfg6.js.br +0 -0
- codex/static_root/assets/VTable-2RHFqfg6.js.gz +0 -0
- codex/static_root/assets/VTextField-BssVoDhB.4cc388b4aa3c.css +0 -1
- codex/static_root/assets/VTextField-BssVoDhB.4cc388b4aa3c.css.br +0 -0
- codex/static_root/assets/VTextField-BssVoDhB.4cc388b4aa3c.css.gz +0 -0
- codex/static_root/assets/VTextField-BssVoDhB.css +0 -1
- codex/static_root/assets/VTextField-BssVoDhB.css.br +0 -0
- codex/static_root/assets/VTextField-BssVoDhB.css.gz +0 -0
- codex/static_root/assets/VTextField-o1N9ylIb.7fffaeff8d40.js +0 -1
- codex/static_root/assets/VTextField-o1N9ylIb.7fffaeff8d40.js.br +0 -0
- codex/static_root/assets/VTextField-o1N9ylIb.7fffaeff8d40.js.gz +0 -0
- codex/static_root/assets/VTextField-o1N9ylIb.js +0 -1
- codex/static_root/assets/VTextField-o1N9ylIb.js.br +0 -0
- codex/static_root/assets/VTextField-o1N9ylIb.js.gz +0 -0
- codex/static_root/assets/VWindowItem-C_zvuz9C.663fa48efea4.js +0 -1
- codex/static_root/assets/VWindowItem-C_zvuz9C.663fa48efea4.js.br +0 -0
- codex/static_root/assets/VWindowItem-C_zvuz9C.663fa48efea4.js.gz +0 -0
- codex/static_root/assets/VWindowItem-C_zvuz9C.js +0 -1
- codex/static_root/assets/VWindowItem-C_zvuz9C.js.br +0 -0
- codex/static_root/assets/VWindowItem-C_zvuz9C.js.gz +0 -0
- codex/static_root/assets/admin-B8Bp2Uih.82c98714bcf1.css.br +0 -0
- codex/static_root/assets/admin-B8Bp2Uih.82c98714bcf1.css.gz +0 -0
- codex/static_root/assets/admin-B8Bp2Uih.css.br +0 -0
- codex/static_root/assets/admin-B8Bp2Uih.css.gz +0 -0
- codex/static_root/assets/admin-DHyHEWZ3.7a8015456c0f.js +0 -1
- codex/static_root/assets/admin-DHyHEWZ3.7a8015456c0f.js.br +0 -0
- codex/static_root/assets/admin-DHyHEWZ3.7a8015456c0f.js.gz +0 -0
- codex/static_root/assets/admin-DHyHEWZ3.js +0 -1
- codex/static_root/assets/admin-DHyHEWZ3.js.br +0 -0
- codex/static_root/assets/admin-DHyHEWZ3.js.gz +0 -0
- codex/static_root/assets/admin-drawer-panel-BXpIDQXM.19507a95375b.js +0 -30
- codex/static_root/assets/admin-drawer-panel-BXpIDQXM.19507a95375b.js.br +0 -0
- codex/static_root/assets/admin-drawer-panel-BXpIDQXM.19507a95375b.js.gz +0 -0
- codex/static_root/assets/admin-drawer-panel-BXpIDQXM.js +0 -30
- codex/static_root/assets/admin-drawer-panel-BXpIDQXM.js.br +0 -0
- codex/static_root/assets/admin-drawer-panel-BXpIDQXM.js.gz +0 -0
- codex/static_root/assets/admin-drawer-panel-mne3FIj6.561b3f75fe65.css +0 -1
- codex/static_root/assets/admin-drawer-panel-mne3FIj6.561b3f75fe65.css.br +0 -0
- codex/static_root/assets/admin-drawer-panel-mne3FIj6.561b3f75fe65.css.gz +0 -0
- codex/static_root/assets/admin-drawer-panel-mne3FIj6.css +0 -1
- codex/static_root/assets/admin-drawer-panel-mne3FIj6.css.br +0 -0
- codex/static_root/assets/admin-drawer-panel-mne3FIj6.css.gz +0 -0
- codex/static_root/assets/browser-D0Vjmmp_.a1bfaf48d65f.js +0 -1
- codex/static_root/assets/browser-D0Vjmmp_.a1bfaf48d65f.js.br +0 -0
- codex/static_root/assets/browser-D0Vjmmp_.a1bfaf48d65f.js.gz +0 -0
- codex/static_root/assets/browser-D0Vjmmp_.js +0 -1
- codex/static_root/assets/browser-D0Vjmmp_.js.br +0 -0
- codex/static_root/assets/browser-D0Vjmmp_.js.gz +0 -0
- codex/static_root/assets/browser-D7QQDneO.155cb612ed0c.css +0 -1
- codex/static_root/assets/browser-D7QQDneO.155cb612ed0c.css.br +0 -0
- codex/static_root/assets/browser-D7QQDneO.155cb612ed0c.css.gz +0 -0
- codex/static_root/assets/browser-D7QQDneO.css +0 -1
- codex/static_root/assets/browser-D7QQDneO.css.br +0 -0
- codex/static_root/assets/browser-D7QQDneO.css.gz +0 -0
- codex/static_root/assets/change-password-dialog-0u6IJA87.5f9a9aa573b7.css +0 -1
- codex/static_root/assets/change-password-dialog-0u6IJA87.5f9a9aa573b7.css.br +0 -0
- codex/static_root/assets/change-password-dialog-0u6IJA87.5f9a9aa573b7.css.gz +0 -0
- codex/static_root/assets/change-password-dialog-0u6IJA87.css +0 -1
- codex/static_root/assets/change-password-dialog-0u6IJA87.css.br +0 -0
- codex/static_root/assets/change-password-dialog-0u6IJA87.css.gz +0 -0
- codex/static_root/assets/change-password-dialog-BBsJLPXZ.e642f7e2b96f.js +0 -1
- codex/static_root/assets/change-password-dialog-BBsJLPXZ.e642f7e2b96f.js.br +0 -0
- codex/static_root/assets/change-password-dialog-BBsJLPXZ.e642f7e2b96f.js.gz +0 -0
- codex/static_root/assets/change-password-dialog-BBsJLPXZ.js +0 -1
- codex/static_root/assets/change-password-dialog-BBsJLPXZ.js.br +0 -0
- codex/static_root/assets/change-password-dialog-BBsJLPXZ.js.gz +0 -0
- codex/static_root/assets/confirm-dialog-DCKvg3ai.2a3277b3c147.js +0 -1
- codex/static_root/assets/confirm-dialog-DCKvg3ai.2a3277b3c147.js.br +0 -0
- codex/static_root/assets/confirm-dialog-DCKvg3ai.2a3277b3c147.js.gz +0 -0
- codex/static_root/assets/confirm-dialog-DCKvg3ai.js +0 -1
- codex/static_root/assets/confirm-dialog-DCKvg3ai.js.br +0 -0
- codex/static_root/assets/confirm-dialog-DCKvg3ai.js.gz +0 -0
- codex/static_root/assets/copy-to-clipboard-DoUvDJVx.bec27f144aca.js +0 -1
- codex/static_root/assets/copy-to-clipboard-DoUvDJVx.bec27f144aca.js.br +0 -0
- codex/static_root/assets/copy-to-clipboard-DoUvDJVx.js +0 -1
- codex/static_root/assets/copy-to-clipboard-DoUvDJVx.js.br +0 -0
- codex/static_root/assets/datetime-column-DeCthByU.1f3bf499e063.css +0 -1
- codex/static_root/assets/datetime-column-DeCthByU.css +0 -1
- codex/static_root/assets/datetime-column-jHKA_uNm.039c7da2036f.js +0 -1
- codex/static_root/assets/datetime-column-jHKA_uNm.039c7da2036f.js.br +0 -0
- codex/static_root/assets/datetime-column-jHKA_uNm.039c7da2036f.js.gz +0 -0
- codex/static_root/assets/datetime-column-jHKA_uNm.js +0 -1
- codex/static_root/assets/datetime-column-jHKA_uNm.js.br +0 -0
- codex/static_root/assets/datetime-column-jHKA_uNm.js.gz +0 -0
- codex/static_root/assets/filter-DgPg2ts9.af0fcf0888c6.js +0 -1
- codex/static_root/assets/filter-DgPg2ts9.af0fcf0888c6.js.br +0 -0
- codex/static_root/assets/filter-DgPg2ts9.af0fcf0888c6.js.gz +0 -0
- codex/static_root/assets/filter-DgPg2ts9.js +0 -1
- codex/static_root/assets/filter-DgPg2ts9.js.br +0 -0
- codex/static_root/assets/filter-DgPg2ts9.js.gz +0 -0
- codex/static_root/assets/flag-tab-9qxOALxP.f89bc9891671.js +0 -1
- codex/static_root/assets/flag-tab-9qxOALxP.f89bc9891671.js.br +0 -0
- codex/static_root/assets/flag-tab-9qxOALxP.f89bc9891671.js.gz +0 -0
- codex/static_root/assets/flag-tab-9qxOALxP.js +0 -1
- codex/static_root/assets/flag-tab-9qxOALxP.js.br +0 -0
- codex/static_root/assets/flag-tab-9qxOALxP.js.gz +0 -0
- codex/static_root/assets/flag-tab-BNwbLfrN.b755a99fff7e.css +0 -1
- codex/static_root/assets/flag-tab-BNwbLfrN.b755a99fff7e.css.br +0 -0
- codex/static_root/assets/flag-tab-BNwbLfrN.b755a99fff7e.css.gz +0 -0
- codex/static_root/assets/flag-tab-BNwbLfrN.css +0 -1
- codex/static_root/assets/flag-tab-BNwbLfrN.css.br +0 -0
- codex/static_root/assets/flag-tab-BNwbLfrN.css.gz +0 -0
- codex/static_root/assets/group-tab-D5vWrihT.1afb2ce453ff.js.br +0 -0
- codex/static_root/assets/group-tab-D5vWrihT.1afb2ce453ff.js.gz +0 -0
- codex/static_root/assets/group-tab-D5vWrihT.js.br +0 -0
- codex/static_root/assets/group-tab-D5vWrihT.js.gz +0 -0
- codex/static_root/assets/http-error-B4FHoKfs.141fdae409bc.js +0 -1
- codex/static_root/assets/http-error-B4FHoKfs.141fdae409bc.js.br +0 -0
- codex/static_root/assets/http-error-B4FHoKfs.141fdae409bc.js.gz +0 -0
- codex/static_root/assets/http-error-B4FHoKfs.js +0 -1
- codex/static_root/assets/http-error-B4FHoKfs.js.br +0 -0
- codex/static_root/assets/http-error-B4FHoKfs.js.gz +0 -0
- codex/static_root/assets/http-error-DKulXuTl.95e42988d5d5.css +0 -1
- codex/static_root/assets/http-error-DKulXuTl.95e42988d5d5.css.gz +0 -0
- codex/static_root/assets/http-error-DKulXuTl.css +0 -1
- codex/static_root/assets/http-error-DKulXuTl.css.gz +0 -0
- codex/static_root/assets/library-tab-BN0SfPcH.913e236f625e.css +0 -1
- codex/static_root/assets/library-tab-BN0SfPcH.913e236f625e.css.br +0 -0
- codex/static_root/assets/library-tab-BN0SfPcH.913e236f625e.css.gz +0 -0
- codex/static_root/assets/library-tab-BN0SfPcH.css +0 -1
- codex/static_root/assets/library-tab-BN0SfPcH.css.br +0 -0
- codex/static_root/assets/library-tab-BN0SfPcH.css.gz +0 -0
- codex/static_root/assets/library-tab-BWo0cmzk.0e3d67d0c41a.js +0 -1
- codex/static_root/assets/library-tab-BWo0cmzk.0e3d67d0c41a.js.br +0 -0
- codex/static_root/assets/library-tab-BWo0cmzk.0e3d67d0c41a.js.gz +0 -0
- codex/static_root/assets/library-tab-BWo0cmzk.js +0 -1
- codex/static_root/assets/library-tab-BWo0cmzk.js.br +0 -0
- codex/static_root/assets/library-tab-BWo0cmzk.js.gz +0 -0
- codex/static_root/assets/main-Ztp855PW.css.br +0 -0
- codex/static_root/assets/main-Ztp855PW.d46d718fac45.css.br +0 -0
- codex/static_root/assets/main-ipmlipkF.5e60e6e8e447.js +0 -32
- codex/static_root/assets/main-ipmlipkF.5e60e6e8e447.js.br +0 -0
- codex/static_root/assets/main-ipmlipkF.5e60e6e8e447.js.gz +0 -0
- codex/static_root/assets/main-ipmlipkF.js +0 -32
- codex/static_root/assets/main-ipmlipkF.js.br +0 -0
- codex/static_root/assets/main-ipmlipkF.js.gz +0 -0
- codex/static_root/assets/pagination-toolbar-BA9ifTed.b4865334ee08.css +0 -1
- codex/static_root/assets/pagination-toolbar-BA9ifTed.b4865334ee08.css.br +0 -0
- codex/static_root/assets/pagination-toolbar-BA9ifTed.b4865334ee08.css.gz +0 -0
- codex/static_root/assets/pagination-toolbar-BA9ifTed.css +0 -1
- codex/static_root/assets/pagination-toolbar-BA9ifTed.css.br +0 -0
- codex/static_root/assets/pagination-toolbar-BA9ifTed.css.gz +0 -0
- codex/static_root/assets/pagination-toolbar-kZ-Xdv8c.b3341b8028df.js +0 -1
- codex/static_root/assets/pagination-toolbar-kZ-Xdv8c.b3341b8028df.js.br +0 -0
- codex/static_root/assets/pagination-toolbar-kZ-Xdv8c.b3341b8028df.js.gz +0 -0
- codex/static_root/assets/pagination-toolbar-kZ-Xdv8c.js +0 -1
- codex/static_root/assets/pagination-toolbar-kZ-Xdv8c.js.br +0 -0
- codex/static_root/assets/pagination-toolbar-kZ-Xdv8c.js.gz +0 -0
- codex/static_root/assets/pdf-doc-C2StaYUz.cb848834dbe1.js +0 -305
- codex/static_root/assets/pdf-doc-C2StaYUz.cb848834dbe1.js.br +0 -0
- codex/static_root/assets/pdf-doc-C2StaYUz.cb848834dbe1.js.gz +0 -0
- codex/static_root/assets/pdf-doc-C2StaYUz.js +0 -305
- codex/static_root/assets/pdf-doc-C2StaYUz.js.br +0 -0
- codex/static_root/assets/pdf-doc-C2StaYUz.js.gz +0 -0
- codex/static_root/assets/reader-CCnq3j1-.b6b38ed5521e.js +0 -2
- codex/static_root/assets/reader-CCnq3j1-.b6b38ed5521e.js.br +0 -0
- codex/static_root/assets/reader-CCnq3j1-.b6b38ed5521e.js.gz +0 -0
- codex/static_root/assets/reader-CCnq3j1-.js +0 -2
- codex/static_root/assets/reader-CCnq3j1-.js.br +0 -0
- codex/static_root/assets/reader-CCnq3j1-.js.gz +0 -0
- codex/static_root/assets/reader-CqXFa_gE.78267e9de0c2.css +0 -1
- codex/static_root/assets/reader-CqXFa_gE.78267e9de0c2.css.br +0 -0
- codex/static_root/assets/reader-CqXFa_gE.78267e9de0c2.css.gz +0 -0
- codex/static_root/assets/reader-CqXFa_gE.css +0 -1
- codex/static_root/assets/reader-CqXFa_gE.css.br +0 -0
- codex/static_root/assets/reader-CqXFa_gE.css.gz +0 -0
- codex/static_root/assets/relation-chips-Bsc-gUxE.98e65384c3c9.css.br +0 -0
- codex/static_root/assets/relation-chips-Bsc-gUxE.98e65384c3c9.css.gz +0 -0
- codex/static_root/assets/relation-chips-Bsc-gUxE.css.br +0 -0
- codex/static_root/assets/relation-chips-Bsc-gUxE.css.gz +0 -0
- codex/static_root/assets/relation-chips-C9ysW0tU.670f1d1f273f.js +0 -1
- codex/static_root/assets/relation-chips-C9ysW0tU.670f1d1f273f.js.br +0 -0
- codex/static_root/assets/relation-chips-C9ysW0tU.670f1d1f273f.js.gz +0 -0
- codex/static_root/assets/relation-chips-C9ysW0tU.js +0 -1
- codex/static_root/assets/relation-chips-C9ysW0tU.js.br +0 -0
- codex/static_root/assets/relation-chips-C9ysW0tU.js.gz +0 -0
- codex/static_root/assets/settings-drawer-C0ofzAhW.c0def8f383cb.js +0 -2
- codex/static_root/assets/settings-drawer-C0ofzAhW.c0def8f383cb.js.br +0 -0
- codex/static_root/assets/settings-drawer-C0ofzAhW.c0def8f383cb.js.gz +0 -0
- codex/static_root/assets/settings-drawer-C0ofzAhW.js +0 -2
- codex/static_root/assets/settings-drawer-C0ofzAhW.js.br +0 -0
- codex/static_root/assets/settings-drawer-C0ofzAhW.js.gz +0 -0
- codex/static_root/assets/settings-drawer-nZ9HvKSZ.01744e131806.css +0 -1
- codex/static_root/assets/settings-drawer-nZ9HvKSZ.01744e131806.css.br +0 -0
- codex/static_root/assets/settings-drawer-nZ9HvKSZ.01744e131806.css.gz +0 -0
- codex/static_root/assets/settings-drawer-nZ9HvKSZ.css +0 -1
- codex/static_root/assets/settings-drawer-nZ9HvKSZ.css.br +0 -0
- codex/static_root/assets/settings-drawer-nZ9HvKSZ.css.gz +0 -0
- codex/static_root/assets/stats-tab-B4yKuY0c.a5728396494b.css +0 -1
- codex/static_root/assets/stats-tab-B4yKuY0c.a5728396494b.css.br +0 -0
- codex/static_root/assets/stats-tab-B4yKuY0c.a5728396494b.css.gz +0 -0
- codex/static_root/assets/stats-tab-B4yKuY0c.css +0 -1
- codex/static_root/assets/stats-tab-B4yKuY0c.css.br +0 -0
- codex/static_root/assets/stats-tab-B4yKuY0c.css.gz +0 -0
- codex/static_root/assets/stats-tab-BqJj7j1w.38a3459d61ea.js +0 -1
- codex/static_root/assets/stats-tab-BqJj7j1w.38a3459d61ea.js.br +0 -0
- codex/static_root/assets/stats-tab-BqJj7j1w.38a3459d61ea.js.gz +0 -0
- codex/static_root/assets/stats-tab-BqJj7j1w.js +0 -1
- codex/static_root/assets/stats-tab-BqJj7j1w.js.br +0 -0
- codex/static_root/assets/stats-tab-BqJj7j1w.js.gz +0 -0
- codex/static_root/assets/task-tab-BsPzNk8S.e00630a60b43.js +0 -1
- codex/static_root/assets/task-tab-BsPzNk8S.e00630a60b43.js.br +0 -0
- codex/static_root/assets/task-tab-BsPzNk8S.e00630a60b43.js.gz +0 -0
- codex/static_root/assets/task-tab-BsPzNk8S.js +0 -1
- codex/static_root/assets/task-tab-BsPzNk8S.js.br +0 -0
- codex/static_root/assets/task-tab-BsPzNk8S.js.gz +0 -0
- codex/static_root/assets/to-case-KvqtSug2.9c02da2e47c7.js +0 -1
- codex/static_root/assets/to-case-KvqtSug2.9c02da2e47c7.js.br +0 -0
- codex/static_root/assets/to-case-KvqtSug2.js +0 -1
- codex/static_root/assets/to-case-KvqtSug2.js.br +0 -0
- codex/static_root/assets/unauthorized-CibJYD8o.4c2de98c2b53.css.br +0 -0
- codex/static_root/assets/unauthorized-CibJYD8o.4c2de98c2b53.css.gz +0 -0
- codex/static_root/assets/unauthorized-CibJYD8o.css.br +0 -0
- codex/static_root/assets/unauthorized-CibJYD8o.css.gz +0 -0
- codex/static_root/assets/unauthorized-DwSdNzX2.f418e69f3afe.js +0 -1
- codex/static_root/assets/unauthorized-DwSdNzX2.f418e69f3afe.js.br +0 -0
- codex/static_root/assets/unauthorized-DwSdNzX2.f418e69f3afe.js.gz +0 -0
- codex/static_root/assets/unauthorized-DwSdNzX2.js +0 -1
- codex/static_root/assets/unauthorized-DwSdNzX2.js.br +0 -0
- codex/static_root/assets/unauthorized-DwSdNzX2.js.gz +0 -0
- codex/static_root/assets/user-tab-DrJOb9Ys.083d993726d8.js +0 -1
- codex/static_root/assets/user-tab-DrJOb9Ys.083d993726d8.js.br +0 -0
- codex/static_root/assets/user-tab-DrJOb9Ys.083d993726d8.js.gz +0 -0
- codex/static_root/assets/user-tab-DrJOb9Ys.js +0 -1
- codex/static_root/assets/user-tab-DrJOb9Ys.js.br +0 -0
- codex/static_root/assets/user-tab-DrJOb9Ys.js.gz +0 -0
- codex/static_root/js/choices-admin.3521e2a863df.json +0 -1
- codex/static_root/js/choices-admin.3521e2a863df.json.br +0 -0
- codex/static_root/js/choices-admin.3521e2a863df.json.gz +0 -0
- codex/static_root/js/choices.2f6b0359e1ef.json +0 -1
- codex/static_root/js/choices.2f6b0359e1ef.json.br +0 -0
- codex/static_root/js/choices.2f6b0359e1ef.json.gz +0 -0
- codex/static_root/manifest.1c84116d9a0a.json +0 -622
- codex/static_root/manifest.1c84116d9a0a.json.br +0 -0
- codex/static_root/manifest.1c84116d9a0a.json.gz +0 -0
- codex/util.py +0 -12
- codex/views/admin/auth.py +0 -28
- codex/views/browser/breadcrumbs.py +0 -202
- codex/views/browser/cover.py +0 -165
- codex/views/browser/mtime.py +0 -61
- codex/views/browser/order_by.py +0 -65
- codex/views/browser/paginate.py +0 -106
- codex/views/browser/settings.py +0 -66
- codex/views/browser/title.py +0 -48
- codex/views/browser/validate.py +0 -161
- codex/views/opds/auth.py +0 -17
- codex/views/public.py +0 -36
- codex/views/reader/arcs.py +0 -92
- codex/views/reader/books.py +0 -181
- codex/views/reader/init.py +0 -125
- codex/views/settings.py +0 -47
- codex/views/util.py +0 -77
- {codex-1.6.0.dist-info → codex-1.6.0a0.dist-info}/LICENSE +0 -0
- {codex-1.6.0.dist-info → codex-1.6.0a0.dist-info}/WHEEL +0 -0
- {codex-1.6.0.dist-info → codex-1.6.0a0.dist-info}/entry_points.txt +0 -0
|
@@ -9,58 +9,57 @@ from rest_framework.response import Response
|
|
|
9
9
|
|
|
10
10
|
from codex.serializers.opds.authentication import OPDSAuthentication1Serializer
|
|
11
11
|
|
|
12
|
-
_LOGO_SIZE = 512
|
|
13
|
-
_DOC = MappingProxyType(
|
|
14
|
-
{
|
|
15
|
-
"id": reverse_lazy("opds:authentication:v1"),
|
|
16
|
-
"title": "Codex",
|
|
17
|
-
"description": "Codex OPDS Syndication",
|
|
18
|
-
"links": [
|
|
19
|
-
{
|
|
20
|
-
"rel": "logo",
|
|
21
|
-
"href": staticfiles_storage.url("img/logo.svg"),
|
|
22
|
-
"type": "image/svg+xml",
|
|
23
|
-
"width": _LOGO_SIZE,
|
|
24
|
-
"height": _LOGO_SIZE,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"rel": "help",
|
|
28
|
-
"href": "https://github.com/ajslater/codex",
|
|
29
|
-
"type": "text/html",
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"rel": "register",
|
|
33
|
-
"href": reverse_lazy("app:start"),
|
|
34
|
-
"type": "text/html",
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
"authentication": [
|
|
38
|
-
{
|
|
39
|
-
"type": "http://opds-spec.org/auth/basic",
|
|
40
|
-
"labels": {"login": "Username", "password": "Password"},
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
# XXX Out of spec type
|
|
44
|
-
"type": "cookie",
|
|
45
|
-
"links": [
|
|
46
|
-
{
|
|
47
|
-
"rel": "authenticate",
|
|
48
|
-
"href": reverse_lazy("app:start"),
|
|
49
|
-
"type": "text/html",
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
}
|
|
55
|
-
)
|
|
56
|
-
|
|
57
12
|
|
|
58
13
|
class OPDSAuthentication1View(GenericAPIView):
|
|
59
14
|
"""Authentication document."""
|
|
60
15
|
|
|
61
16
|
serializer_class = OPDSAuthentication1Serializer
|
|
62
17
|
|
|
18
|
+
DOC = MappingProxyType(
|
|
19
|
+
{
|
|
20
|
+
"id": reverse_lazy("opds:authentication:v1"),
|
|
21
|
+
"title": "Codex",
|
|
22
|
+
"description": "Codex OPDS Syndication",
|
|
23
|
+
"links": [
|
|
24
|
+
{
|
|
25
|
+
"rel": "logo",
|
|
26
|
+
"href": staticfiles_storage.url("img/logo.svg"),
|
|
27
|
+
"type": "image/svg+xml",
|
|
28
|
+
"width": 512,
|
|
29
|
+
"height": 512,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"rel": "help",
|
|
33
|
+
"href": "https://github.com/ajslater/codex",
|
|
34
|
+
"type": "text/html",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"rel": "register",
|
|
38
|
+
"href": reverse_lazy("app:start"),
|
|
39
|
+
"type": "text/html",
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
"authentication": [
|
|
43
|
+
{
|
|
44
|
+
"type": "http://opds-spec.org/auth/basic",
|
|
45
|
+
"labels": {"login": "Username", "password": "Password"},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
# XXX Out of spec type
|
|
49
|
+
"type": "cookie",
|
|
50
|
+
"links": [
|
|
51
|
+
{
|
|
52
|
+
"rel": "authenticate",
|
|
53
|
+
"href": reverse_lazy("app:start"),
|
|
54
|
+
"type": "text/html",
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
|
|
63
62
|
def get(self, *args, **kwargs):
|
|
64
63
|
"""Fill in the authentication dict."""
|
|
65
|
-
serializer = self.get_serializer(
|
|
64
|
+
serializer = self.get_serializer(self.DOC)
|
|
66
65
|
return Response(serializer.data)
|
codex/views/opds/binary.py
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
"""Binary views with Basic Authentication added."""
|
|
2
2
|
|
|
3
|
-
from
|
|
3
|
+
from rest_framework.authentication import BasicAuthentication, SessionAuthentication
|
|
4
|
+
|
|
5
|
+
from codex.views.cover import CoverView
|
|
4
6
|
from codex.views.download import DownloadView
|
|
5
|
-
from codex.views.opds.auth import OPDSAuthMixin
|
|
6
7
|
from codex.views.reader.page import ReaderPageView
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
class
|
|
10
|
-
"""
|
|
10
|
+
class OPDSAuthMixin:
|
|
11
|
+
"""Add Basic Auth."""
|
|
12
|
+
|
|
13
|
+
authentication_classes = (BasicAuthentication, SessionAuthentication)
|
|
11
14
|
|
|
12
|
-
|
|
15
|
+
|
|
16
|
+
class OPDSCoverView(OPDSAuthMixin, CoverView):
|
|
17
|
+
"""Cover View with Basic Auth."""
|
|
13
18
|
|
|
14
19
|
|
|
15
20
|
class OPDSDownloadView(OPDSAuthMixin, DownloadView):
|
codex/views/opds/const.py
CHANGED
|
@@ -3,16 +3,6 @@
|
|
|
3
3
|
from collections.abc import Mapping
|
|
4
4
|
from types import MappingProxyType
|
|
5
5
|
|
|
6
|
-
from codex.models import (
|
|
7
|
-
Character,
|
|
8
|
-
Genre,
|
|
9
|
-
Location,
|
|
10
|
-
SeriesGroup,
|
|
11
|
-
StoryArc,
|
|
12
|
-
Tag,
|
|
13
|
-
Team,
|
|
14
|
-
)
|
|
15
|
-
|
|
16
6
|
BLANK_TITLE = "Unknown"
|
|
17
7
|
AUTHOR_ROLES = {"Writer"}
|
|
18
8
|
|
|
@@ -81,6 +71,3 @@ class MimeType:
|
|
|
81
71
|
}
|
|
82
72
|
)
|
|
83
73
|
OCTET = "application/octet-stream"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
OPDS_M2M_MODELS = (Character, Genre, Location, SeriesGroup, StoryArc, Tag, Team)
|
codex/views/opds/urls.py
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"""OPDS URLs."""
|
|
2
2
|
|
|
3
3
|
from django.urls import reverse
|
|
4
|
+
from rest_framework.generics import GenericAPIView
|
|
4
5
|
from rest_framework.response import Response
|
|
5
6
|
|
|
6
7
|
from codex.serializers.choices import DEFAULTS
|
|
7
8
|
from codex.serializers.opds.urls import OPDSURLsSerializer
|
|
8
|
-
from codex.views.auth import AuthGenericAPIView
|
|
9
|
-
from codex.views.util import pop_name
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
OPDS_VERSIONS = (1, 2)
|
|
12
11
|
|
|
13
12
|
|
|
14
|
-
class OPDSURLsView(
|
|
13
|
+
class OPDSURLsView(GenericAPIView):
|
|
15
14
|
"""OPDS URLs."""
|
|
16
15
|
|
|
17
16
|
serializer_class = OPDSURLsSerializer
|
|
@@ -20,8 +19,7 @@ class OPDSURLsView(AuthGenericAPIView):
|
|
|
20
19
|
"""Resolve the urls."""
|
|
21
20
|
obj = {}
|
|
22
21
|
route = DEFAULTS["breadcrumbs"][0]
|
|
23
|
-
|
|
24
|
-
for version in _OPDS_VERSIONS:
|
|
22
|
+
for version in OPDS_VERSIONS:
|
|
25
23
|
key = f"v{version}"
|
|
26
24
|
name = f"opds:v{version}:feed"
|
|
27
25
|
value = reverse(name, kwargs=route)
|
codex/views/opds/util.py
CHANGED
|
@@ -6,12 +6,19 @@ from django.urls import reverse
|
|
|
6
6
|
from django.utils.http import urlencode
|
|
7
7
|
|
|
8
8
|
from codex.models import (
|
|
9
|
+
Character,
|
|
9
10
|
Contributor,
|
|
10
11
|
ContributorPerson,
|
|
12
|
+
Genre,
|
|
13
|
+
Location,
|
|
14
|
+
SeriesGroup,
|
|
15
|
+
StoryArc,
|
|
16
|
+
Tag,
|
|
17
|
+
Team,
|
|
11
18
|
)
|
|
12
19
|
from codex.serializers.choices import DEFAULTS
|
|
13
|
-
|
|
14
|
-
|
|
20
|
+
|
|
21
|
+
OPDS_M2M_MODELS = (Character, Genre, Location, SeriesGroup, StoryArc, Tag, Team)
|
|
15
22
|
|
|
16
23
|
|
|
17
24
|
def update_href_query_params(href, old_query_params, new_query_params=None):
|
|
@@ -58,7 +65,9 @@ def get_m2m_objects(pks) -> dict:
|
|
|
58
65
|
cats = {}
|
|
59
66
|
for model in OPDS_M2M_MODELS:
|
|
60
67
|
table = model.__name__.lower()
|
|
61
|
-
rel =
|
|
68
|
+
rel = "comic"
|
|
69
|
+
if model == StoryArc:
|
|
70
|
+
rel = "storyarcnumber__" + rel
|
|
62
71
|
comic_filter = {rel + "__in": pks}
|
|
63
72
|
qs = model.objects.filter(**comic_filter).order_by("name").only("name")
|
|
64
73
|
cats[table] = qs
|
|
@@ -72,7 +81,6 @@ def full_redirect_view(url_name):
|
|
|
72
81
|
def func(request):
|
|
73
82
|
"""Redirect to view, forwarding query strings and auth."""
|
|
74
83
|
kwargs = DEFAULTS["breadcrumbs"][0]
|
|
75
|
-
kwargs.pop("name", None)
|
|
76
84
|
url = reverse(url_name, kwargs=kwargs)
|
|
77
85
|
|
|
78
86
|
# Forward the query string.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"""OPDS v1 Entry Links Methods."""
|
|
2
2
|
|
|
3
|
-
from datetime import datetime
|
|
4
|
-
from math import floor
|
|
5
3
|
from urllib.parse import quote_plus
|
|
6
4
|
|
|
5
|
+
from django.contrib.staticfiles.storage import staticfiles_storage
|
|
7
6
|
from django.urls import reverse
|
|
8
7
|
|
|
9
8
|
from codex.logger.logging import get_logger
|
|
9
|
+
from codex.views.const import MISSING_COVER_FN, MISSING_COVER_NAME_MAP
|
|
10
10
|
from codex.views.opds.const import MimeType, Rel
|
|
11
11
|
from codex.views.opds.util import update_href_query_params
|
|
12
12
|
from codex.views.opds.v1.data import OPDS1Link
|
|
@@ -31,24 +31,39 @@ class OPDS1EntryLinksMixin:
|
|
|
31
31
|
self.mime_type_map = data.mime_type_map
|
|
32
32
|
self.title_filename_fallback = title_filename_fallback
|
|
33
33
|
|
|
34
|
-
def
|
|
34
|
+
def _thumb_link(self):
|
|
35
35
|
if self.fake:
|
|
36
36
|
return None
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
kwargs = {"
|
|
40
|
-
ts = floor(datetime.timestamp(self.obj.updated_at))
|
|
41
|
-
query_params = {
|
|
42
|
-
"customCovers": True,
|
|
43
|
-
"dynamicCovers": False,
|
|
44
|
-
"ts": ts,
|
|
45
|
-
}
|
|
37
|
+
cover_pk = getattr(self.obj, "cover_pk", None)
|
|
38
|
+
if cover_pk:
|
|
39
|
+
kwargs = {"pk": cover_pk}
|
|
46
40
|
href = reverse("opds:bin:cover", kwargs=kwargs)
|
|
47
|
-
href = update_href_query_params(href, query_params)
|
|
48
41
|
mime_type = "image/webp"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
42
|
+
else:
|
|
43
|
+
cover_name = MISSING_COVER_NAME_MAP.get(self.obj.group)
|
|
44
|
+
cover_path = "img/"
|
|
45
|
+
if cover_name:
|
|
46
|
+
cover_path += cover_name + ".svg"
|
|
47
|
+
mime_type = "image/svg+xml"
|
|
48
|
+
else:
|
|
49
|
+
cover_path += MISSING_COVER_FN
|
|
50
|
+
mime_type = "image/webp"
|
|
51
|
+
href = staticfiles_storage.url(cover_path)
|
|
52
|
+
return OPDS1Link(Rel.THUMBNAIL, href, mime_type)
|
|
53
|
+
|
|
54
|
+
def _image_link(self):
|
|
55
|
+
if self.fake:
|
|
56
|
+
return None
|
|
57
|
+
cover_pk = getattr(self.obj, "cover_pk", None)
|
|
58
|
+
if cover_pk:
|
|
59
|
+
kwargs = {"pk": cover_pk, "page": 0}
|
|
60
|
+
href = reverse("opds:bin:page", kwargs=kwargs)
|
|
61
|
+
mime_type = "image/jpeg"
|
|
62
|
+
else:
|
|
63
|
+
fn = f"img/{MISSING_COVER_FN}"
|
|
64
|
+
href = staticfiles_storage.url(fn)
|
|
65
|
+
mime_type = "image/webp"
|
|
66
|
+
return OPDS1Link(Rel.IMAGE, href, mime_type)
|
|
52
67
|
|
|
53
68
|
def _nav_href(self, metadata=False):
|
|
54
69
|
try:
|
|
@@ -134,9 +149,9 @@ class OPDS1EntryLinksMixin:
|
|
|
134
149
|
"""Create all entry links."""
|
|
135
150
|
result = []
|
|
136
151
|
try:
|
|
137
|
-
if thumb := self.
|
|
152
|
+
if thumb := self._thumb_link():
|
|
138
153
|
result += [thumb]
|
|
139
|
-
if image := self.
|
|
154
|
+
if image := self._image_link():
|
|
140
155
|
result += [image]
|
|
141
156
|
|
|
142
157
|
if self.obj.group == "c" and not self.fake:
|
codex/views/opds/v1/facets.py
CHANGED
|
@@ -12,7 +12,6 @@ from codex.views.opds.util import update_href_query_params
|
|
|
12
12
|
from codex.views.opds.v1.data import OPDS1Link
|
|
13
13
|
from codex.views.opds.v1.entry.data import OPDS1EntryData, OPDS1EntryObject
|
|
14
14
|
from codex.views.opds.v1.entry.entry import OPDS1Entry
|
|
15
|
-
from codex.views.util import pop_name
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
@dataclass
|
|
@@ -78,7 +77,7 @@ DEFAULT_FACETS = {
|
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
|
|
81
|
-
class
|
|
80
|
+
class FacetsMixin(BrowserView):
|
|
82
81
|
"""OPDS 1 Facets methods."""
|
|
83
82
|
|
|
84
83
|
OPDS = 1
|
|
@@ -90,14 +89,15 @@ class OPDS1FacetsView(BrowserView):
|
|
|
90
89
|
obj = MappingProxyType({})
|
|
91
90
|
|
|
92
91
|
def _facet(self, kwargs, facet_group, facet_title, new_query_params):
|
|
93
|
-
kwargs = pop_name(kwargs)
|
|
94
92
|
href = reverse("opds:v1:feed", kwargs=kwargs)
|
|
95
93
|
facet_active = False
|
|
96
94
|
for key, val in new_query_params.items():
|
|
97
|
-
if self.request.
|
|
95
|
+
if self.request.query_params.get(key) == val:
|
|
98
96
|
facet_active = True
|
|
99
97
|
break
|
|
100
|
-
href = update_href_query_params(
|
|
98
|
+
href = update_href_query_params(
|
|
99
|
+
href, self.request.query_params, new_query_params
|
|
100
|
+
)
|
|
101
101
|
|
|
102
102
|
title = " ".join(filter(None, (facet_group.title_prefix, facet_title))).strip()
|
|
103
103
|
return OPDS1Link(
|
|
@@ -118,7 +118,7 @@ class OPDS1FacetsView(BrowserView):
|
|
|
118
118
|
ids=item.get("pks"),
|
|
119
119
|
name=name,
|
|
120
120
|
)
|
|
121
|
-
qps = {**self.request.
|
|
121
|
+
qps = {**self.request.query_params}
|
|
122
122
|
qps.update(query_params)
|
|
123
123
|
zero_pad = self.obj["zero_pad"]
|
|
124
124
|
data = OPDS1EntryData(
|
|
@@ -131,7 +131,7 @@ class OPDS1FacetsView(BrowserView):
|
|
|
131
131
|
default_val = DEFAULT_FACETS.get(facet_group.query_param)
|
|
132
132
|
if facet.value == default_val:
|
|
133
133
|
compare += [None]
|
|
134
|
-
return self.request.
|
|
134
|
+
return self.request.query_params.get(facet_group.query_param) in compare
|
|
135
135
|
|
|
136
136
|
@staticmethod
|
|
137
137
|
def _did_special_group_change(group, facet_group):
|
codex/views/opds/v1/feed.py
CHANGED
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
"""OPDS v1 feed."""
|
|
2
2
|
|
|
3
|
+
from datetime import datetime, timezone
|
|
3
4
|
from types import MappingProxyType
|
|
4
5
|
from typing import TYPE_CHECKING, Any
|
|
5
6
|
|
|
6
7
|
from comicbox.box import Comicbox
|
|
7
8
|
from drf_spectacular.utils import extend_schema
|
|
9
|
+
from rest_framework.authentication import BasicAuthentication, SessionAuthentication
|
|
8
10
|
from rest_framework.response import Response
|
|
9
11
|
from rest_framework.throttling import ScopedRateThrottle
|
|
10
12
|
|
|
11
13
|
from codex.librarian.importer.tasks import LazyImportComicsTask
|
|
12
14
|
from codex.librarian.mp_queue import LIBRARIAN_QUEUE
|
|
13
15
|
from codex.logger.logging import get_logger
|
|
14
|
-
from codex.serializers.browser.settings import OPDSSettingsSerializer
|
|
15
16
|
from codex.serializers.opds.v1 import (
|
|
16
17
|
OPDS1TemplateSerializer,
|
|
17
18
|
)
|
|
18
|
-
from codex.views.
|
|
19
|
-
from codex.views.
|
|
19
|
+
from codex.views.browser.browser import BrowserView
|
|
20
|
+
from codex.views.browser.const import MAX_OBJ_PER_PAGE
|
|
21
|
+
from codex.views.const import FALSY
|
|
20
22
|
from codex.views.opds.const import BLANK_TITLE, MimeType
|
|
21
23
|
from codex.views.opds.v1.entry.data import OPDS1EntryData
|
|
22
24
|
from codex.views.opds.v1.entry.entry import OPDS1Entry
|
|
23
25
|
from codex.views.opds.v1.links import (
|
|
24
|
-
|
|
26
|
+
LinksMixin,
|
|
25
27
|
RootTopLinks,
|
|
26
28
|
TopLinks,
|
|
27
29
|
)
|
|
30
|
+
from codex.views.template import CodexXMLTemplateView
|
|
28
31
|
|
|
29
32
|
if TYPE_CHECKING:
|
|
30
33
|
from collections.abc import Mapping
|
|
@@ -41,22 +44,22 @@ class OpdsNs:
|
|
|
41
44
|
ACQUISITION = "http://opds-spec.org/2010/acquisition"
|
|
42
45
|
|
|
43
46
|
|
|
44
|
-
class
|
|
47
|
+
class UserAgentPrefixes:
|
|
45
48
|
"""Control whether to hack in facets with nav links."""
|
|
46
49
|
|
|
47
|
-
CLIENT_REORDERS =
|
|
48
|
-
FACET_SUPPORT =
|
|
49
|
-
SIMPLE_DOWNLOAD_MIME_TYPES =
|
|
50
|
-
# Other known valid
|
|
50
|
+
CLIENT_REORDERS = ("Chunky",)
|
|
51
|
+
FACET_SUPPORT = ("yar",) # kybooks
|
|
52
|
+
SIMPLE_DOWNLOAD_MIME_TYPES = ("PocketBook",)
|
|
53
|
+
# Other known valid prefixes:
|
|
51
54
|
# "Panels", "Chunky"
|
|
52
55
|
|
|
53
56
|
|
|
54
|
-
class OPDS1FeedView(
|
|
57
|
+
class OPDS1FeedView(CodexXMLTemplateView, LinksMixin):
|
|
55
58
|
"""OPDS 1 Feed."""
|
|
56
59
|
|
|
60
|
+
authentication_classes = (SessionAuthentication, BasicAuthentication)
|
|
57
61
|
template_name = "opds_v1/index.xml"
|
|
58
62
|
serializer_class = OPDS1TemplateSerializer
|
|
59
|
-
input_serializer_class = OPDSSettingsSerializer
|
|
60
63
|
throttle_classes = (ScopedRateThrottle,)
|
|
61
64
|
throttle_scope = "opds"
|
|
62
65
|
TARGET = "opds1"
|
|
@@ -87,7 +90,7 @@ class OPDS1FeedView(OPDS1LinksView, OPDSTemplateView):
|
|
|
87
90
|
"""Create the feed title."""
|
|
88
91
|
result = ""
|
|
89
92
|
try:
|
|
90
|
-
browser_title: Mapping[str, Any] = self.obj.get("
|
|
93
|
+
browser_title: Mapping[str, Any] = self.obj.get("browser_title") # type: ignore
|
|
91
94
|
if browser_title:
|
|
92
95
|
parent_name = browser_title.get("parent_name", "All")
|
|
93
96
|
pks = self.kwargs["pks"]
|
|
@@ -104,9 +107,10 @@ class OPDS1FeedView(OPDS1LinksView, OPDSTemplateView):
|
|
|
104
107
|
|
|
105
108
|
@property
|
|
106
109
|
def updated(self):
|
|
107
|
-
"""
|
|
110
|
+
"""Hack in feed update time from cover timestamp."""
|
|
108
111
|
try:
|
|
109
|
-
|
|
112
|
+
if ts := self.obj.get("covers_timestamp"):
|
|
113
|
+
return datetime.fromtimestamp(ts, tz=timezone.utc) # type: ignore
|
|
110
114
|
except Exception:
|
|
111
115
|
LOG.exception("Getting OPDS v1 updated")
|
|
112
116
|
|
|
@@ -141,7 +145,7 @@ class OPDS1FeedView(OPDS1LinksView, OPDSTemplateView):
|
|
|
141
145
|
entries += [
|
|
142
146
|
OPDS1Entry(
|
|
143
147
|
obj,
|
|
144
|
-
self.request.
|
|
148
|
+
self.request.query_params,
|
|
145
149
|
data,
|
|
146
150
|
title_filename_fallback=fallback,
|
|
147
151
|
)
|
|
@@ -161,7 +165,9 @@ class OPDS1FeedView(OPDS1LinksView, OPDSTemplateView):
|
|
|
161
165
|
entries += self.facets(entries=True, root=at_root)
|
|
162
166
|
|
|
163
167
|
entries += self._get_entries_section("groups", False)
|
|
164
|
-
metadata =
|
|
168
|
+
metadata = (
|
|
169
|
+
self.request.query_params.get("opdsMetadata", "").lower() not in FALSY
|
|
170
|
+
)
|
|
165
171
|
entries += self._get_entries_section("books", metadata)
|
|
166
172
|
except Exception:
|
|
167
173
|
LOG.exception("Getting OPDS v1 entries")
|
|
@@ -169,17 +175,14 @@ class OPDS1FeedView(OPDS1LinksView, OPDSTemplateView):
|
|
|
169
175
|
|
|
170
176
|
def _ensure_page_counts(self):
|
|
171
177
|
"""Ensure page counts on books with just in time comicbox."""
|
|
172
|
-
if self.admin_flags.get("import_metadata"):
|
|
173
|
-
return
|
|
174
178
|
books_qs: QuerySet = self.obj["books"] # type: ignore
|
|
175
179
|
import_pks = set()
|
|
176
180
|
new_books = []
|
|
177
181
|
for book in books_qs:
|
|
178
|
-
if book.page_count
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
book.page_count = cb.get_page_count()
|
|
182
|
+
if not book.page_count:
|
|
183
|
+
with Comicbox(book.path) as cb:
|
|
184
|
+
book.file_type = cb.get_file_type()
|
|
185
|
+
book.page_count = cb.get_page_count()
|
|
183
186
|
new_books.append(book)
|
|
184
187
|
import_pks.add(book.pk)
|
|
185
188
|
if new_books:
|
|
@@ -191,24 +194,7 @@ class OPDS1FeedView(OPDS1LinksView, OPDSTemplateView):
|
|
|
191
194
|
|
|
192
195
|
def get_object(self): # type: ignore
|
|
193
196
|
"""Get the browser page and serialize it for this subclass."""
|
|
194
|
-
|
|
195
|
-
super()._get_group_and_books()
|
|
196
|
-
)
|
|
197
|
-
book_qs = book_qs.select_related("series", "volume", "language")
|
|
198
|
-
|
|
199
|
-
title = self.get_browser_page_title()
|
|
200
|
-
self.obj = MappingProxyType(
|
|
201
|
-
{
|
|
202
|
-
"title": title,
|
|
203
|
-
"groups": group_qs,
|
|
204
|
-
"books": book_qs,
|
|
205
|
-
"zero_pad": zero_pad,
|
|
206
|
-
"num_pages": num_pages,
|
|
207
|
-
"total_count": total_count,
|
|
208
|
-
"mtime": mtime,
|
|
209
|
-
}
|
|
210
|
-
)
|
|
211
|
-
|
|
197
|
+
self.obj = super().get_object()
|
|
212
198
|
self.is_aq_feed = self.model_group in ("c", "f")
|
|
213
199
|
|
|
214
200
|
self._ensure_page_counts()
|
|
@@ -218,21 +204,22 @@ class OPDS1FeedView(OPDS1LinksView, OPDSTemplateView):
|
|
|
218
204
|
|
|
219
205
|
def _set_user_agent_variables(self):
|
|
220
206
|
"""Set User Agent variables."""
|
|
207
|
+
# defaults in FacetsMixin
|
|
221
208
|
user_agent = self.request.headers.get("User-Agent")
|
|
222
209
|
if not user_agent:
|
|
223
210
|
return
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
211
|
+
for prefix in UserAgentPrefixes.FACET_SUPPORT:
|
|
212
|
+
if user_agent.startswith(prefix):
|
|
213
|
+
self.use_facets = True
|
|
214
|
+
break
|
|
215
|
+
for prefix in UserAgentPrefixes.CLIENT_REORDERS:
|
|
216
|
+
if user_agent.startswith(prefix):
|
|
217
|
+
self.skip_order_facets = True
|
|
218
|
+
break
|
|
219
|
+
for prefix in UserAgentPrefixes.SIMPLE_DOWNLOAD_MIME_TYPES:
|
|
220
|
+
if user_agent.startswith(prefix):
|
|
221
|
+
self.mime_type_map = MimeType.SIMPLE_FILE_TYPE_MAP
|
|
222
|
+
break
|
|
236
223
|
|
|
237
224
|
def set_opds_request_type(self):
|
|
238
225
|
"""Set the opds request type variables."""
|
|
@@ -245,7 +232,7 @@ class OPDS1FeedView(OPDS1LinksView, OPDSTemplateView):
|
|
|
245
232
|
self.acquisition_groups = frozenset({*self.valid_nav_groups[-2:]} | {"c"})
|
|
246
233
|
self.is_opds_1_acquisition = group in self.acquisition_groups
|
|
247
234
|
self.is_opds_metadata = (
|
|
248
|
-
self.request.
|
|
235
|
+
self.request.query_params.get("opdsMetadata", "").lower() not in FALSY
|
|
249
236
|
)
|
|
250
237
|
|
|
251
238
|
def init_request(self):
|
|
@@ -255,7 +242,10 @@ class OPDS1FeedView(OPDS1LinksView, OPDSTemplateView):
|
|
|
255
242
|
self._set_user_agent_variables()
|
|
256
243
|
self.skip_order_facets |= self.kwargs.get("group") == "c"
|
|
257
244
|
|
|
258
|
-
@extend_schema(
|
|
245
|
+
@extend_schema(
|
|
246
|
+
request=BrowserView.input_serializer_class,
|
|
247
|
+
parameters=[BrowserView.input_serializer_class],
|
|
248
|
+
)
|
|
259
249
|
def get(self, *_args, **_kwargs):
|
|
260
250
|
"""Get the feed."""
|
|
261
251
|
self.init_request()
|
codex/views/opds/v1/links.py
CHANGED
|
@@ -14,8 +14,7 @@ from codex.views.opds.util import update_href_query_params
|
|
|
14
14
|
from codex.views.opds.v1.data import OPDS1Link
|
|
15
15
|
from codex.views.opds.v1.entry.data import OPDS1EntryData, OPDS1EntryObject
|
|
16
16
|
from codex.views.opds.v1.entry.entry import OPDS1Entry
|
|
17
|
-
from codex.views.opds.v1.facets import
|
|
18
|
-
from codex.views.util import pop_name
|
|
17
|
+
from codex.views.opds.v1.facets import FacetsMixin
|
|
19
18
|
|
|
20
19
|
LOG = get_logger(__name__)
|
|
21
20
|
|
|
@@ -102,13 +101,13 @@ class RootTopLinks:
|
|
|
102
101
|
ALL = (NEW, FEATURED, LAST_READ)
|
|
103
102
|
|
|
104
103
|
|
|
105
|
-
class
|
|
104
|
+
class LinksMixin(FacetsMixin):
|
|
106
105
|
"""OPDS 1 Links methods."""
|
|
107
106
|
|
|
108
107
|
# overwritten in get_object()
|
|
109
108
|
DEFAULT_ROUTE = MappingProxyType(
|
|
110
109
|
{
|
|
111
|
-
**
|
|
110
|
+
**FacetsMixin.DEFAULT_ROUTE,
|
|
112
111
|
"name": "opds:v1:feed",
|
|
113
112
|
}
|
|
114
113
|
)
|
|
@@ -121,7 +120,7 @@ class OPDS1LinksView(OPDS1FacetsView):
|
|
|
121
120
|
return False
|
|
122
121
|
|
|
123
122
|
for key, value in top_link.query_params.items():
|
|
124
|
-
if str(self.request.
|
|
123
|
+
if str(self.request.query_params.get(key)) != str(value):
|
|
125
124
|
return False
|
|
126
125
|
|
|
127
126
|
return True
|
|
@@ -129,8 +128,7 @@ class OPDS1LinksView(OPDS1FacetsView):
|
|
|
129
128
|
def _link(self, kwargs, rel, query_params=None, mime_type=MimeType.NAV):
|
|
130
129
|
"""Create a link."""
|
|
131
130
|
if query_params is None:
|
|
132
|
-
query_params = self.request.
|
|
133
|
-
kwargs = pop_name(kwargs)
|
|
131
|
+
query_params = self.request.query_params
|
|
134
132
|
href = reverse("opds:v1:feed", kwargs=kwargs)
|
|
135
133
|
href = update_href_query_params(href, query_params)
|
|
136
134
|
return OPDS1Link(rel, href, mime_type)
|
|
@@ -2,15 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
from drf_spectacular.types import OpenApiTypes
|
|
4
4
|
from drf_spectacular.utils import extend_schema
|
|
5
|
+
from rest_framework.authentication import BasicAuthentication, SessionAuthentication
|
|
5
6
|
from rest_framework.throttling import ScopedRateThrottle
|
|
6
7
|
|
|
7
|
-
from codex.views.
|
|
8
|
+
from codex.views.auth import IsAuthenticatedOrEnabledNonUsers
|
|
9
|
+
from codex.views.template import CodexXMLTemplateView
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
@extend_schema(responses={("200", "application/xml"): OpenApiTypes.BYTE})
|
|
11
|
-
class OpenSearch1View(
|
|
13
|
+
class OpenSearch1View(CodexXMLTemplateView):
|
|
12
14
|
"""OpenSearchView."""
|
|
13
15
|
|
|
16
|
+
authentication_classes = (SessionAuthentication, BasicAuthentication)
|
|
17
|
+
permission_classes = (IsAuthenticatedOrEnabledNonUsers,)
|
|
14
18
|
template_name = "opds_v1/opensearch_v1.xml"
|
|
15
19
|
content_type = "application/xml"
|
|
16
20
|
throttle_classes = (ScopedRateThrottle,)
|