CappielloAntonio / tempo

An open source and lightweight music client for Subsonic, designed and built natively for Android.
GNU General Public License v3.0
865 stars 39 forks source link

[WIP] Cache streaming contents #190

Closed kmod-midori closed 1 month ago

kmod-midori commented 3 months ago

Try to cache streaming contents (including transcoding responses), there are still rough edges to finish.

The current implementation removes cached data if the response stream is never read to EOF and does not have a Content-Length (this covers both raw files with a known length and transcoded responses). Estimating content length might mess with this functionality, more testing is required.

CappielloAntonio commented 1 month ago

Hi @kmod-midori, I would like to thank you with all my heart for this contribution. This is a significant improvement that I've been thinking about adding for quite some time. Thank you on my behalf and on behalf of all those people who use the app every day. If you decide to contribute further to the app I would be truly grateful. Thank you again!

kmod-midori commented 1 month ago

This is not very stable, but certainly has worked for me for long enough. Feel free to do more testing and modifications :)