nextcloud / previewgenerator

Nextcloud app to do preview generation in the background.
https://apps.nextcloud.com/apps/previewgenerator
GNU Affero General Public License v3.0
449 stars 55 forks source link

Use `isAvailable()` instead of `isMimeSupported()`? #468

Open jonnykl opened 2 months ago

jonnykl commented 2 months ago

First I have to note that I didn't work with the Nextcloud code or the code of any of its apps. Maybe I just don't unterstand things right.

The drawio app always returns the supported mimetypes and returns false in the isAvailable() function if previews are disabled in the settings. Therefore it might be better to use that function instead of isMimeSupported() to check whether a preview should be generated or not (assuming the way the drawio app is implemented is correct)?

Code references:

st3iny commented 1 month ago

I had a look at the code and don't quite understand the use case yet. Could you please explain what exactly is broken or doesn't work by using isMimeSupported()?