BeetPlayer2 and Qt6-Multimedia

Well, recently I noticed that BeetPlayer2 would stop playing in shuffle mode. At first glance it was completely random. Sometimes it would play 5 songs, sometimes not even 1. After several hours of tedious debugging I eventually found out that it is a bug in Qt6-Multimedia (6.9), specifically the ffmpeg-backend. It prevents mp3-files with mjpeg-covers from playing without jumping through hoops. Since a fix is available, I tried to apply it to the official PKGBUILD of Qt6-Multimedia. It was surprisingly easy…

First, download the fix and add the diff to the source array in the PKGBUILD:

source=(git+https://code.qt.io/qt/$_pkgfn#tag=v$_pkgver 58c2dbe.diff)

Then regenerate the checksums with makepkg -g >> PKGBUILD and remove the old checksum array. Next, add prepare() to actually apply the patch:

prepare() {
  cd $_pkgfn
  patch -Np1 -i ../58c2dbe.diff
}

Don’t forget to bump pkgrel before building the packages with makepkg -s

When done, install them with pacman -U and enjoy uninterrupted playback!