Skip to content

Commit

Permalink
fix(preview): Do not try to parse M3U files as MP3
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
paulijar authored and backportbot[bot] committed Jan 7, 2025
1 parent d2b2c24 commit 6baaa61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/private/PreviewManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ protected function registerCoreProviders() {
$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());

Expand Down

0 comments on commit 6baaa61

Please sign in to comment.