learningequality / ka-lite

KA Lite: lightweight web server for serving core Khan Academy content (videos and exercises) without needing internet connectivity
https://learningequality.org/ka-lite/
Other
457 stars 304 forks source link

Static files from content packs served from CONTENT_ROOT #5386

Closed benjaoming closed 7 years ago

benjaoming commented 7 years ago

Summary

TODO

If not all TODOs are marked, this PR is considered WIP (work in progress)

Reviewer guidance

Let me know if you find anything unacceptable here. New static files handing will be described in release notes.

Issues addressed

5073

codecov-io commented 7 years ago

Current coverage is 51.82% (diff: 40.00%)

Merging #5386 into develop will increase coverage by 0.14%

@@            develop      #5386   diff @@
==========================================
  Files           143        143          
  Lines          7516       7491    -25   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits           3884       3882     -2   
+ Misses         3632       3609    -23   
  Partials          0          0          

Powered by Codecov. Last update 4aa06af...2d1ea12

benjaoming commented 7 years ago

Alright, seems it was just a matter of moving srt/ from STATIC_ROOT to CONTENT_ROOT in the unpacking process and then the annotation process.

benjaoming commented 7 years ago

Since the .srt files are now handled in CONTENT_ROOT, there's no need to update the folders served by the dev server, cherrypy or Nginx. Users having setup other mechanisms for serving these folders will also not be affected. This is great :)

benjaoming commented 7 years ago

Tested after reinstalling the English content pack that subtitles are still working

screenshot from 2017-01-17 21-38-03