]> source.dussan.org Git - nextcloud-server.git/commit
feat: add width, height, crop and mode to BeforePreviewFetchedEvent 38679/head
authorDaniel Kesselberg <mail@danielkesselberg.de>
Tue, 6 Jun 2023 21:12:40 +0000 (23:12 +0200)
committerDaniel Kesselberg <mail@danielkesselberg.de>
Fri, 23 Jun 2023 14:27:35 +0000 (16:27 +0200)
commit440f882322562af6040c0c4634903574f572f146
tree47bd477996f24fe4417ba4377e384f490250d0ea
parent05f360c5ec76bf87f55bdbc0385aa7972ec11cbd
feat: add width, height, crop and mode to BeforePreviewFetchedEvent

user_usage_report keeps a counter for files read.

The app uses

- OC_Filesystem::read hook
- Event listener (the legacy one) for IPreview::EVENT

Request for previews do not trigger the hook, hence the additional event listener.
The thumbnails for a list or grid view should not count, so we need the width and height.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
lib/private/Preview/Generator.php
lib/public/Preview/BeforePreviewFetchedEvent.php
tests/lib/Preview/GeneratorTest.php