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.

Files changed (769) hide show
  1. codex/exceptions.py +18 -22
  2. codex/integrity.py +3 -66
  3. codex/librarian/covers/coverd.py +2 -2
  4. codex/librarian/covers/create.py +29 -50
  5. codex/librarian/covers/path.py +6 -8
  6. codex/librarian/covers/purge.py +18 -28
  7. codex/librarian/covers/tasks.py +2 -3
  8. codex/librarian/importer/{aggregate.py → aggregate_metadata.py} +88 -58
  9. codex/librarian/importer/{extract.py → clean_metadata.py} +4 -33
  10. codex/librarian/importer/const.py +13 -46
  11. codex/librarian/importer/create_comics.py +17 -101
  12. codex/librarian/importer/create_fks.py +134 -99
  13. codex/librarian/importer/deleted.py +28 -103
  14. codex/librarian/importer/failed_imports.py +64 -42
  15. codex/librarian/importer/importerd.py +290 -71
  16. codex/librarian/importer/link_comics.py +26 -26
  17. codex/librarian/importer/moved.py +81 -128
  18. codex/librarian/importer/query_fks.py +122 -142
  19. codex/librarian/importer/status.py +39 -8
  20. codex/librarian/importer/tasks.py +9 -26
  21. codex/librarian/importer/update_comics.py +89 -0
  22. codex/librarian/janitor/cleanup.py +2 -26
  23. codex/librarian/janitor/failed_imports.py +1 -1
  24. codex/librarian/janitor/janitor.py +1 -13
  25. codex/librarian/janitor/janitord.py +1 -1
  26. codex/librarian/janitor/status.py +0 -1
  27. codex/librarian/janitor/tasks.py +0 -5
  28. codex/librarian/librariand.py +5 -9
  29. codex/librarian/notifier/notifierd.py +1 -1
  30. codex/librarian/notifier/tasks.py +4 -4
  31. codex/librarian/search/update.py +1 -1
  32. codex/librarian/watchdog/db_snapshot.py +6 -9
  33. codex/librarian/watchdog/emitter.py +0 -3
  34. codex/librarian/watchdog/event_batcherd.py +3 -19
  35. codex/librarian/watchdog/events.py +36 -176
  36. codex/librarian/watchdog/observers.py +3 -13
  37. codex/middleware.py +2 -1
  38. codex/migrations/0027_sort_name.py +149 -0
  39. codex/models/admin.py +2 -0
  40. codex/models/base.py +0 -3
  41. codex/models/comic.py +9 -13
  42. codex/models/{util.py → const.py} +2 -15
  43. codex/models/groups.py +14 -28
  44. codex/models/library.py +3 -11
  45. codex/models/paths.py +14 -61
  46. codex/permissions.py +1 -1
  47. codex/search/backend_search.py +8 -5
  48. codex/search/query.py +2 -25
  49. codex/search/writing.py +1 -1
  50. codex/serializers/admin.py +44 -53
  51. codex/serializers/browser/choices.py +42 -37
  52. codex/serializers/browser/filters.py +131 -32
  53. codex/serializers/browser/metadata.py +1 -45
  54. codex/serializers/browser/mixins.py +4 -37
  55. codex/serializers/browser/page.py +6 -3
  56. codex/serializers/browser/settings.py +11 -42
  57. codex/serializers/choices.py +1 -14
  58. codex/serializers/models/pycountry.py +51 -11
  59. codex/serializers/opds/v2.py +16 -10
  60. codex/serializers/opds/v2_unused.py +3 -5
  61. codex/serializers/reader.py +7 -21
  62. codex/serializers/redirect.py +2 -3
  63. codex/serializers/route.py +7 -16
  64. codex/settings/settings.py +8 -23
  65. codex/startup.py +3 -77
  66. codex/static_root/assets/VCheckbox-Aq_ImMNC.da711f8b6a15.js +1 -0
  67. codex/static_root/assets/VCheckbox-Aq_ImMNC.da711f8b6a15.js.br +0 -0
  68. codex/static_root/assets/VCheckbox-Aq_ImMNC.da711f8b6a15.js.gz +0 -0
  69. codex/static_root/assets/VCheckbox-Aq_ImMNC.js +1 -0
  70. codex/static_root/assets/VCheckbox-Aq_ImMNC.js.br +0 -0
  71. codex/static_root/assets/VCheckbox-Aq_ImMNC.js.gz +0 -0
  72. codex/static_root/assets/{VCheckboxBtn-DxNOKONG.5ab34c4c47aa.js → VCheckboxBtn-D3izCBa7.54f4d7f48bbf.js} +1 -1
  73. codex/static_root/assets/VCheckboxBtn-D3izCBa7.54f4d7f48bbf.js.br +0 -0
  74. codex/static_root/assets/VCheckboxBtn-D3izCBa7.54f4d7f48bbf.js.gz +0 -0
  75. codex/static_root/assets/{VCheckboxBtn-DxNOKONG.js → VCheckboxBtn-D3izCBa7.js} +1 -1
  76. codex/static_root/assets/VCheckboxBtn-D3izCBa7.js.br +0 -0
  77. codex/static_root/assets/VCheckboxBtn-D3izCBa7.js.gz +0 -0
  78. codex/static_root/assets/VCombobox-DLL1EsSN.55622a0cd4ab.js +1 -0
  79. codex/static_root/assets/VCombobox-DLL1EsSN.55622a0cd4ab.js.br +0 -0
  80. codex/static_root/assets/VCombobox-DLL1EsSN.55622a0cd4ab.js.gz +0 -0
  81. codex/static_root/assets/VCombobox-DLL1EsSN.js +1 -0
  82. codex/static_root/assets/VCombobox-DLL1EsSN.js.br +0 -0
  83. codex/static_root/assets/VCombobox-DLL1EsSN.js.gz +0 -0
  84. codex/static_root/assets/{VDialog-lQ13FnRR.1c801ad756b2.css → VDialog-C5Nxd_zP.css} +1 -1
  85. codex/static_root/assets/VDialog-C5Nxd_zP.css.br +0 -0
  86. codex/static_root/assets/VDialog-C5Nxd_zP.css.gz +0 -0
  87. codex/static_root/assets/{VDialog-lQ13FnRR.css → VDialog-C5Nxd_zP.d327f505ef0e.css} +1 -1
  88. codex/static_root/assets/VDialog-C5Nxd_zP.d327f505ef0e.css.br +0 -0
  89. codex/static_root/assets/VDialog-C5Nxd_zP.d327f505ef0e.css.gz +0 -0
  90. codex/static_root/assets/VDialog-yDKzaGEj.e8dba78ac8db.js +1 -0
  91. codex/static_root/assets/VDialog-yDKzaGEj.e8dba78ac8db.js.br +0 -0
  92. codex/static_root/assets/VDialog-yDKzaGEj.e8dba78ac8db.js.gz +0 -0
  93. codex/static_root/assets/VDialog-yDKzaGEj.js +1 -0
  94. codex/static_root/assets/VDialog-yDKzaGEj.js.br +0 -0
  95. codex/static_root/assets/VDialog-yDKzaGEj.js.gz +0 -0
  96. codex/static_root/assets/VExpansionPanels-Cpo8QLLq.d733b7906e00.js +1 -0
  97. codex/static_root/assets/VExpansionPanels-Cpo8QLLq.d733b7906e00.js.br +0 -0
  98. codex/static_root/assets/VExpansionPanels-Cpo8QLLq.d733b7906e00.js.gz +0 -0
  99. codex/static_root/assets/VExpansionPanels-Cpo8QLLq.js +1 -0
  100. codex/static_root/assets/VExpansionPanels-Cpo8QLLq.js.br +0 -0
  101. codex/static_root/assets/VExpansionPanels-Cpo8QLLq.js.gz +0 -0
  102. codex/static_root/assets/VRadioGroup-DEezv8bL.4a609e74e507.js +1 -0
  103. codex/static_root/assets/VRadioGroup-DEezv8bL.4a609e74e507.js.br +0 -0
  104. codex/static_root/assets/VRadioGroup-DEezv8bL.4a609e74e507.js.gz +0 -0
  105. codex/static_root/assets/VRadioGroup-DEezv8bL.js +1 -0
  106. codex/static_root/assets/VRadioGroup-DEezv8bL.js.br +0 -0
  107. codex/static_root/assets/VRadioGroup-DEezv8bL.js.gz +0 -0
  108. codex/static_root/assets/VSelect-BKXcujPy.8871035f5634.js +1 -0
  109. codex/static_root/assets/VSelect-BKXcujPy.8871035f5634.js.br +0 -0
  110. codex/static_root/assets/VSelect-BKXcujPy.8871035f5634.js.gz +0 -0
  111. codex/static_root/assets/VSelect-BKXcujPy.js +1 -0
  112. codex/static_root/assets/VSelect-BKXcujPy.js.br +0 -0
  113. codex/static_root/assets/VSelect-BKXcujPy.js.gz +0 -0
  114. codex/static_root/assets/VSelectionControl-DJAPiluk.402a7ad84a8e.js +1 -0
  115. codex/static_root/assets/VSelectionControl-DJAPiluk.402a7ad84a8e.js.br +0 -0
  116. codex/static_root/assets/VSelectionControl-DJAPiluk.402a7ad84a8e.js.gz +0 -0
  117. codex/static_root/assets/VSelectionControl-DJAPiluk.js +1 -0
  118. codex/static_root/assets/VSelectionControl-DJAPiluk.js.br +0 -0
  119. codex/static_root/assets/VSelectionControl-DJAPiluk.js.gz +0 -0
  120. codex/static_root/assets/VSlideGroup-C-kO93Va.8c9e31362dc5.js +1 -0
  121. codex/static_root/assets/VSlideGroup-C-kO93Va.8c9e31362dc5.js.br +0 -0
  122. codex/static_root/assets/VSlideGroup-C-kO93Va.8c9e31362dc5.js.gz +0 -0
  123. codex/static_root/assets/VSlideGroup-C-kO93Va.js +1 -0
  124. codex/static_root/assets/VSlideGroup-C-kO93Va.js.br +0 -0
  125. codex/static_root/assets/VSlideGroup-C-kO93Va.js.gz +0 -0
  126. codex/static_root/assets/{VTable-2RHFqfg6.f0f2106b158b.js → VTable-9vsIQObs.0a135029e924.js} +1 -1
  127. codex/static_root/assets/VTable-9vsIQObs.0a135029e924.js.br +0 -0
  128. codex/static_root/assets/VTable-9vsIQObs.0a135029e924.js.gz +0 -0
  129. codex/static_root/assets/{VTable-2RHFqfg6.js → VTable-9vsIQObs.js} +1 -1
  130. codex/static_root/assets/VTable-9vsIQObs.js.br +0 -0
  131. codex/static_root/assets/VTable-9vsIQObs.js.gz +0 -0
  132. codex/static_root/assets/VTextField-DI9HAmWh.0de01739bbf9.js +1 -0
  133. codex/static_root/assets/VTextField-DI9HAmWh.0de01739bbf9.js.br +0 -0
  134. codex/static_root/assets/VTextField-DI9HAmWh.0de01739bbf9.js.gz +0 -0
  135. codex/static_root/assets/VTextField-DI9HAmWh.js +1 -0
  136. codex/static_root/assets/VTextField-DI9HAmWh.js.br +0 -0
  137. codex/static_root/assets/VTextField-DI9HAmWh.js.gz +0 -0
  138. codex/static_root/assets/VTextField-DuIIp-VY.580110ad24dc.css +1 -0
  139. codex/static_root/assets/VTextField-DuIIp-VY.580110ad24dc.css.br +0 -0
  140. codex/static_root/assets/VTextField-DuIIp-VY.580110ad24dc.css.gz +0 -0
  141. codex/static_root/assets/VTextField-DuIIp-VY.css +1 -0
  142. codex/static_root/assets/VTextField-DuIIp-VY.css.br +0 -0
  143. codex/static_root/assets/VTextField-DuIIp-VY.css.gz +0 -0
  144. codex/static_root/assets/VWindowItem-DpnYkF3y.017d99c27b7b.js +1 -0
  145. codex/static_root/assets/VWindowItem-DpnYkF3y.017d99c27b7b.js.br +0 -0
  146. codex/static_root/assets/VWindowItem-DpnYkF3y.017d99c27b7b.js.gz +0 -0
  147. codex/static_root/assets/VWindowItem-DpnYkF3y.js +1 -0
  148. codex/static_root/assets/VWindowItem-DpnYkF3y.js.br +0 -0
  149. codex/static_root/assets/VWindowItem-DpnYkF3y.js.gz +0 -0
  150. codex/static_root/assets/admin-2BTkfSQA.e7ef29cb106d.js +1 -0
  151. codex/static_root/assets/admin-2BTkfSQA.e7ef29cb106d.js.br +0 -0
  152. codex/static_root/assets/admin-2BTkfSQA.e7ef29cb106d.js.gz +0 -0
  153. codex/static_root/assets/admin-2BTkfSQA.js +1 -0
  154. codex/static_root/assets/admin-2BTkfSQA.js.br +0 -0
  155. codex/static_root/assets/admin-2BTkfSQA.js.gz +0 -0
  156. codex/static_root/assets/{admin-B8Bp2Uih.82c98714bcf1.css → admin-BbrOU9Y9.29936748af9e.css} +1 -1
  157. codex/static_root/assets/admin-BbrOU9Y9.29936748af9e.css.br +0 -0
  158. codex/static_root/assets/admin-BbrOU9Y9.29936748af9e.css.gz +0 -0
  159. codex/static_root/assets/{admin-B8Bp2Uih.css → admin-BbrOU9Y9.css} +1 -1
  160. codex/static_root/assets/admin-BbrOU9Y9.css.br +0 -0
  161. codex/static_root/assets/admin-BbrOU9Y9.css.gz +0 -0
  162. codex/static_root/assets/admin-drawer-panel-BF0dMvEE.1514926c78e8.css +1 -0
  163. codex/static_root/assets/admin-drawer-panel-BF0dMvEE.1514926c78e8.css.br +0 -0
  164. codex/static_root/assets/admin-drawer-panel-BF0dMvEE.1514926c78e8.css.gz +0 -0
  165. codex/static_root/assets/admin-drawer-panel-BF0dMvEE.css +1 -0
  166. codex/static_root/assets/admin-drawer-panel-BF0dMvEE.css.br +0 -0
  167. codex/static_root/assets/admin-drawer-panel-BF0dMvEE.css.gz +0 -0
  168. codex/static_root/assets/admin-drawer-panel-mtdde7vY.c172dbae9463.js +30 -0
  169. codex/static_root/assets/admin-drawer-panel-mtdde7vY.c172dbae9463.js.br +0 -0
  170. codex/static_root/assets/admin-drawer-panel-mtdde7vY.c172dbae9463.js.gz +0 -0
  171. codex/static_root/assets/admin-drawer-panel-mtdde7vY.js +30 -0
  172. codex/static_root/assets/admin-drawer-panel-mtdde7vY.js.br +0 -0
  173. codex/static_root/assets/admin-drawer-panel-mtdde7vY.js.gz +0 -0
  174. codex/static_root/assets/browser-BA-AwUn-.23bb4b2f6a29.js +1 -0
  175. codex/static_root/assets/browser-BA-AwUn-.23bb4b2f6a29.js.br +0 -0
  176. codex/static_root/assets/browser-BA-AwUn-.23bb4b2f6a29.js.gz +0 -0
  177. codex/static_root/assets/browser-BA-AwUn-.js +1 -0
  178. codex/static_root/assets/browser-BA-AwUn-.js.br +0 -0
  179. codex/static_root/assets/browser-BA-AwUn-.js.gz +0 -0
  180. codex/static_root/assets/browser-CZeVqRNy.ccfca9a05bfe.css +1 -0
  181. codex/static_root/assets/browser-CZeVqRNy.ccfca9a05bfe.css.br +0 -0
  182. codex/static_root/assets/browser-CZeVqRNy.ccfca9a05bfe.css.gz +0 -0
  183. codex/static_root/assets/browser-CZeVqRNy.css +1 -0
  184. codex/static_root/assets/browser-CZeVqRNy.css.br +0 -0
  185. codex/static_root/assets/browser-CZeVqRNy.css.gz +0 -0
  186. codex/static_root/assets/change-password-dialog-C8YONrId.49aa6df6a91d.js +1 -0
  187. codex/static_root/assets/change-password-dialog-C8YONrId.49aa6df6a91d.js.br +0 -0
  188. codex/static_root/assets/change-password-dialog-C8YONrId.49aa6df6a91d.js.gz +0 -0
  189. codex/static_root/assets/change-password-dialog-C8YONrId.js +1 -0
  190. codex/static_root/assets/change-password-dialog-C8YONrId.js.br +0 -0
  191. codex/static_root/assets/change-password-dialog-C8YONrId.js.gz +0 -0
  192. codex/static_root/assets/change-password-dialog-HvIvmmIE.73be0c8a8278.css +1 -0
  193. codex/static_root/assets/change-password-dialog-HvIvmmIE.73be0c8a8278.css.br +0 -0
  194. codex/static_root/assets/change-password-dialog-HvIvmmIE.73be0c8a8278.css.gz +0 -0
  195. codex/static_root/assets/change-password-dialog-HvIvmmIE.css +1 -0
  196. codex/static_root/assets/change-password-dialog-HvIvmmIE.css.br +0 -0
  197. codex/static_root/assets/change-password-dialog-HvIvmmIE.css.gz +0 -0
  198. codex/static_root/assets/confirm-dialog-Clg-o2G-.e11d8efef3fb.js +1 -0
  199. codex/static_root/assets/confirm-dialog-Clg-o2G-.e11d8efef3fb.js.br +0 -0
  200. codex/static_root/assets/confirm-dialog-Clg-o2G-.e11d8efef3fb.js.gz +0 -0
  201. codex/static_root/assets/confirm-dialog-Clg-o2G-.js +1 -0
  202. codex/static_root/assets/confirm-dialog-Clg-o2G-.js.br +0 -0
  203. codex/static_root/assets/confirm-dialog-Clg-o2G-.js.gz +0 -0
  204. codex/static_root/assets/datetime-column-DejrPZxl.9fd36bef6fdd.js +1 -0
  205. codex/static_root/assets/datetime-column-DejrPZxl.9fd36bef6fdd.js.br +0 -0
  206. codex/static_root/assets/datetime-column-DejrPZxl.9fd36bef6fdd.js.gz +0 -0
  207. codex/static_root/assets/datetime-column-DejrPZxl.js +1 -0
  208. codex/static_root/assets/datetime-column-DejrPZxl.js.br +0 -0
  209. codex/static_root/assets/datetime-column-DejrPZxl.js.gz +0 -0
  210. codex/static_root/assets/datetime-column-Dg_RxTVM.1fa7c5cbead7.css +1 -0
  211. codex/static_root/assets/datetime-column-Dg_RxTVM.1fa7c5cbead7.css.br +0 -0
  212. codex/static_root/assets/datetime-column-Dg_RxTVM.css +1 -0
  213. codex/static_root/assets/datetime-column-Dg_RxTVM.css.br +0 -0
  214. codex/static_root/assets/filter-DHo57nTp.4d79a276d806.js +1 -0
  215. codex/static_root/assets/filter-DHo57nTp.4d79a276d806.js.br +0 -0
  216. codex/static_root/assets/filter-DHo57nTp.4d79a276d806.js.gz +0 -0
  217. codex/static_root/assets/filter-DHo57nTp.js +1 -0
  218. codex/static_root/assets/filter-DHo57nTp.js.br +0 -0
  219. codex/static_root/assets/filter-DHo57nTp.js.gz +0 -0
  220. codex/static_root/assets/flag-tab-BacZLlVi.8deba6a5370d.css +1 -0
  221. codex/static_root/assets/flag-tab-BacZLlVi.8deba6a5370d.css.br +0 -0
  222. codex/static_root/assets/flag-tab-BacZLlVi.8deba6a5370d.css.gz +0 -0
  223. codex/static_root/assets/flag-tab-BacZLlVi.css +1 -0
  224. codex/static_root/assets/flag-tab-BacZLlVi.css.br +0 -0
  225. codex/static_root/assets/flag-tab-BacZLlVi.css.gz +0 -0
  226. codex/static_root/assets/flag-tab-CagMLGSE.125739911c45.js +1 -0
  227. codex/static_root/assets/flag-tab-CagMLGSE.125739911c45.js.br +0 -0
  228. codex/static_root/assets/flag-tab-CagMLGSE.125739911c45.js.gz +0 -0
  229. codex/static_root/assets/flag-tab-CagMLGSE.js +1 -0
  230. codex/static_root/assets/flag-tab-CagMLGSE.js.br +0 -0
  231. codex/static_root/assets/flag-tab-CagMLGSE.js.gz +0 -0
  232. codex/static_root/assets/{group-tab-D5vWrihT.js → group-tab-BTAjhv32.ac196780d0a9.js} +1 -1
  233. codex/static_root/assets/group-tab-BTAjhv32.ac196780d0a9.js.br +0 -0
  234. codex/static_root/assets/group-tab-BTAjhv32.ac196780d0a9.js.gz +0 -0
  235. codex/static_root/assets/{group-tab-D5vWrihT.1afb2ce453ff.js → group-tab-BTAjhv32.js} +1 -1
  236. codex/static_root/assets/group-tab-BTAjhv32.js.br +0 -0
  237. codex/static_root/assets/group-tab-BTAjhv32.js.gz +0 -0
  238. codex/static_root/assets/http-error-DaHEsKbT.55d56ce2b9b4.js +1 -0
  239. codex/static_root/assets/http-error-DaHEsKbT.55d56ce2b9b4.js.br +0 -0
  240. codex/static_root/assets/http-error-DaHEsKbT.55d56ce2b9b4.js.gz +0 -0
  241. codex/static_root/assets/http-error-DaHEsKbT.js +1 -0
  242. codex/static_root/assets/http-error-DaHEsKbT.js.br +0 -0
  243. codex/static_root/assets/http-error-DaHEsKbT.js.gz +0 -0
  244. codex/static_root/assets/http-error-_wlDqEcp.5b78d3e332c9.css +1 -0
  245. codex/static_root/assets/{http-error-DKulXuTl.95e42988d5d5.css.br → http-error-_wlDqEcp.5b78d3e332c9.css.br} +0 -0
  246. codex/static_root/assets/http-error-_wlDqEcp.5b78d3e332c9.css.gz +0 -0
  247. codex/static_root/assets/http-error-_wlDqEcp.css +1 -0
  248. codex/static_root/assets/{http-error-DKulXuTl.css.br → http-error-_wlDqEcp.css.br} +0 -0
  249. codex/static_root/assets/http-error-_wlDqEcp.css.gz +0 -0
  250. codex/static_root/assets/index-DUjeNg4x.36d50c91b2c1.js +1 -0
  251. codex/static_root/assets/index-DUjeNg4x.36d50c91b2c1.js.br +0 -0
  252. codex/static_root/assets/index-DUjeNg4x.36d50c91b2c1.js.gz +0 -0
  253. codex/static_root/assets/index-DUjeNg4x.js +1 -0
  254. codex/static_root/assets/index-DUjeNg4x.js.br +0 -0
  255. codex/static_root/assets/index-DUjeNg4x.js.gz +0 -0
  256. codex/static_root/assets/library-tab-CXbkxNZt.954f2850a439.css +1 -0
  257. codex/static_root/assets/library-tab-CXbkxNZt.954f2850a439.css.br +2 -0
  258. codex/static_root/assets/library-tab-CXbkxNZt.954f2850a439.css.gz +0 -0
  259. codex/static_root/assets/library-tab-CXbkxNZt.css +1 -0
  260. codex/static_root/assets/library-tab-CXbkxNZt.css.br +2 -0
  261. codex/static_root/assets/library-tab-CXbkxNZt.css.gz +0 -0
  262. codex/static_root/assets/library-tab-Cud4639b.7f5a50aaabe8.js +1 -0
  263. codex/static_root/assets/library-tab-Cud4639b.7f5a50aaabe8.js.br +0 -0
  264. codex/static_root/assets/library-tab-Cud4639b.7f5a50aaabe8.js.gz +0 -0
  265. codex/static_root/assets/library-tab-Cud4639b.js +1 -0
  266. codex/static_root/assets/library-tab-Cud4639b.js.br +0 -0
  267. codex/static_root/assets/library-tab-Cud4639b.js.gz +0 -0
  268. codex/static_root/assets/main-BnzL_Byv.22f98ee91990.js +32 -0
  269. codex/static_root/assets/main-BnzL_Byv.22f98ee91990.js.br +0 -0
  270. codex/static_root/assets/main-BnzL_Byv.22f98ee91990.js.gz +0 -0
  271. codex/static_root/assets/main-BnzL_Byv.js +32 -0
  272. codex/static_root/assets/main-BnzL_Byv.js.br +0 -0
  273. codex/static_root/assets/main-BnzL_Byv.js.gz +0 -0
  274. codex/static_root/assets/{main-Ztp855PW.d46d718fac45.css → main-sK7HC5h4.6f04ddfc5f1a.css} +1 -1
  275. codex/static_root/assets/main-sK7HC5h4.6f04ddfc5f1a.css.br +0 -0
  276. codex/static_root/assets/{main-Ztp855PW.d46d718fac45.css.gz → main-sK7HC5h4.6f04ddfc5f1a.css.gz} +0 -0
  277. codex/static_root/assets/{main-Ztp855PW.css → main-sK7HC5h4.css} +1 -1
  278. codex/static_root/assets/main-sK7HC5h4.css.br +0 -0
  279. codex/static_root/assets/{main-Ztp855PW.css.gz → main-sK7HC5h4.css.gz} +0 -0
  280. codex/static_root/assets/pagination-toolbar-B3wS4_7p.7695fafdefce.css +1 -0
  281. codex/static_root/assets/pagination-toolbar-B3wS4_7p.7695fafdefce.css.br +0 -0
  282. codex/static_root/assets/pagination-toolbar-B3wS4_7p.7695fafdefce.css.gz +0 -0
  283. codex/static_root/assets/pagination-toolbar-B3wS4_7p.css +1 -0
  284. codex/static_root/assets/pagination-toolbar-B3wS4_7p.css.br +0 -0
  285. codex/static_root/assets/pagination-toolbar-B3wS4_7p.css.gz +0 -0
  286. codex/static_root/assets/pagination-toolbar-Covpd-k8.b71277bd7a2d.js +1 -0
  287. codex/static_root/assets/pagination-toolbar-Covpd-k8.b71277bd7a2d.js.br +0 -0
  288. codex/static_root/assets/pagination-toolbar-Covpd-k8.b71277bd7a2d.js.gz +0 -0
  289. codex/static_root/assets/pagination-toolbar-Covpd-k8.js +1 -0
  290. codex/static_root/assets/pagination-toolbar-Covpd-k8.js.br +0 -0
  291. codex/static_root/assets/pagination-toolbar-Covpd-k8.js.gz +0 -0
  292. codex/static_root/assets/pdf-doc-CD2lnB32.1cef3bf498be.js +35 -0
  293. codex/static_root/assets/pdf-doc-CD2lnB32.1cef3bf498be.js.br +0 -0
  294. codex/static_root/assets/pdf-doc-CD2lnB32.1cef3bf498be.js.gz +0 -0
  295. codex/static_root/assets/pdf-doc-CD2lnB32.js +35 -0
  296. codex/static_root/assets/pdf-doc-CD2lnB32.js.br +0 -0
  297. codex/static_root/assets/pdf-doc-CD2lnB32.js.gz +0 -0
  298. codex/static_root/assets/reader-Dspy46e8.925a6b05bfcf.css +1 -0
  299. codex/static_root/assets/reader-Dspy46e8.925a6b05bfcf.css.br +0 -0
  300. codex/static_root/assets/reader-Dspy46e8.925a6b05bfcf.css.gz +0 -0
  301. codex/static_root/assets/reader-Dspy46e8.css +1 -0
  302. codex/static_root/assets/reader-Dspy46e8.css.br +0 -0
  303. codex/static_root/assets/reader-Dspy46e8.css.gz +0 -0
  304. codex/static_root/assets/reader-L85y7IXD.6de58f450421.js +2 -0
  305. codex/static_root/assets/reader-L85y7IXD.6de58f450421.js.br +0 -0
  306. codex/static_root/assets/reader-L85y7IXD.6de58f450421.js.gz +0 -0
  307. codex/static_root/assets/reader-L85y7IXD.js +2 -0
  308. codex/static_root/assets/reader-L85y7IXD.js.br +0 -0
  309. codex/static_root/assets/reader-L85y7IXD.js.gz +0 -0
  310. codex/static_root/assets/relation-chips-BpuqEeqM.1372d8a3e6cf.js +1 -0
  311. codex/static_root/assets/relation-chips-BpuqEeqM.1372d8a3e6cf.js.br +0 -0
  312. codex/static_root/assets/relation-chips-BpuqEeqM.1372d8a3e6cf.js.gz +0 -0
  313. codex/static_root/assets/relation-chips-BpuqEeqM.js +1 -0
  314. codex/static_root/assets/relation-chips-BpuqEeqM.js.br +0 -0
  315. codex/static_root/assets/relation-chips-BpuqEeqM.js.gz +0 -0
  316. codex/static_root/assets/{relation-chips-Bsc-gUxE.98e65384c3c9.css → relation-chips-D6T6FX7G.css} +1 -1
  317. codex/static_root/assets/relation-chips-D6T6FX7G.css.br +0 -0
  318. codex/static_root/assets/relation-chips-D6T6FX7G.css.gz +0 -0
  319. codex/static_root/assets/{relation-chips-Bsc-gUxE.css → relation-chips-D6T6FX7G.db095b2497e4.css} +1 -1
  320. codex/static_root/assets/relation-chips-D6T6FX7G.db095b2497e4.css.br +0 -0
  321. codex/static_root/assets/relation-chips-D6T6FX7G.db095b2497e4.css.gz +0 -0
  322. codex/static_root/assets/settings-drawer-BgUazs7O.7bbeb1fd98f1.css +1 -0
  323. codex/static_root/assets/settings-drawer-BgUazs7O.7bbeb1fd98f1.css.br +0 -0
  324. codex/static_root/assets/settings-drawer-BgUazs7O.7bbeb1fd98f1.css.gz +0 -0
  325. codex/static_root/assets/settings-drawer-BgUazs7O.css +1 -0
  326. codex/static_root/assets/settings-drawer-BgUazs7O.css.br +0 -0
  327. codex/static_root/assets/settings-drawer-BgUazs7O.css.gz +0 -0
  328. codex/static_root/assets/settings-drawer-CLMcxfVd.b9619341ad48.js +2 -0
  329. codex/static_root/assets/settings-drawer-CLMcxfVd.b9619341ad48.js.br +0 -0
  330. codex/static_root/assets/settings-drawer-CLMcxfVd.b9619341ad48.js.gz +0 -0
  331. codex/static_root/assets/settings-drawer-CLMcxfVd.js +2 -0
  332. codex/static_root/assets/settings-drawer-CLMcxfVd.js.br +0 -0
  333. codex/static_root/assets/settings-drawer-CLMcxfVd.js.gz +0 -0
  334. codex/static_root/assets/stats-tab-CQa3-W05.3d7c61418528.js +1 -0
  335. codex/static_root/assets/stats-tab-CQa3-W05.3d7c61418528.js.br +0 -0
  336. codex/static_root/assets/stats-tab-CQa3-W05.3d7c61418528.js.gz +0 -0
  337. codex/static_root/assets/stats-tab-CQa3-W05.js +1 -0
  338. codex/static_root/assets/stats-tab-CQa3-W05.js.br +0 -0
  339. codex/static_root/assets/stats-tab-CQa3-W05.js.gz +0 -0
  340. codex/static_root/assets/stats-tab-TsyG3wH_.b93c080356fc.css +1 -0
  341. codex/static_root/assets/stats-tab-TsyG3wH_.b93c080356fc.css.br +2 -0
  342. codex/static_root/assets/stats-tab-TsyG3wH_.b93c080356fc.css.gz +0 -0
  343. codex/static_root/assets/stats-tab-TsyG3wH_.css +1 -0
  344. codex/static_root/assets/stats-tab-TsyG3wH_.css.br +2 -0
  345. codex/static_root/assets/stats-tab-TsyG3wH_.css.gz +0 -0
  346. codex/static_root/assets/task-tab-OPhBm-O2.8f31f4215114.js +1 -0
  347. codex/static_root/assets/task-tab-OPhBm-O2.8f31f4215114.js.br +0 -0
  348. codex/static_root/assets/task-tab-OPhBm-O2.8f31f4215114.js.gz +0 -0
  349. codex/static_root/assets/task-tab-OPhBm-O2.js +1 -0
  350. codex/static_root/assets/task-tab-OPhBm-O2.js.br +0 -0
  351. codex/static_root/assets/task-tab-OPhBm-O2.js.gz +0 -0
  352. codex/static_root/assets/to-case-kUm8NPpW.5b3369f511b8.js +1 -0
  353. codex/static_root/assets/to-case-kUm8NPpW.js +1 -0
  354. codex/static_root/assets/unauthorized-ClQNhRb5.32a8a84d1781.js +1 -0
  355. codex/static_root/assets/unauthorized-ClQNhRb5.32a8a84d1781.js.br +0 -0
  356. codex/static_root/assets/unauthorized-ClQNhRb5.32a8a84d1781.js.gz +0 -0
  357. codex/static_root/assets/unauthorized-ClQNhRb5.js +1 -0
  358. codex/static_root/assets/unauthorized-ClQNhRb5.js.br +0 -0
  359. codex/static_root/assets/unauthorized-ClQNhRb5.js.gz +0 -0
  360. codex/static_root/assets/{unauthorized-CibJYD8o.4c2de98c2b53.css → unauthorized-DWgytUow.ca2f13dbdbf5.css} +1 -1
  361. codex/static_root/assets/unauthorized-DWgytUow.ca2f13dbdbf5.css.br +0 -0
  362. codex/static_root/assets/unauthorized-DWgytUow.ca2f13dbdbf5.css.gz +0 -0
  363. codex/static_root/assets/{unauthorized-CibJYD8o.css → unauthorized-DWgytUow.css} +1 -1
  364. codex/static_root/assets/unauthorized-DWgytUow.css.br +0 -0
  365. codex/static_root/assets/unauthorized-DWgytUow.css.gz +0 -0
  366. codex/static_root/assets/user-tab-BKkxa2WL.50d83951c09f.js +1 -0
  367. codex/static_root/assets/user-tab-BKkxa2WL.50d83951c09f.js.br +0 -0
  368. codex/static_root/assets/user-tab-BKkxa2WL.50d83951c09f.js.gz +0 -0
  369. codex/static_root/assets/user-tab-BKkxa2WL.js +1 -0
  370. codex/static_root/assets/user-tab-BKkxa2WL.js.br +0 -0
  371. codex/static_root/assets/user-tab-BKkxa2WL.js.gz +0 -0
  372. codex/static_root/js/choices-admin.248384ece3f6.json +1 -0
  373. codex/static_root/js/choices-admin.248384ece3f6.json.br +0 -0
  374. codex/static_root/js/choices-admin.248384ece3f6.json.gz +0 -0
  375. codex/static_root/js/choices-admin.json +1 -1
  376. codex/static_root/js/choices-admin.json.br +0 -0
  377. codex/static_root/js/choices-admin.json.gz +0 -0
  378. codex/static_root/js/choices.b60817ba0a93.json +1 -0
  379. codex/static_root/js/choices.b60817ba0a93.json.br +0 -0
  380. codex/static_root/js/choices.b60817ba0a93.json.gz +0 -0
  381. codex/static_root/js/choices.json +1 -1
  382. codex/static_root/js/choices.json.br +0 -0
  383. codex/static_root/js/choices.json.gz +0 -0
  384. codex/static_root/manifest.c5fa10a7dfdc.json +641 -0
  385. codex/static_root/manifest.c5fa10a7dfdc.json.br +0 -0
  386. codex/static_root/manifest.c5fa10a7dfdc.json.gz +0 -0
  387. codex/static_root/manifest.json +298 -279
  388. codex/static_root/manifest.json.br +0 -0
  389. codex/static_root/manifest.json.gz +0 -0
  390. codex/static_root/staticfiles.json +1 -1
  391. codex/status_controller.py +2 -11
  392. codex/urls/api/auth.py +1 -2
  393. codex/urls/api/browser.py +4 -13
  394. codex/urls/api/reader.py +9 -3
  395. codex/urls/api/v3.py +0 -2
  396. codex/urls/opds/binary.py +1 -1
  397. codex/views/admin/api_key.py +8 -7
  398. codex/views/admin/flag.py +7 -2
  399. codex/views/admin/group.py +6 -2
  400. codex/views/admin/library.py +37 -44
  401. codex/views/admin/stats.py +83 -20
  402. codex/views/admin/tasks.py +12 -26
  403. codex/views/admin/user.py +9 -3
  404. codex/views/auth.py +54 -31
  405. codex/views/bookmark.py +72 -92
  406. codex/views/browser/base.py +90 -42
  407. codex/views/browser/browser.py +371 -92
  408. codex/views/browser/{annotations.py → browser_annotations.py} +121 -67
  409. codex/views/browser/browser_breadcrumbs.py +175 -0
  410. codex/views/browser/browser_order_by.py +63 -0
  411. codex/views/browser/choices.py +85 -38
  412. codex/views/browser/const.py +3 -0
  413. codex/views/browser/filters/annotations.py +19 -87
  414. codex/views/browser/filters/bookmark.py +12 -24
  415. codex/views/browser/filters/field.py +6 -8
  416. codex/views/browser/filters/group.py +14 -35
  417. codex/views/browser/filters/search.py +20 -31
  418. codex/views/browser/metadata.py +73 -112
  419. codex/views/browser/session.py +12 -0
  420. codex/views/const.py +0 -140
  421. codex/views/cover.py +77 -0
  422. codex/views/download.py +8 -5
  423. codex/views/frontend.py +2 -4
  424. codex/views/opds/authentication_v1.py +45 -46
  425. codex/views/opds/binary.py +10 -5
  426. codex/views/opds/const.py +0 -13
  427. codex/views/opds/urls.py +4 -6
  428. codex/views/opds/util.py +12 -4
  429. codex/views/opds/v1/entry/links.py +33 -18
  430. codex/views/opds/v1/facets.py +7 -7
  431. codex/views/opds/v1/feed.py +45 -55
  432. codex/views/opds/v1/links.py +5 -7
  433. codex/views/opds/v1/opensearch_v1.py +6 -2
  434. codex/views/opds/v2/feed.py +26 -25
  435. codex/views/opds/v2/links.py +2 -4
  436. codex/views/opds/v2/publications.py +54 -34
  437. codex/views/opds/v2/top_links.py +2 -2
  438. codex/views/reader/page.py +8 -15
  439. codex/views/reader/reader.py +322 -19
  440. codex/views/reader/{settings.py → session.py} +2 -4
  441. codex/views/session.py +102 -83
  442. codex/views/template.py +3 -3
  443. codex/views/version.py +2 -2
  444. codex/websockets/consumers.py +10 -14
  445. {codex-1.6.0.dist-info → codex-1.6.0a0.dist-info}/METADATA +15 -22
  446. {codex-1.6.0.dist-info → codex-1.6.0a0.dist-info}/RECORD +449 -467
  447. codex/librarian/importer/cache.py +0 -93
  448. codex/librarian/importer/create_covers.py +0 -96
  449. codex/librarian/importer/importer.py +0 -96
  450. codex/librarian/importer/init.py +0 -265
  451. codex/librarian/importer/link_covers.py +0 -73
  452. codex/librarian/importer/query_covers.py +0 -52
  453. codex/migrations/0027_import_order_and_covers.py +0 -280
  454. codex/serializers/browser/mtime.py +0 -21
  455. codex/serializers/fields.py +0 -149
  456. codex/serializers/settings.py +0 -12
  457. codex/static_root/assets/VCheckbox-DanrzdHo.8ec5e2094cbf.js +0 -1
  458. codex/static_root/assets/VCheckbox-DanrzdHo.8ec5e2094cbf.js.br +0 -0
  459. codex/static_root/assets/VCheckbox-DanrzdHo.8ec5e2094cbf.js.gz +0 -0
  460. codex/static_root/assets/VCheckbox-DanrzdHo.js +0 -1
  461. codex/static_root/assets/VCheckbox-DanrzdHo.js.br +0 -0
  462. codex/static_root/assets/VCheckbox-DanrzdHo.js.gz +0 -0
  463. codex/static_root/assets/VCheckboxBtn-DxNOKONG.5ab34c4c47aa.js.br +0 -0
  464. codex/static_root/assets/VCheckboxBtn-DxNOKONG.5ab34c4c47aa.js.gz +0 -0
  465. codex/static_root/assets/VCheckboxBtn-DxNOKONG.js.br +0 -0
  466. codex/static_root/assets/VCheckboxBtn-DxNOKONG.js.gz +0 -0
  467. codex/static_root/assets/VCombobox-DDvdoPTG.11d080e8edd7.js +0 -1
  468. codex/static_root/assets/VCombobox-DDvdoPTG.11d080e8edd7.js.br +0 -0
  469. codex/static_root/assets/VCombobox-DDvdoPTG.11d080e8edd7.js.gz +0 -0
  470. codex/static_root/assets/VCombobox-DDvdoPTG.js +0 -1
  471. codex/static_root/assets/VCombobox-DDvdoPTG.js.br +0 -0
  472. codex/static_root/assets/VCombobox-DDvdoPTG.js.gz +0 -0
  473. codex/static_root/assets/VDialog-Bd5dN_E1.457666d7fce1.js +0 -1
  474. codex/static_root/assets/VDialog-Bd5dN_E1.457666d7fce1.js.br +0 -0
  475. codex/static_root/assets/VDialog-Bd5dN_E1.457666d7fce1.js.gz +0 -0
  476. codex/static_root/assets/VDialog-Bd5dN_E1.js +0 -1
  477. codex/static_root/assets/VDialog-Bd5dN_E1.js.br +0 -0
  478. codex/static_root/assets/VDialog-Bd5dN_E1.js.gz +0 -0
  479. codex/static_root/assets/VDialog-lQ13FnRR.1c801ad756b2.css.br +0 -0
  480. codex/static_root/assets/VDialog-lQ13FnRR.1c801ad756b2.css.gz +0 -0
  481. codex/static_root/assets/VDialog-lQ13FnRR.css.br +0 -0
  482. codex/static_root/assets/VDialog-lQ13FnRR.css.gz +0 -0
  483. codex/static_root/assets/VExpansionPanels-DqTuYpTR.12673cf9f391.js +0 -1
  484. codex/static_root/assets/VExpansionPanels-DqTuYpTR.12673cf9f391.js.br +0 -0
  485. codex/static_root/assets/VExpansionPanels-DqTuYpTR.12673cf9f391.js.gz +0 -0
  486. codex/static_root/assets/VExpansionPanels-DqTuYpTR.js +0 -1
  487. codex/static_root/assets/VExpansionPanels-DqTuYpTR.js.br +0 -0
  488. codex/static_root/assets/VExpansionPanels-DqTuYpTR.js.gz +0 -0
  489. codex/static_root/assets/VRadioGroup-DKb8XPr-.3cf6bf5bf3bc.js +0 -1
  490. codex/static_root/assets/VRadioGroup-DKb8XPr-.3cf6bf5bf3bc.js.br +0 -0
  491. codex/static_root/assets/VRadioGroup-DKb8XPr-.3cf6bf5bf3bc.js.gz +0 -0
  492. codex/static_root/assets/VRadioGroup-DKb8XPr-.js +0 -1
  493. codex/static_root/assets/VRadioGroup-DKb8XPr-.js.br +0 -0
  494. codex/static_root/assets/VRadioGroup-DKb8XPr-.js.gz +0 -0
  495. codex/static_root/assets/VSelect-C_yPbyCG.08bd6b53a7ce.js +0 -1
  496. codex/static_root/assets/VSelect-C_yPbyCG.08bd6b53a7ce.js.br +0 -0
  497. codex/static_root/assets/VSelect-C_yPbyCG.08bd6b53a7ce.js.gz +0 -0
  498. codex/static_root/assets/VSelect-C_yPbyCG.js +0 -1
  499. codex/static_root/assets/VSelect-C_yPbyCG.js.br +0 -0
  500. codex/static_root/assets/VSelect-C_yPbyCG.js.gz +0 -0
  501. codex/static_root/assets/VSelectionControl-CmFPvGMS.802c9b3e6e28.js +0 -1
  502. codex/static_root/assets/VSelectionControl-CmFPvGMS.802c9b3e6e28.js.br +0 -0
  503. codex/static_root/assets/VSelectionControl-CmFPvGMS.802c9b3e6e28.js.gz +0 -0
  504. codex/static_root/assets/VSelectionControl-CmFPvGMS.js +0 -1
  505. codex/static_root/assets/VSelectionControl-CmFPvGMS.js.br +0 -0
  506. codex/static_root/assets/VSelectionControl-CmFPvGMS.js.gz +0 -0
  507. codex/static_root/assets/VSlideGroup-D5FZWsM1.a47491fe3e6d.js +0 -1
  508. codex/static_root/assets/VSlideGroup-D5FZWsM1.a47491fe3e6d.js.br +0 -0
  509. codex/static_root/assets/VSlideGroup-D5FZWsM1.a47491fe3e6d.js.gz +0 -0
  510. codex/static_root/assets/VSlideGroup-D5FZWsM1.js +0 -1
  511. codex/static_root/assets/VSlideGroup-D5FZWsM1.js.br +0 -0
  512. codex/static_root/assets/VSlideGroup-D5FZWsM1.js.gz +0 -0
  513. codex/static_root/assets/VTable-2RHFqfg6.f0f2106b158b.js.br +0 -0
  514. codex/static_root/assets/VTable-2RHFqfg6.f0f2106b158b.js.gz +0 -0
  515. codex/static_root/assets/VTable-2RHFqfg6.js.br +0 -0
  516. codex/static_root/assets/VTable-2RHFqfg6.js.gz +0 -0
  517. codex/static_root/assets/VTextField-BssVoDhB.4cc388b4aa3c.css +0 -1
  518. codex/static_root/assets/VTextField-BssVoDhB.4cc388b4aa3c.css.br +0 -0
  519. codex/static_root/assets/VTextField-BssVoDhB.4cc388b4aa3c.css.gz +0 -0
  520. codex/static_root/assets/VTextField-BssVoDhB.css +0 -1
  521. codex/static_root/assets/VTextField-BssVoDhB.css.br +0 -0
  522. codex/static_root/assets/VTextField-BssVoDhB.css.gz +0 -0
  523. codex/static_root/assets/VTextField-o1N9ylIb.7fffaeff8d40.js +0 -1
  524. codex/static_root/assets/VTextField-o1N9ylIb.7fffaeff8d40.js.br +0 -0
  525. codex/static_root/assets/VTextField-o1N9ylIb.7fffaeff8d40.js.gz +0 -0
  526. codex/static_root/assets/VTextField-o1N9ylIb.js +0 -1
  527. codex/static_root/assets/VTextField-o1N9ylIb.js.br +0 -0
  528. codex/static_root/assets/VTextField-o1N9ylIb.js.gz +0 -0
  529. codex/static_root/assets/VWindowItem-C_zvuz9C.663fa48efea4.js +0 -1
  530. codex/static_root/assets/VWindowItem-C_zvuz9C.663fa48efea4.js.br +0 -0
  531. codex/static_root/assets/VWindowItem-C_zvuz9C.663fa48efea4.js.gz +0 -0
  532. codex/static_root/assets/VWindowItem-C_zvuz9C.js +0 -1
  533. codex/static_root/assets/VWindowItem-C_zvuz9C.js.br +0 -0
  534. codex/static_root/assets/VWindowItem-C_zvuz9C.js.gz +0 -0
  535. codex/static_root/assets/admin-B8Bp2Uih.82c98714bcf1.css.br +0 -0
  536. codex/static_root/assets/admin-B8Bp2Uih.82c98714bcf1.css.gz +0 -0
  537. codex/static_root/assets/admin-B8Bp2Uih.css.br +0 -0
  538. codex/static_root/assets/admin-B8Bp2Uih.css.gz +0 -0
  539. codex/static_root/assets/admin-DHyHEWZ3.7a8015456c0f.js +0 -1
  540. codex/static_root/assets/admin-DHyHEWZ3.7a8015456c0f.js.br +0 -0
  541. codex/static_root/assets/admin-DHyHEWZ3.7a8015456c0f.js.gz +0 -0
  542. codex/static_root/assets/admin-DHyHEWZ3.js +0 -1
  543. codex/static_root/assets/admin-DHyHEWZ3.js.br +0 -0
  544. codex/static_root/assets/admin-DHyHEWZ3.js.gz +0 -0
  545. codex/static_root/assets/admin-drawer-panel-BXpIDQXM.19507a95375b.js +0 -30
  546. codex/static_root/assets/admin-drawer-panel-BXpIDQXM.19507a95375b.js.br +0 -0
  547. codex/static_root/assets/admin-drawer-panel-BXpIDQXM.19507a95375b.js.gz +0 -0
  548. codex/static_root/assets/admin-drawer-panel-BXpIDQXM.js +0 -30
  549. codex/static_root/assets/admin-drawer-panel-BXpIDQXM.js.br +0 -0
  550. codex/static_root/assets/admin-drawer-panel-BXpIDQXM.js.gz +0 -0
  551. codex/static_root/assets/admin-drawer-panel-mne3FIj6.561b3f75fe65.css +0 -1
  552. codex/static_root/assets/admin-drawer-panel-mne3FIj6.561b3f75fe65.css.br +0 -0
  553. codex/static_root/assets/admin-drawer-panel-mne3FIj6.561b3f75fe65.css.gz +0 -0
  554. codex/static_root/assets/admin-drawer-panel-mne3FIj6.css +0 -1
  555. codex/static_root/assets/admin-drawer-panel-mne3FIj6.css.br +0 -0
  556. codex/static_root/assets/admin-drawer-panel-mne3FIj6.css.gz +0 -0
  557. codex/static_root/assets/browser-D0Vjmmp_.a1bfaf48d65f.js +0 -1
  558. codex/static_root/assets/browser-D0Vjmmp_.a1bfaf48d65f.js.br +0 -0
  559. codex/static_root/assets/browser-D0Vjmmp_.a1bfaf48d65f.js.gz +0 -0
  560. codex/static_root/assets/browser-D0Vjmmp_.js +0 -1
  561. codex/static_root/assets/browser-D0Vjmmp_.js.br +0 -0
  562. codex/static_root/assets/browser-D0Vjmmp_.js.gz +0 -0
  563. codex/static_root/assets/browser-D7QQDneO.155cb612ed0c.css +0 -1
  564. codex/static_root/assets/browser-D7QQDneO.155cb612ed0c.css.br +0 -0
  565. codex/static_root/assets/browser-D7QQDneO.155cb612ed0c.css.gz +0 -0
  566. codex/static_root/assets/browser-D7QQDneO.css +0 -1
  567. codex/static_root/assets/browser-D7QQDneO.css.br +0 -0
  568. codex/static_root/assets/browser-D7QQDneO.css.gz +0 -0
  569. codex/static_root/assets/change-password-dialog-0u6IJA87.5f9a9aa573b7.css +0 -1
  570. codex/static_root/assets/change-password-dialog-0u6IJA87.5f9a9aa573b7.css.br +0 -0
  571. codex/static_root/assets/change-password-dialog-0u6IJA87.5f9a9aa573b7.css.gz +0 -0
  572. codex/static_root/assets/change-password-dialog-0u6IJA87.css +0 -1
  573. codex/static_root/assets/change-password-dialog-0u6IJA87.css.br +0 -0
  574. codex/static_root/assets/change-password-dialog-0u6IJA87.css.gz +0 -0
  575. codex/static_root/assets/change-password-dialog-BBsJLPXZ.e642f7e2b96f.js +0 -1
  576. codex/static_root/assets/change-password-dialog-BBsJLPXZ.e642f7e2b96f.js.br +0 -0
  577. codex/static_root/assets/change-password-dialog-BBsJLPXZ.e642f7e2b96f.js.gz +0 -0
  578. codex/static_root/assets/change-password-dialog-BBsJLPXZ.js +0 -1
  579. codex/static_root/assets/change-password-dialog-BBsJLPXZ.js.br +0 -0
  580. codex/static_root/assets/change-password-dialog-BBsJLPXZ.js.gz +0 -0
  581. codex/static_root/assets/confirm-dialog-DCKvg3ai.2a3277b3c147.js +0 -1
  582. codex/static_root/assets/confirm-dialog-DCKvg3ai.2a3277b3c147.js.br +0 -0
  583. codex/static_root/assets/confirm-dialog-DCKvg3ai.2a3277b3c147.js.gz +0 -0
  584. codex/static_root/assets/confirm-dialog-DCKvg3ai.js +0 -1
  585. codex/static_root/assets/confirm-dialog-DCKvg3ai.js.br +0 -0
  586. codex/static_root/assets/confirm-dialog-DCKvg3ai.js.gz +0 -0
  587. codex/static_root/assets/copy-to-clipboard-DoUvDJVx.bec27f144aca.js +0 -1
  588. codex/static_root/assets/copy-to-clipboard-DoUvDJVx.bec27f144aca.js.br +0 -0
  589. codex/static_root/assets/copy-to-clipboard-DoUvDJVx.js +0 -1
  590. codex/static_root/assets/copy-to-clipboard-DoUvDJVx.js.br +0 -0
  591. codex/static_root/assets/datetime-column-DeCthByU.1f3bf499e063.css +0 -1
  592. codex/static_root/assets/datetime-column-DeCthByU.css +0 -1
  593. codex/static_root/assets/datetime-column-jHKA_uNm.039c7da2036f.js +0 -1
  594. codex/static_root/assets/datetime-column-jHKA_uNm.039c7da2036f.js.br +0 -0
  595. codex/static_root/assets/datetime-column-jHKA_uNm.039c7da2036f.js.gz +0 -0
  596. codex/static_root/assets/datetime-column-jHKA_uNm.js +0 -1
  597. codex/static_root/assets/datetime-column-jHKA_uNm.js.br +0 -0
  598. codex/static_root/assets/datetime-column-jHKA_uNm.js.gz +0 -0
  599. codex/static_root/assets/filter-DgPg2ts9.af0fcf0888c6.js +0 -1
  600. codex/static_root/assets/filter-DgPg2ts9.af0fcf0888c6.js.br +0 -0
  601. codex/static_root/assets/filter-DgPg2ts9.af0fcf0888c6.js.gz +0 -0
  602. codex/static_root/assets/filter-DgPg2ts9.js +0 -1
  603. codex/static_root/assets/filter-DgPg2ts9.js.br +0 -0
  604. codex/static_root/assets/filter-DgPg2ts9.js.gz +0 -0
  605. codex/static_root/assets/flag-tab-9qxOALxP.f89bc9891671.js +0 -1
  606. codex/static_root/assets/flag-tab-9qxOALxP.f89bc9891671.js.br +0 -0
  607. codex/static_root/assets/flag-tab-9qxOALxP.f89bc9891671.js.gz +0 -0
  608. codex/static_root/assets/flag-tab-9qxOALxP.js +0 -1
  609. codex/static_root/assets/flag-tab-9qxOALxP.js.br +0 -0
  610. codex/static_root/assets/flag-tab-9qxOALxP.js.gz +0 -0
  611. codex/static_root/assets/flag-tab-BNwbLfrN.b755a99fff7e.css +0 -1
  612. codex/static_root/assets/flag-tab-BNwbLfrN.b755a99fff7e.css.br +0 -0
  613. codex/static_root/assets/flag-tab-BNwbLfrN.b755a99fff7e.css.gz +0 -0
  614. codex/static_root/assets/flag-tab-BNwbLfrN.css +0 -1
  615. codex/static_root/assets/flag-tab-BNwbLfrN.css.br +0 -0
  616. codex/static_root/assets/flag-tab-BNwbLfrN.css.gz +0 -0
  617. codex/static_root/assets/group-tab-D5vWrihT.1afb2ce453ff.js.br +0 -0
  618. codex/static_root/assets/group-tab-D5vWrihT.1afb2ce453ff.js.gz +0 -0
  619. codex/static_root/assets/group-tab-D5vWrihT.js.br +0 -0
  620. codex/static_root/assets/group-tab-D5vWrihT.js.gz +0 -0
  621. codex/static_root/assets/http-error-B4FHoKfs.141fdae409bc.js +0 -1
  622. codex/static_root/assets/http-error-B4FHoKfs.141fdae409bc.js.br +0 -0
  623. codex/static_root/assets/http-error-B4FHoKfs.141fdae409bc.js.gz +0 -0
  624. codex/static_root/assets/http-error-B4FHoKfs.js +0 -1
  625. codex/static_root/assets/http-error-B4FHoKfs.js.br +0 -0
  626. codex/static_root/assets/http-error-B4FHoKfs.js.gz +0 -0
  627. codex/static_root/assets/http-error-DKulXuTl.95e42988d5d5.css +0 -1
  628. codex/static_root/assets/http-error-DKulXuTl.95e42988d5d5.css.gz +0 -0
  629. codex/static_root/assets/http-error-DKulXuTl.css +0 -1
  630. codex/static_root/assets/http-error-DKulXuTl.css.gz +0 -0
  631. codex/static_root/assets/library-tab-BN0SfPcH.913e236f625e.css +0 -1
  632. codex/static_root/assets/library-tab-BN0SfPcH.913e236f625e.css.br +0 -0
  633. codex/static_root/assets/library-tab-BN0SfPcH.913e236f625e.css.gz +0 -0
  634. codex/static_root/assets/library-tab-BN0SfPcH.css +0 -1
  635. codex/static_root/assets/library-tab-BN0SfPcH.css.br +0 -0
  636. codex/static_root/assets/library-tab-BN0SfPcH.css.gz +0 -0
  637. codex/static_root/assets/library-tab-BWo0cmzk.0e3d67d0c41a.js +0 -1
  638. codex/static_root/assets/library-tab-BWo0cmzk.0e3d67d0c41a.js.br +0 -0
  639. codex/static_root/assets/library-tab-BWo0cmzk.0e3d67d0c41a.js.gz +0 -0
  640. codex/static_root/assets/library-tab-BWo0cmzk.js +0 -1
  641. codex/static_root/assets/library-tab-BWo0cmzk.js.br +0 -0
  642. codex/static_root/assets/library-tab-BWo0cmzk.js.gz +0 -0
  643. codex/static_root/assets/main-Ztp855PW.css.br +0 -0
  644. codex/static_root/assets/main-Ztp855PW.d46d718fac45.css.br +0 -0
  645. codex/static_root/assets/main-ipmlipkF.5e60e6e8e447.js +0 -32
  646. codex/static_root/assets/main-ipmlipkF.5e60e6e8e447.js.br +0 -0
  647. codex/static_root/assets/main-ipmlipkF.5e60e6e8e447.js.gz +0 -0
  648. codex/static_root/assets/main-ipmlipkF.js +0 -32
  649. codex/static_root/assets/main-ipmlipkF.js.br +0 -0
  650. codex/static_root/assets/main-ipmlipkF.js.gz +0 -0
  651. codex/static_root/assets/pagination-toolbar-BA9ifTed.b4865334ee08.css +0 -1
  652. codex/static_root/assets/pagination-toolbar-BA9ifTed.b4865334ee08.css.br +0 -0
  653. codex/static_root/assets/pagination-toolbar-BA9ifTed.b4865334ee08.css.gz +0 -0
  654. codex/static_root/assets/pagination-toolbar-BA9ifTed.css +0 -1
  655. codex/static_root/assets/pagination-toolbar-BA9ifTed.css.br +0 -0
  656. codex/static_root/assets/pagination-toolbar-BA9ifTed.css.gz +0 -0
  657. codex/static_root/assets/pagination-toolbar-kZ-Xdv8c.b3341b8028df.js +0 -1
  658. codex/static_root/assets/pagination-toolbar-kZ-Xdv8c.b3341b8028df.js.br +0 -0
  659. codex/static_root/assets/pagination-toolbar-kZ-Xdv8c.b3341b8028df.js.gz +0 -0
  660. codex/static_root/assets/pagination-toolbar-kZ-Xdv8c.js +0 -1
  661. codex/static_root/assets/pagination-toolbar-kZ-Xdv8c.js.br +0 -0
  662. codex/static_root/assets/pagination-toolbar-kZ-Xdv8c.js.gz +0 -0
  663. codex/static_root/assets/pdf-doc-C2StaYUz.cb848834dbe1.js +0 -305
  664. codex/static_root/assets/pdf-doc-C2StaYUz.cb848834dbe1.js.br +0 -0
  665. codex/static_root/assets/pdf-doc-C2StaYUz.cb848834dbe1.js.gz +0 -0
  666. codex/static_root/assets/pdf-doc-C2StaYUz.js +0 -305
  667. codex/static_root/assets/pdf-doc-C2StaYUz.js.br +0 -0
  668. codex/static_root/assets/pdf-doc-C2StaYUz.js.gz +0 -0
  669. codex/static_root/assets/reader-CCnq3j1-.b6b38ed5521e.js +0 -2
  670. codex/static_root/assets/reader-CCnq3j1-.b6b38ed5521e.js.br +0 -0
  671. codex/static_root/assets/reader-CCnq3j1-.b6b38ed5521e.js.gz +0 -0
  672. codex/static_root/assets/reader-CCnq3j1-.js +0 -2
  673. codex/static_root/assets/reader-CCnq3j1-.js.br +0 -0
  674. codex/static_root/assets/reader-CCnq3j1-.js.gz +0 -0
  675. codex/static_root/assets/reader-CqXFa_gE.78267e9de0c2.css +0 -1
  676. codex/static_root/assets/reader-CqXFa_gE.78267e9de0c2.css.br +0 -0
  677. codex/static_root/assets/reader-CqXFa_gE.78267e9de0c2.css.gz +0 -0
  678. codex/static_root/assets/reader-CqXFa_gE.css +0 -1
  679. codex/static_root/assets/reader-CqXFa_gE.css.br +0 -0
  680. codex/static_root/assets/reader-CqXFa_gE.css.gz +0 -0
  681. codex/static_root/assets/relation-chips-Bsc-gUxE.98e65384c3c9.css.br +0 -0
  682. codex/static_root/assets/relation-chips-Bsc-gUxE.98e65384c3c9.css.gz +0 -0
  683. codex/static_root/assets/relation-chips-Bsc-gUxE.css.br +0 -0
  684. codex/static_root/assets/relation-chips-Bsc-gUxE.css.gz +0 -0
  685. codex/static_root/assets/relation-chips-C9ysW0tU.670f1d1f273f.js +0 -1
  686. codex/static_root/assets/relation-chips-C9ysW0tU.670f1d1f273f.js.br +0 -0
  687. codex/static_root/assets/relation-chips-C9ysW0tU.670f1d1f273f.js.gz +0 -0
  688. codex/static_root/assets/relation-chips-C9ysW0tU.js +0 -1
  689. codex/static_root/assets/relation-chips-C9ysW0tU.js.br +0 -0
  690. codex/static_root/assets/relation-chips-C9ysW0tU.js.gz +0 -0
  691. codex/static_root/assets/settings-drawer-C0ofzAhW.c0def8f383cb.js +0 -2
  692. codex/static_root/assets/settings-drawer-C0ofzAhW.c0def8f383cb.js.br +0 -0
  693. codex/static_root/assets/settings-drawer-C0ofzAhW.c0def8f383cb.js.gz +0 -0
  694. codex/static_root/assets/settings-drawer-C0ofzAhW.js +0 -2
  695. codex/static_root/assets/settings-drawer-C0ofzAhW.js.br +0 -0
  696. codex/static_root/assets/settings-drawer-C0ofzAhW.js.gz +0 -0
  697. codex/static_root/assets/settings-drawer-nZ9HvKSZ.01744e131806.css +0 -1
  698. codex/static_root/assets/settings-drawer-nZ9HvKSZ.01744e131806.css.br +0 -0
  699. codex/static_root/assets/settings-drawer-nZ9HvKSZ.01744e131806.css.gz +0 -0
  700. codex/static_root/assets/settings-drawer-nZ9HvKSZ.css +0 -1
  701. codex/static_root/assets/settings-drawer-nZ9HvKSZ.css.br +0 -0
  702. codex/static_root/assets/settings-drawer-nZ9HvKSZ.css.gz +0 -0
  703. codex/static_root/assets/stats-tab-B4yKuY0c.a5728396494b.css +0 -1
  704. codex/static_root/assets/stats-tab-B4yKuY0c.a5728396494b.css.br +0 -0
  705. codex/static_root/assets/stats-tab-B4yKuY0c.a5728396494b.css.gz +0 -0
  706. codex/static_root/assets/stats-tab-B4yKuY0c.css +0 -1
  707. codex/static_root/assets/stats-tab-B4yKuY0c.css.br +0 -0
  708. codex/static_root/assets/stats-tab-B4yKuY0c.css.gz +0 -0
  709. codex/static_root/assets/stats-tab-BqJj7j1w.38a3459d61ea.js +0 -1
  710. codex/static_root/assets/stats-tab-BqJj7j1w.38a3459d61ea.js.br +0 -0
  711. codex/static_root/assets/stats-tab-BqJj7j1w.38a3459d61ea.js.gz +0 -0
  712. codex/static_root/assets/stats-tab-BqJj7j1w.js +0 -1
  713. codex/static_root/assets/stats-tab-BqJj7j1w.js.br +0 -0
  714. codex/static_root/assets/stats-tab-BqJj7j1w.js.gz +0 -0
  715. codex/static_root/assets/task-tab-BsPzNk8S.e00630a60b43.js +0 -1
  716. codex/static_root/assets/task-tab-BsPzNk8S.e00630a60b43.js.br +0 -0
  717. codex/static_root/assets/task-tab-BsPzNk8S.e00630a60b43.js.gz +0 -0
  718. codex/static_root/assets/task-tab-BsPzNk8S.js +0 -1
  719. codex/static_root/assets/task-tab-BsPzNk8S.js.br +0 -0
  720. codex/static_root/assets/task-tab-BsPzNk8S.js.gz +0 -0
  721. codex/static_root/assets/to-case-KvqtSug2.9c02da2e47c7.js +0 -1
  722. codex/static_root/assets/to-case-KvqtSug2.9c02da2e47c7.js.br +0 -0
  723. codex/static_root/assets/to-case-KvqtSug2.js +0 -1
  724. codex/static_root/assets/to-case-KvqtSug2.js.br +0 -0
  725. codex/static_root/assets/unauthorized-CibJYD8o.4c2de98c2b53.css.br +0 -0
  726. codex/static_root/assets/unauthorized-CibJYD8o.4c2de98c2b53.css.gz +0 -0
  727. codex/static_root/assets/unauthorized-CibJYD8o.css.br +0 -0
  728. codex/static_root/assets/unauthorized-CibJYD8o.css.gz +0 -0
  729. codex/static_root/assets/unauthorized-DwSdNzX2.f418e69f3afe.js +0 -1
  730. codex/static_root/assets/unauthorized-DwSdNzX2.f418e69f3afe.js.br +0 -0
  731. codex/static_root/assets/unauthorized-DwSdNzX2.f418e69f3afe.js.gz +0 -0
  732. codex/static_root/assets/unauthorized-DwSdNzX2.js +0 -1
  733. codex/static_root/assets/unauthorized-DwSdNzX2.js.br +0 -0
  734. codex/static_root/assets/unauthorized-DwSdNzX2.js.gz +0 -0
  735. codex/static_root/assets/user-tab-DrJOb9Ys.083d993726d8.js +0 -1
  736. codex/static_root/assets/user-tab-DrJOb9Ys.083d993726d8.js.br +0 -0
  737. codex/static_root/assets/user-tab-DrJOb9Ys.083d993726d8.js.gz +0 -0
  738. codex/static_root/assets/user-tab-DrJOb9Ys.js +0 -1
  739. codex/static_root/assets/user-tab-DrJOb9Ys.js.br +0 -0
  740. codex/static_root/assets/user-tab-DrJOb9Ys.js.gz +0 -0
  741. codex/static_root/js/choices-admin.3521e2a863df.json +0 -1
  742. codex/static_root/js/choices-admin.3521e2a863df.json.br +0 -0
  743. codex/static_root/js/choices-admin.3521e2a863df.json.gz +0 -0
  744. codex/static_root/js/choices.2f6b0359e1ef.json +0 -1
  745. codex/static_root/js/choices.2f6b0359e1ef.json.br +0 -0
  746. codex/static_root/js/choices.2f6b0359e1ef.json.gz +0 -0
  747. codex/static_root/manifest.1c84116d9a0a.json +0 -622
  748. codex/static_root/manifest.1c84116d9a0a.json.br +0 -0
  749. codex/static_root/manifest.1c84116d9a0a.json.gz +0 -0
  750. codex/util.py +0 -12
  751. codex/views/admin/auth.py +0 -28
  752. codex/views/browser/breadcrumbs.py +0 -202
  753. codex/views/browser/cover.py +0 -165
  754. codex/views/browser/mtime.py +0 -61
  755. codex/views/browser/order_by.py +0 -65
  756. codex/views/browser/paginate.py +0 -106
  757. codex/views/browser/settings.py +0 -66
  758. codex/views/browser/title.py +0 -48
  759. codex/views/browser/validate.py +0 -161
  760. codex/views/opds/auth.py +0 -17
  761. codex/views/public.py +0 -36
  762. codex/views/reader/arcs.py +0 -92
  763. codex/views/reader/books.py +0 -181
  764. codex/views/reader/init.py +0 -125
  765. codex/views/settings.py +0 -47
  766. codex/views/util.py +0 -77
  767. {codex-1.6.0.dist-info → codex-1.6.0a0.dist-info}/LICENSE +0 -0
  768. {codex-1.6.0.dist-info → codex-1.6.0a0.dist-info}/WHEEL +0 -0
  769. {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(_DOC)
64
+ serializer = self.get_serializer(self.DOC)
66
65
  return Response(serializer.data)
@@ -1,15 +1,20 @@
1
1
  """Binary views with Basic Authentication added."""
2
2
 
3
- from codex.views.browser.cover import CoverView
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 OPDSCoverView(CoverView):
10
- """Cover View with Basic Auth."""
10
+ class OPDSAuthMixin:
11
+ """Add Basic Auth."""
12
+
13
+ authentication_classes = (BasicAuthentication, SessionAuthentication)
11
14
 
12
- # Panels sometimes doesn't send auth with cover requests.
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
- _OPDS_VERSIONS = (1, 2)
10
+ OPDS_VERSIONS = (1, 2)
12
11
 
13
12
 
14
- class OPDSURLsView(AuthGenericAPIView):
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
- route = pop_name(route)
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
- from codex.views.auth import GroupACLMixin
14
- from codex.views.opds.const import OPDS_M2M_MODELS
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 = GroupACLMixin.get_rel_prefix(model)
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 _cover_link(self, rel):
34
+ def _thumb_link(self):
35
35
  if self.fake:
36
36
  return None
37
- # cover_pk = getattr(self.obj, "cover_pk", None)
38
- try:
39
- kwargs = {"group": self.obj.group, "pks": self.obj.ids}
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
- return OPDS1Link(rel, href, mime_type)
50
- except Exception:
51
- LOG.exception("create thumb")
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._cover_link(Rel.THUMBNAIL):
152
+ if thumb := self._thumb_link():
138
153
  result += [thumb]
139
- if image := self._cover_link(Rel.IMAGE):
154
+ if image := self._image_link():
140
155
  result += [image]
141
156
 
142
157
  if self.obj.group == "c" and not self.fake:
@@ -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 OPDS1FacetsView(BrowserView):
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.GET.get(key) == val:
95
+ if self.request.query_params.get(key) == val:
98
96
  facet_active = True
99
97
  break
100
- href = update_href_query_params(href, self.request.GET, new_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.GET}
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.GET.get(facet_group.query_param) in compare
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):
@@ -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.const import FALSY, MAX_OBJ_PER_PAGE
19
- from codex.views.opds.auth import OPDSTemplateView
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
- OPDS1LinksView,
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 UserAgentNames:
47
+ class UserAgentPrefixes:
45
48
  """Control whether to hack in facets with nav links."""
