Closed kz closed 9 years ago
@Feld0 @Lavoaster The functionality of caching is now implemented. File sizes for tracks are now stored in the filesize column of track_files.
In order to get everything up on the server once this is fully done:
php artisan migrate
php artisan rebuild:filesizes
(needs to be run before files are deleted so all file sizes are populated)
php artisan rebuild:track-cache
One missing thing is getting the dropdown to stay open after clicking a cached track without completely removing the dropdown's original behaviour (as e.preventDefault() does). Would it be possible for @Feld0 to work on this functionality?
Also, I'd appreciate it if I could get a code review this week before half term starts!
https://github.com/Poniverse/Pony.fm/tree/feature/cache_tracks
@kz I'll code-review #17 and look into fixing the dropdown. Thanks!
@kz I pushed a fix for the dropdown issue in b441a58. Turns out that an option for the behaviour we want was added to UI-Bootstrap for Bootstrap 3. I backported enough of the addition to make our dropdown work but moving to Bootstrap 3 is a worthy goal for this and other improvements.
Can you please implement track cache handling for playlists as well? They currently break if they contain a track with cached files. Aside from that, this is almost good to go! /)
@Feld0 Playlist caching now works! I'd suggest we do one final code review and I'll see if I can create seeders for local/testing/staging to make doubly sure that everything works.
This is done! Awesome work, @kz! This cut just over half of Pony.fm's disk space usage in production. :smiley:
Pony.fm currently stores all versions of a track indefinitely, but the OGG Vorbis and ALAC versions mostly sit idle; they're only used if someone requests them in a download.