Add media controls and covers, and update the license #1

Merged
GrumpyStraw merged 2 commits from mpris-and-covers into main 2026-10-10 22:10:07 +02:00
Owner

Two commits: media controls and covers, then the license update.

Media controls (MPRIS)

  • The Plasma Media Player widget, the lock screen and the media keys show the current song and control playback (src/mpris.cpp).
  • The Flatpak may own org.mpris.MediaPlayer2.app.strawly.music.
  • The cover goes to the widget as a file in the cache folder, deleted on quit.

Covers

  • Song rows and the player bar show the cover embedded in each file, read with libavformat on QML's image thread (src/coverart.cpp, src/coverprovider.cpp).
  • A playlist icon shows the covers of its first four songs with different covers, one cover when it has fewer, or its letter tile when it has none.
  • ffmpeg is a new build dependency.

Fixes

  • Startup freeze: the hidden All Music list created all 1749 rows at startup. It now creates only the rows on screen, and the main thread is idle 0.4 s after launch.
  • Play and Shuffle: on a playlist row, they now also open that playlist in the second column.
  • Startup messages: Qt's hardware video probe is skipped, which removes "Failed to open VDPAU backend", and the FFmpeg version line is hidden.

Other changes

  • The app ID is now app.strawly.music.
  • LICENSE.md matches https://strawly.app/license-text.html, without the internal use grant.
  • The README lists the LGPL libraries, and their texts are in LICENSES/.

Tested

  • tst_coverart covers MP3, FLAC, M4A, Opus, a front cover stored after a back cover, and a FLAC file named .mp3.
  • Builds with strict warnings, qmllint and both test suites are clean.
  • The MPRIS methods and properties were checked over D-Bus on a private session bus.
  • The Flatpak was not built, because flatpak-builder isn't installed.

To check when reviewing

  • The Plasma repeat button: the app has no repeat-one mode, so Repeat Track turns repeat off.
  • Covers in playlist pages, and a playlist icon after editing that playlist.
Two commits: media controls and covers, then the license update. ## Media controls (MPRIS) - The Plasma Media Player widget, the lock screen and the media keys show the current song and control playback (`src/mpris.cpp`). - The Flatpak may own `org.mpris.MediaPlayer2.app.strawly.music`. - The cover goes to the widget as a file in the cache folder, deleted on quit. ## Covers - Song rows and the player bar show the cover embedded in each file, read with `libavformat` on QML's image thread (`src/coverart.cpp`, `src/coverprovider.cpp`). - A playlist icon shows the covers of its first four songs with different covers, one cover when it has fewer, or its letter tile when it has none. - `ffmpeg` is a new build dependency. ## Fixes - **Startup freeze:** the hidden All Music list created all 1749 rows at startup. It now creates only the rows on screen, and the main thread is idle 0.4 s after launch. - **Play and Shuffle:** on a playlist row, they now also open that playlist in the second column. - **Startup messages:** Qt's hardware video probe is skipped, which removes "Failed to open VDPAU backend", and the FFmpeg version line is hidden. ## Other changes - The app ID is now `app.strawly.music`. - `LICENSE.md` matches https://strawly.app/license-text.html, without the internal use grant. - The README lists the LGPL libraries, and their texts are in `LICENSES/`. ## Tested - `tst_coverart` covers MP3, FLAC, M4A, Opus, a front cover stored after a back cover, and a FLAC file named `.mp3`. - Builds with strict warnings, qmllint and both test suites are clean. - The MPRIS methods and properties were checked over D-Bus on a private session bus. - The Flatpak was not built, because `flatpak-builder` isn't installed. ## To check when reviewing - The Plasma repeat button: the app has no repeat-one mode, so Repeat Track turns repeat off. - Covers in playlist pages, and a playlist icon after editing that playlist.
- MPRIS: the Plasma Media Player widget, the lock screen and the media
  keys show the current song with its cover and control playback. The
  Flatpak may own org.mpris.MediaPlayer2.app.strawly.music for this.
  Clients load covers from a file, so the current cover is saved in the
  cache folder and deleted on quit.
- Songs show the cover embedded in their file, read with libavformat on
  QML's image thread. Naming the format from the file extension skips
  FFmpeg's probing, which took 4 ms per MP3 against 0.1 ms without it.
  The player bar shows the current song's cover.
- A playlist shows the covers of its first four songs with different
  covers, or one cover when it has fewer than four.
- Fix a startup freeze of several seconds. StackLayout left the hidden
  All Music list at its full content height, so it created a row for
  every song: 1749 rows and 25,056 Kirigami theme objects. Both views
  now fill the page and only their visibility changes.
- Play and Shuffle in the playlist list also open that playlist in the
  second column.
- Skip Qt's hardware video probe, which printed "Failed to open VDPAU
  backend", and hide the FFmpeg version line at startup.
- Rename the app ID from app.strawly.Music to app.strawly.music.
- Test cover reading from MP3, FLAC, M4A and Opus fixtures.
- README covers the media controls, covers, permissions and the ffmpeg
  build dependency. MPRIS and the All Music view are done on the roadmap.
- LICENSE.md now matches the Strawly license at
  https://strawly.app/license-text.html, without the Additional
  Permission for internal use. It adds the summary header and the
  longer payment and donation clause, and names Strawly as Licensor.
- The metainfo license link points to LICENSE.md instead of the
  homepage.
- README lists the LGPL libraries the app links (Qt, Kirigami,
  qqc2-desktop-style, FFmpeg) and warns that a binary built against
  Arch's GPL FFmpeg must not be handed out under the Strawly license.
- LICENSES/ holds the LGPL-2.1, LGPL-3.0 and GPL-3.0 texts, installed
  with the app under share/licenses/app.strawly.music.
GrumpyStraw deleted branch mpris-and-covers 2026-10-10 22:10:07 +02:00
Sign in to join this conversation.
No description provided.