aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/PreviewManager.php
Commit message (Collapse)AuthorAgeFilesLines
* fix(preview): Do not try to parse M3U files as MP3Fix/mp3_regexPauli Järvinen2025-01-061-1/+1
| | | | | | | | | | | | By default, the MP3 audio files get the mimetype `audio/mpeg` and the M3U and M3U8 playlist files get the mimetype `audio/mpegurl`. PreviewManager had such a problem that it registered the MP3 preview provider with a regular expression which matched also the M3U files. This caused an error message to be logged on the info (1) level for each M3U file every time a folder with such files was viewed: "Error while getting cover from mp3 file: File /path/to/some/playlist.m3u is not mpeg/audio!". Signed-off-by: Pauli Järvinen <pauli.jarvinen@gmail.com>
* chore(deps): Bump nextcloud/coding-standard in /vendor-bin/cs-fixerdependabot/composer/vendor-bin/cs-fixer/nextcloud/coding-standard-1.3.2dependabot[bot]2024-10-191-10/+10
| | | | | | | | | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 1.3.1 to 1.3.2. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v1.3.1...v1.3.2) --- updated-dependencies: - dependency-name: nextcloud/coding-standard dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: provokateurin <kate@provokateurin.de>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-191-1/+1
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-251-1/+1
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* feat(preview): move previews for imaginary pdf to own class ImaginaryPDFernolf2024-07-251-0/+1
| | | | | | Signed-off-by: ernolf <raphael.gradenwitz@googlemail.com> Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix(preview): don't create folder structure when previews are disabledDaniel Kesselberg2024-06-181-4/+17
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-241-27/+4
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix(preview): check mime type before processing with ImagickVarun Patil2024-04-081-3/+3
| | | | Signed-off-by: Varun Patil <varunpatil@ucla.edu>
* fix: use png as preview right awayDaniel Kesselberg2023-11-131-21/+40
| | | | | | | | | | The initial office preview implementation converted an office document with LibreOffice to PDF, used ImageMagick to extract the first page as JPEG, and passed it OC_Image. https://github.com/nextcloud/server/pull/10198 changed the implementation to use PNG rather than PDF. OC_Image can use a PNG as a preview right away, so the ImageMagick step is unnecessary. The registration code was updated to not ask ImageMagick if PDF is supported, as PDFs are no longer used to create office document previews. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* feat: add preview provider for emf files based on officeDaniel Kesselberg2023-11-131-0/+1
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* fix!: Remove legacy event dispatching Symfony's GenericEventJoas Schilling2023-07-271-5/+0
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Adapt tests to config value typingCôme Chilliet2023-04-051-3/+3
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use typed version of IConfig::getSystemValue as much as possibleCôme Chilliet2023-04-051-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* cache formats supported by imagickRobin Appelman2023-02-131-6/+8
| | | | | | turns out this can be quite slow Signed-off-by: Robin Appelman <robin@icewind.nl>
* Update lib/private/PreviewManager.php William2023-01-181-2/+1
| | | | | | fix lint issue Co-authored-by: Simon L. <szaimen@e.mail.de> Signed-off-by: William <william.hak57@gmail.com>
* Update PreviewManager.phpWilliam2023-01-181-3/+8
| | | | | | add a check in config.php for a configured movieBinary path. so now it first checks in config.php if preview_ffmpeg_path is configured. Signed-off-by: William <william.hak57@gmail.com>
* Limit-number-of-concurrent-preview-generationsszaimen2022-11-051-1/+9
| | | | | 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-10/+15
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Fix FFMPEG preview managerJoas Schilling2022-09-201-3/+3
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Move findBinaryFinder and isFunctionEnabled away from OC_HelperCarl Schwan2022-08-231-74/+39
| | | | | | | | | | | | findBinaryFinder is now a service that is still private but with some minor optimization (remove the hasKey check). isFunctionEnabled is now in OCP\Util Both function are still keep but all internal usage in nextcloud/server were migrated to the new usage, so that we can remove it in 26 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Send images to imaginary docker to generate previewsVincent Petry2022-03-171-0/+1
| | | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu> Co-Authored-by: Vincent Petry <vincent@nextcloud.com>
* Use findBinaryPath for previewsJ0WI2021-10-231-27/+20
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Move preview provider registration to bootstrapRoeland Jago Douma2021-10-211-1/+52
| | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #28077 from nextcloud/heicPerformanceJulius Härtl2021-07-211-2/+1
|\
| * Disable HEIC image preview provider for performance concernstobiasKaminsky2021-07-211-2/+1
| | | | | | | | Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
* | Update php licensesJohn Molakvoæ (skjnldsv)2021-06-041-1/+0
|/ | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add SGI and TGA preview supportJohn Molakvoæ (skjnldsv)2021-01-221-1/+3
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add support for webpRoeland Jago Douma2021-01-191-1/+3
| | | | | | | | | Including handling in OC_Image But also a preview provider Of course only works if your php actually supports webp Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Format code to a single space around binary operatorsChristoph Wurst2020-10-051-8/+8
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix "misplaced variables" warning of Psalm in PHPDoc statementsMorris Jobke2020-08-171-1/+0
| | | | | | Ref #21787 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headers for 19Christoph Wurst2020-04-291-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20422 from ↵Christoph Wurst2020-04-101-1/+1
|\ | | | | | | | | nextcloud/techdebt/format-control-structs-classes-methods Format control structures, classes, methods and function
| * Format control structures, classes, methods and functionChristoph Wurst2020-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Merge pull request #19495 from nextcloud/preview-generate-batchRoeland Jago Douma2020-04-101-13/+31
|\ \ | |/ |/| optimize batch generation of previews
| * allow generating multiple preview sizes for a single file at onceRobin Appelman2020-04-091-13/+31
| | | | | | | | | | | | this saves having to do some of the overhead multiple times Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Add preview provider for Krita filesJulius Härtl2020-04-081-1/+3
| | | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Extract preview from opendocument filesJulius Härtl2020-04-081-0/+2
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update license headersChristoph Wurst2019-12-051-1/+3
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Some php-cs fixesRoeland Jago Douma2019-11-221-0/+1
| | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove deprecated function createPreviewRoeland Jago Douma2019-09-151-28/+0
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Allow IProviderV2 for previews as wellJohn Molakvoæ (skjnldsv)2019-07-051-4/+9
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Add new Provider interface for preview providersRobin Appelman2019-06-171-1/+1
| | | | | | | | | the main difference is passing the `File` object to the provider instead of a `View` + path Old providers will still continue to work as before Signed-off-by: Robin Appelman <robin@icewind.nl>
* Allow the creationg of previews of files stored in appdataRoeland Jago Douma2018-10-081-1/+2
| | | | | | | To allow us to create previews of files stored in appdata we need to construct the view differently. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Develop HEIC/HEIF preview support #7406Sebastian Steinmetz2018-08-111-0/+3
| | | Signed-off-by: Sebastian Steinmetz <me@sebastiansteinmetz.ch>
* Use ::class statement instead of stringMorris Jobke2018-01-291-31/+31
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Remove unneeded semicolon and parenthesesMorris Jobke2018-01-261-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Improve OC_Image code to not guess the type of input, but actually request ↵Morris Jobke2018-01-181-1/+3
| | | | | | | | the specific methods to be called Followup to #7836 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Update license headersMorris Jobke2017-11-061-0/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add PHPDocMorris Jobke2017-05-021-1/+2
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Rewrite old preview endpoint for PreviewManagerRoeland Jago Douma2017-01-041-3/+21
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>