From bc429125ec6eb657187583d669dbf7a286e885ec Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Thu, 6 Mar 2025 09:22:48 +0100 Subject: [PATCH] Chore: small textual changes --- music_assistant/helpers/audio.py | 8 +++++++- music_assistant/helpers/ffmpeg.py | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/music_assistant/helpers/audio.py b/music_assistant/helpers/audio.py index b184f596..ce06e561 100644 --- a/music_assistant/helpers/audio.py +++ b/music_assistant/helpers/audio.py @@ -81,9 +81,15 @@ class StreamCache: """ StreamCache. - Basic class to handle (temporary) in-memory caching of audio streams. + Basic class to handle (temporary) caching of audio streams. Useful in case of slow or unreliable network connections, faster seeking, or when the audio stream is slow itself. + + The cache is stored in a file on disk so ffmpeg can access it directly. + After 1 minute of inactivity, the cache file will be removed. + + Because we use /tmp as the cache location, and on our systems /tmp is mounted as tmpfs, + the cache will be stored in memory and not on the disk. """ @property diff --git a/music_assistant/helpers/ffmpeg.py b/music_assistant/helpers/ffmpeg.py index 72f26a14..0118b139 100644 --- a/music_assistant/helpers/ffmpeg.py +++ b/music_assistant/helpers/ffmpeg.py @@ -79,6 +79,8 @@ class FFMpeg(AsyncProcess): clean_args.append("") elif "/" in arg and "." in arg: clean_args.append("") + elif arg.startswith("/tmp/"): # noqa: S108 + clean_args.append("") elif arg.startswith("data:application/"): clean_args.append("") else: -- 2.34.1