ankitects / ankitects/anki

macOS audio playback triggers Quick Look thumbnail cache writes

Offen
#5,493 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Rust
Sterne
30.5k
Forks
3.2k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

## Problem

On macOS, playing audio during card review appears to trigger `com.apple.quicklook.ThumbnailsAgent` to inspect Anki media files and write Quick Look thumbnail cache data, even though the user is only playing audio and is not previewing the file in Finder.

This has been observed with Anki audio media such as MP3 files. The resulting writes include Quick Look thumbnail cache files, and repeated audio playback causes the cumulative disk writes to increase substantially.

## Expected behavior

Playing an audio attachment in Anki should decode and play the audio without requesting a Quick Look thumbnail for the source media file.

## Environment

- macOS on Apple Silicon
- Anki desktop macOS client
- Audio files stored in the collection media directory
- Reproduced while reviewing cards and triggering audio playback

## Investigation

The existing macOS path-based mpv player sends the absolute media path to mpv via `loadfile`. The path is visible in filesystem activity around the Quick Look thumbnail service and the audiovisual thumbnail extension.

The proposed PR changes audio playback to stream the media bytes to mpv via stdin (`mpv -- -`), while leaving video playback unchanged. This is intended to preserve playback while avoiding exposure of the collection media path to the macOS media/thumbnail pipeline.

Issue for discussion before merging: https://github.com/ankitects/anki/pull/5492

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.