summaryrefslogtreecommitdiffstats
path: root/lib/private/Preview
Commit message (Collapse)AuthorAgeFilesLines
* Lower failed movie preview to infoGit'Fellow2024-02-101-1/+1
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* fix(preview): Check if node id is null before deleting the preview folderMarcel Müller2024-01-221-0/+3
| | | | Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
* Us strpos() onlyGit'Fellow2023-11-161-9/+3
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Check for open_basedir before reading /procGit'Fellow2023-11-161-2/+14
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* Merge pull request #41231 from nextcloud/backport/40819/stable27Arthur Schiwon2023-11-151-1/+1
|\ | | | | [stable27] Catch Imaginary processing errors
| * Use \Throwable insteadGit'Fellow2023-11-011-1/+1
| | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
| * Catch Imaginary processing errorsGit'Fellow2023-11-011-1/+1
| | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* | fix semaphore unguardingSimon L2023-11-051-4/+4
|/ | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* Don't pass invalid streams to ImaginaryGit'Fellow2023-10-291-0/+3
| | | | | | | | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Update Imaginary.php Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> Update Imaginary.php Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* also remove functionDaniel Hansson2023-10-091-19/+0
| | | Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
* Generate all preview sizes for ImaginaryDaniel Hansson2023-10-091-17/+0
| | | | | | | | | | | A follow up on https://github.com/nextcloud/server/pull/40670 Based on discussions here: https://github.com/nextcloud/server/issues/38911#issuecomment-1741819188 This fixes the case were not all previews are generated, for example in the activity view: https://github.com/nextcloud/server/issues/38911#issuecomment-1738886106 Signed-off-by: Daniel Hansson <mailto@danielhansson.nu>
* log imaginary errors as info to not spam the server logsSimon L2023-08-101-2/+2
| | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* fix: catch errors in id3parser libraryDaniel Kesselberg2023-05-301-2/+13
| | | | | | | | We use a forked version of getID3 to read embedded images from mp3 files to use them as previews. If the library is unable to extract a image or fails on something different we should handle it properly. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Merge pull request #36692 from ↵Simon L2023-05-171-0/+4
|\ | | | | | | | | nextcloud/throw-exception-to-avoid-division-by-zero fix(preview-generator): Throw exception before dividing by zero when generating previews
| * fix(preview-generator): Throw exception before dividing by zero when ↵Thomas Citharel2023-02-131-0/+4
| | | | | | | | | | | | | | | | | | generating previews If the maximum preview generated gives some kind of invalid IImage, it's dimentions and filename can be set to zero. And then later we do a division by zero to keep the aspect ratio of the previews. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
* | Fix typos in lib/public subdirectorySimon L2023-05-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Found via `codespell -q 3 -S l10n -L jus ./lib/public` Signed-off-by: luz paz <luzpaz@github.com> Update lib/public/Accounts/IAccount.php Signed-off-by: luz paz <luzpaz@github.com> Signed-off-by: Simon L <szaimen@e.mail.de> Co-Authored-By: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
* | Merge pull request #37148 from nextcloud/enh/noid/increase-imaginary-timeoutsSimon L2023-05-041-0/+2
|\ \ | | | | | | increase imaginary timeouts as for big files the processing could take very long
| * | increase imaginary timeouts as for big files the processing could take very longSimon L2023-03-091-0/+2
| | | | | | | | | | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* | | Merge branch 'master' into enh/type-iconfig-getter-callsCôme Chilliet2023-04-202-93/+51
|\ \ \ | | | | | | | | Signed-off-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com>
| * \ \ Merge pull request #37772 from nextcloud/enh/30986/follow-upSimon L2023-04-181-0/+4
| |\ \ \ | | | | | | | | | | Prevent the OpenDocument preview generator from trying to open empty files
| | * | | fix php-lintSimon L2023-04-171-1/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Simon L <szaimen@e.mail.de>
| | * | | Update lib/private/Preview/Bundled.phpClaus-Justus Heine2023-04-171-1/+1
| | | | | | | | | | | | | | | Co-authored-by: Carl Schwan <carl@carlschwan.eu>
| | * | | Prevent the OpenDocument preview generator from trying to open empty files.Claus-Justus Heine2023-04-171-0/+5
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | Rationale: does not make sense, and triggers a deprecation error in \ZipArchive. Signed-off-by: Claus-Justus Heine <himself@claus-justus-heine.de>
| * | | try to make linters happyGlandos2023-04-171-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
| * | | gather code from small and max previewGlandos2023-04-171-90/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | use directory listing in both functions to gain 25% speed on run where every preview already exist. Signed-off-by: Glandos <bugs-github@antipoul.fr>
| * | | Revert 0e49b40Glandos2023-04-171-3/+0
| | | | | | | | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
| * | | improve parameter docGlandos2023-04-171-1/+1
| | | | | | | | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
| * | | Ensure max preview image is not nullGlandos2023-04-171-0/+3
| | | | | | | | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
| * | | php-cs-fixGlandos2023-04-171-1/+1
| | | | | | | | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
| * | | List preview directory only onceGlandos2023-04-171-5/+13
| |/ / | | | | | | | | | | | | | | | getCachedPreview used to call `getFile`, and this calls `getDirectoryListing` (or underlying function that list directory) to find the file. This was done for every preview spec. Now, this is done only once at the beginning of the loop, and the array is just iterated when needed to find the correct entry. Signed-off-by: Glandos <bugs-github@antipoul.fr>
* / / Use typed version of IConfig::getSystemValue as much as possibleCôme Chilliet2023-04-051-2/+2
|/ / | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | imaginary - fix autorotate and improve the logicSimon L2023-03-091-33/+32
| | | | | | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* | fix indent 2Glandos2023-02-161-7/+7
| | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
* | fix indentGlandos2023-02-151-8/+8
| | | | | | Signed-off-by: Glandos <bugs-github@antipoul.fr>
* | Use proc_open to avoid spawning a shellGlandos2023-02-151-10/+17
| | | | | | | | | | | | The use of `exec` will spawn a shell, using `/bin/sh` on POSIX platforms. But in restricted environment, such as AppArmor, this means giving execution to `/bin/sh`, which renders the execution restriction quite useless. Using an array with `proc_open` reduces this, and paved the way for file streaming instead of temporary file. Signed-off-by: Glandos <bugs-github@antipoul.fr>
* | cache formats supported by imagickRobin Appelman2023-02-131-0/+40
|/ | | | | | turns out this can be quite slow Signed-off-by: Robin Appelman <robin@icewind.nl>
* imaginary - allow to generate heif, pdf and svg thumbnailsSimon L2023-02-081-18/+45
| | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* imaginary - add tiff to supported formatsSimon L2023-01-251-1/+1
| | | | Signed-off-by: Simon L <szaimen@e.mail.de>
* composer run cs:fixCôme Chilliet2023-01-206-6/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* docs: add description how BackgroundCleanupJob.getNewPreviewLocations worksDaniel Kesselberg2023-01-031-0/+15
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Fix psalm spotted errors with new requirementsCôme Chilliet2023-01-021-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* preview: fix HEIC orientationVarun Patil2022-12-081-0/+3
| | | | Signed-off-by: Varun Patil <varunpatil@ucla.edu>
* Use TimedJob from OCP instead of OCCôme Chilliet2022-12-051-3/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* preview: respect quality in ImaginaryVarun Patil2022-12-031-0/+3
| | | | Signed-off-by: Varun Patil <varunpatil@ucla.edu>
* Fix distorted previews when using imaginaryRichard Steinmetz2022-11-111-4/+14
| | | | Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* Limit-number-of-concurrent-preview-generationsszaimen2022-11-051-20/+125
| | | | | Signed-off-by: Bowen Ding <dbw9580@live.com> Signed-off-by: szaimen <szaimen@e.mail.de>
* Emit typed event when preview is requestedJulius Härtl2022-10-271-9/+12
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Save getting the parent node when generating the previewJulius Härtl2022-08-241-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Use Image class from public APIChristopher Ng2022-06-0211-11/+11
| | | | Signed-off-by: Christopher Ng <chrng8@gmail.com>
* Merge pull request #32410 from nextcloud/bugfix/noid/imaginary-exceptionJohn Molakvoæ2022-05-201-2/+7
|\