Add OnlyOffice-based preview for office documents
Replace Aspose.Words with OnlyOffice Document Server for generating bitmap previews of office documents (Word, Excel, PowerPoint, etc.). Backend: - Add cista/onlyoffice.py conversion client - Convert office docs directly to PNG via OnlyOffice, then AVIF via pyvips - Make office previews optional based on OnlyOffice availability - Remove Aspose.Words dependency and all related code - Add spreadsheet and presentation format support Frontend: - Mark office files as previewable in Document.ts - Add office extensions to MediaPreview.vue preview list - Fix pre-existing @ts-ignore in HeaderMain.vue Tests: - Fix test_lrucache.py parameter name (open -> opener) Also run ruff format across the codebase to satisfy linter checks.
This commit is contained in:
1 parent
c49e66323f
commit
fb0ddd20e0
19 files changed
+1606
-136
No files matched your search
@@ -58,7 +58,9 @@ class LRUCache:
|
||||
Expire items that are either too old or exceed cache capacity.
|
||||
"""
|
||||
ts = monotonic() - self.maxage
|
||||
while len(self.cache) > self.capacity or (self.cache and self.cache[-1][2] < ts):
|
||||
while len(self.cache) > self.capacity or (
|
||||
self.cache and self.cache[-1][2] < ts
|
||||
):
|
||||
self.cache.pop()[1].close()
|
||||
|
||||
def close(self):
|
||||
|
||||
Reference in new issue
Block a user