Chore: small textual changes
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Thu, 6 Mar 2025 08:22:48 +0000 (09:22 +0100)
committerMarcel van der Veldt <m.vanderveldt@outlook.com>
Thu, 6 Mar 2025 08:22:48 +0000 (09:22 +0100)
music_assistant/helpers/audio.py
music_assistant/helpers/ffmpeg.py

index b184f59696f1c2bf51d0ed666411b706500ec707..ce06e561b7d9ae16ecd1b72c2ec65e80aa146cfd 100644 (file)
@@ -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
index 72f26a14ae0f7e35567e968cd49fb6133f8dd876..0118b1399c2784856195f1b1adf84574440adb49 100644 (file)
@@ -79,6 +79,8 @@ class FFMpeg(AsyncProcess):
                 clean_args.append("<URL>")
             elif "/" in arg and "." in arg:
                 clean_args.append("<FILE>")
+            elif arg.startswith("/tmp/"):  # noqa: S108
+                clean_args.append("<CACHE>")
             elif arg.startswith("data:application/"):
                 clean_args.append("<DATA>")
             else: