[StoreRemoteMedia] Fix failing to show remote thumbnails on first load

imgPath onCreateFileImageThumbnailSource would throw FileNotFoundException
This commit is contained in:
2021-04-12 22:42:45 +01:00
parent 0eb96d4805
commit 761ce7fd81
3 changed files with 26 additions and 33 deletions

View File

@@ -159,6 +159,7 @@ class StoreRemoteMediaPlugin extends Plugin
}
}
$ft = null;
if ($this->store_original) {
try {
// Update our database for the file record
@@ -194,9 +195,12 @@ class StoreRemoteMediaPlugin extends Plugin
}
// Out
$imgPath = $file->getPath();
return !file_exists($imgPath);
try {
$imgPath = $file->getFileOrThumbnailPath($ft);
return !file_exists($imgPath);
} catch (Exception $e) {
return true;
}
}
/**