diff options
author | Pauli Järvinen <pauli.jarvinen@gmail.com> | 2025-01-06 12:41:28 +0200 |
---|---|---|
committer | Pauli Järvinen <pauli.jarvinen@gmail.com> | 2025-01-06 12:51:40 +0200 |
commit | b165523589a6151003a657efd01d61c8386221b8 (patch) | |
tree | 461275e6e77c8378bbbfcdb436a2807482036320 | |
parent | 92acfefb3fd4f51c1f07c0aa17b272330a8fbadc (diff) | |
download | nextcloud-server-b165523589a6151003a657efd01d61c8386221b8.tar.gz nextcloud-server-b165523589a6151003a657efd01d61c8386221b8.zip |
fix(preview): Do not try to parse M3U files as MP3Fix/mp3_regex
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>
-rw-r--r-- | lib/private/PreviewManager.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/PreviewManager.php b/lib/private/PreviewManager.php index c8ef2fac8f3..8417554566e 100644 --- a/lib/private/PreviewManager.php +++ b/lib/private/PreviewManager.php @@ -343,7 +343,7 @@ class PreviewManager implements IPreview { $this->registerCoreProvider(Preview\XBitmap::class, '/image\/x-xbitmap/'); $this->registerCoreProvider(Preview\WebP::class, '/image\/webp/'); $this->registerCoreProvider(Preview\Krita::class, '/application\/x-krita/'); - $this->registerCoreProvider(Preview\MP3::class, '/audio\/mpeg/'); + $this->registerCoreProvider(Preview\MP3::class, '/audio\/mpeg$/'); $this->registerCoreProvider(Preview\OpenDocument::class, '/application\/vnd.oasis.opendocument.*/'); $this->registerCoreProvider(Preview\Imaginary::class, Preview\Imaginary::supportedMimeTypes()); $this->registerCoreProvider(Preview\ImaginaryPDF::class, Preview\ImaginaryPDF::supportedMimeTypes()); |