aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Preview/Generator.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Preview/Generator.php')
-rw-r--r--lib/private/Preview/Generator.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/private/Preview/Generator.php b/lib/private/Preview/Generator.php
index 2be08d1b2c4..6e1e0997a68 100644
--- a/lib/private/Preview/Generator.php
+++ b/lib/private/Preview/Generator.php
@@ -4,7 +4,8 @@
*
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Elijah Martin-Merrill <elijah@nyp-itsours.com>
- * @author John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
+ * @author J0WI <J0WI@users.noreply.github.com>
+ * @author John Molakvoæ <skjnldsv@protonmail.com>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Robin Appelman <robin@icewind.nl>
* @author Roeland Jago Douma <roeland@famdouma.nl>
@@ -19,14 +20,13 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
-
namespace OC\Preview;
use OCP\Files\File;
@@ -224,6 +224,7 @@ class Generator {
$previewProviders = $this->previewManager->getProviders();
foreach ($previewProviders as $supportedMimeType => $providers) {
+ // Filter out providers that does not support this mime
if (!preg_match($supportedMimeType, $mimeType)) {
continue;
}
@@ -238,8 +239,8 @@ class Generator {
continue;
}
- $maxWidth = (int)$this->config->getSystemValue('preview_max_x', 4096);
- $maxHeight = (int)$this->config->getSystemValue('preview_max_y', 4096);
+ $maxWidth = $this->config->getSystemValueInt('preview_max_x', 4096);
+ $maxHeight = $this->config->getSystemValueInt('preview_max_y', 4096);
$preview = $this->helper->getThumbnail($provider, $file, $maxWidth, $maxHeight);