Closed michaelherger closed 7 years ago
Thanks! I am using this now, and I hope it will make it upstream.
Using this now as well, +1 for upstream :)
Thanks @michaelherger
Could you move the logic to the Cache::save_file
function ?
I put it in the player code as I don't want to disable all (potential) file caching. It's really about caching the audio data. There could be other code using the cache. (FWICT there's none right now, is there?)
Yes save_file
is only for audio data, so it is fine to move it there
Ok, will update my change.
(argh... at some point I have to have a better strategy to separate my pro from my personal GitHub account...)
Hmm... credentials is using the same cache object all over the place. Not initializing cache for files only, but use it for credentials looks like a much more complicated change, dealing with multiple cache instances etc. Am I totally wrong?
BTW: is cache/default_cache even used anywhere?
My point was to make use_audio_cache
a field of Cache
rather than Config
, and move the if use_audio_cache
test into the save_file
method.
default_cache
is just some leftover from a previous implementation, I forgot to delete it. You can do it if you want
Take 2.
Awesome thanks !
Disable caching of downloaded audio files at runtime. Comes in handy when running librespot on a small device with SD card or other small storage.