[GH-ISSUE #505] Split the cache in two directories : audio files & the rest #320

Closed
opened 2026-02-27 19:29:59 +03:00 by kerem · 2 comments
Owner

Originally created by @LaurentLouf on GitHub (Jul 24, 2020).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/505

Hello,

This is more a feature request than an issue. Would it be possible to split the cache into two categories : the audio cache and the cache for credentials and settings ? What is the use case ? I'm using librespot on a Raspberry Pi and to preserve the SD card, I have created a tmpfs that I'm using for the cache, so the whole cache is in RAM and gets erased after each reboot. I don't mind that for audio files, but that would be nice to be able to preserve the credentials and the volume setting, by using a second directory to cache those files.

So the idea would be :

  • add another option to the script to define cache for credentials and volume
  • if not present, use the directory for the cache if specified (user defined cache with the "historic" cache option or default cache location, or no cache if option to disable cache specified)

Well, all things considered, I might give a go to a PR even if it would my first time writing Rust

Originally created by @LaurentLouf on GitHub (Jul 24, 2020). Original GitHub issue: https://github.com/librespot-org/librespot/issues/505 Hello, This is more a feature request than an issue. Would it be possible to split the cache into two categories : the audio cache and the cache for credentials and settings ? What is the use case ? I'm using librespot on a Raspberry Pi and to preserve the SD card, I have created a tmpfs that I'm using for the cache, so the whole cache is in RAM and gets erased after each reboot. I don't mind that for audio files, but that would be nice to be able to preserve the credentials and the volume setting, by using a second directory to cache those files. So the idea would be : - add another option to the script to define cache for credentials and volume - if not present, use the directory for the cache if specified (user defined cache with the "historic" cache option or default cache location, or no cache if option to disable cache specified) Well, all things considered, I might give a go to a PR even if it would my first time writing Rust
kerem 2026-02-27 19:29:59 +03:00
Author
Owner

@ashthespy commented on GitHub (Jul 25, 2020):

This is actually already halfway there. The main cache path is used to dump things like credentials.json and volume, while the audio is dumped into a files subdirectory. But I agree, would be nice to make it explicit.

<!-- gh-comment-id:663821104 --> @ashthespy commented on GitHub (Jul 25, 2020): This is actually already halfway there. The main cache path is used to dump things like `credentials.json` and `volume`, while the audio is dumped into a `files` subdirectory. But I agree, would be nice to make it explicit.
Author
Owner

@LaurentLouf commented on GitHub (Jul 25, 2020):

Yes, didn't seem too much of trouble to make a PR even with zero knowledge of Rust, so I'm trying to make it work on my end and I'll create the PR (hopefully it will compile this time)

<!-- gh-comment-id:663845636 --> @LaurentLouf commented on GitHub (Jul 25, 2020): Yes, didn't seem too much of trouble to make a PR even with zero knowledge of Rust, so I'm trying to make it work on my end and I'll create the PR (hopefully it will compile this time)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#320
No description provided.