phishin
phishin copied to clipboard
Download entire shows in a Zip file
I prefer to download locally instead of streaming.
It's possible to do this track by track.
It'd be more convenient to be able to download an entire show or set as a Zip file with one click.
Possible implementations:
- Zip on demand. Benefits: no need to pre-zip nor update zip when tracks change. No need to store zipped shows (which would double storage requirements). Could support dynamic bundling by set or playlist vs just entire show.
- Zip ahead of time: Benefits: less compute required over time, easier to cache.
Playlists/shows as zipfiles was a feature in the initial release but I dropped it because it was inefficient/slow (it was synchronous) and used infrequently. This could be re-added as an async job but it would require adding Sidekiq or other background task processing, which would also require Redis. Due to these requirements I don't think it belongs on the primary roadmap at this time. Downloading tracks by batch could easily be done via the API and in parallel, obviating the need for zipping/unzipping.
If someone wants to take a crack at a browser-based track download feature, I'd be open to that, but at this point I'm hesitant to add it as a backend feature. Frontend implementation would likely be easier if using React, which is started at https://github.com/jcraigk/phishin/pull/325
It's worth noting that CloudFlare does a ton of heavy lifting as far as caching MP3s at the edge, and for free. This is basically what allows phish.in to keep running, otherwise it would get crushed by traffic or someone would have to pay a big S3/CloudFront bill for file transfers. This edge cache (accessing MP3s directly by their URL) should be utilized as much as possible by all client requests, whether the client is interested in a single file or many.
A "download all" button which effectively just triggered downloads of all individual tracks separately would be just fine.