46
49
 
47
- CLIENT_REORDERS = frozenset({"Chunky"})
48
- FACET_SUPPORT = frozenset({"yar"}) # kybooks
49
- SIMPLE_DOWNLOAD_MIME_TYPES = frozenset({"PocketBook Reader"})
50
- # Other known valid names:
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(OPDS1LinksView, OPDSTemplateView):
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("title") # type: ignore
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
- """Use mtime for updated."""
110
+ """Hack in feed update time from cover timestamp."""
108
111
  try:
109
- return self.obj.get("mtime", "")
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.GET,
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 = self.request.GET.get("opdsMetadata", "").lower() not in FALSY
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 is not None:
179
- continue
180
- with Comicbox(book.path) as cb:
181
- book.file_type = cb.get_file_type()
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
- group_qs, book_qs, num_pages, total_count, zero_pad, mtime = (
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
- user_agent_parts = user_agent.split("/", 1)
225
- if user_agent_parts:
226
- user_agent_name = user_agent_parts[0]
227
- else:
228
- return
229
-
230
- if user_agent_name in UserAgentNames.FACET_SUPPORT:
231
- self.use_facets = True
232
- if user_agent_name in UserAgentNames.CLIENT_REORDERS:
233
- self.skip_order_facets = True
234
- if user_agent_name in UserAgentNames.SIMPLE_DOWNLOAD_MIME_TYPES:
235
- self.mime_type_map = MimeType.SIMPLE_FILE_TYPE_MAP
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.GET.get("opdsMetadata", "").lower() not in FALSY
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(parameters=[input_serializer_class])
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()
@@ -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 OPDS1FacetsView
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 OPDS1LinksView(OPDS1FacetsView):
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
- **OPDS1FacetsView.DEFAULT_ROUTE,
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.GET.get(key)) != str(value):
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.GET
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.opds.auth import OPDSTemplateView
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(OPDSTemplateView):
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,)