aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Preview/Movie.php
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-02-24 14:42:55 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-02-24 14:42:55 +0100
commitebe731f01439d7a632c43a3994f2c0192e501ef0 (patch)
tree22a1c7741ccd20c9d424f7e580f06abcf730cfa6 /lib/private/Preview/Movie.php
parent6da8a6d62adde9b1ed011a7a18d43984cf5a27a8 (diff)
downloadnextcloud-server-ebe731f01439d7a632c43a3994f2c0192e501ef0.tar.gz
nextcloud-server-ebe731f01439d7a632c43a3994f2c0192e501ef0.zip
Fix typing in OC\Preview
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/Preview/Movie.php')
-rw-r--r--lib/private/Preview/Movie.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/private/Preview/Movie.php b/lib/private/Preview/Movie.php
index a6e424caa2a..1777f36b220 100644
--- a/lib/private/Preview/Movie.php
+++ b/lib/private/Preview/Movie.php
@@ -99,11 +99,14 @@ class Movie extends ProviderV2 {
foreach ($sizeAttempts as $size) {
$absPath = $this->getLocalFile($file, $size);
- $result = $this->generateThumbNail($maxX, $maxY, $absPath, 5);
- if ($result === null) {
- $result = $this->generateThumbNail($maxX, $maxY, $absPath, 1);
+ $result = null;
+ if (is_string($absPath)) {
+ $result = $this->generateThumbNail($maxX, $maxY, $absPath, 5);
if ($result === null) {
- $result = $this->generateThumbNail($maxX, $maxY, $absPath, 0);
+ $result = $this->generateThumbNail($maxX, $maxY, $absPath, 1);
+ if ($result === null) {
+ $result = $this->generateThumbNail($maxX, $maxY, $absPath, 0);
+ }
}
}