Show Blender Foundation videos by default

* Finishes the saved torrents feature!
* Torrents load and save correctly. Poster is autogenerated only once.
* Torrents can be paused and restarted
* Download button indicates state:
 - White means paused
 - Pulsating green means downloading
 - Solid green means finished downloading, only seeding
This commit is contained in:
DC
2016-03-07 01:34:44 -08:00
parent 904d3a6c4b
commit 4b890ee9f6
10 changed files with 247 additions and 137 deletions

View File

@@ -1,3 +1,6 @@
var os = require('os')
var path = require('path')
var config = require('../config')
module.exports = {
@@ -44,5 +47,31 @@ module.exports = {
*/
saved: {
torrents: []
},
/* If the saved state file doesn't exist yet, here's what we use instead */
defaultSavedState: {
version: 1, /* make sure we can upgrade gracefully later */
torrents: [
{
status: 'paused',
infoHash: 'f84b51f0d2c3455ab5dabb6643b4340234cd036e',
displayName: 'Big Buck Bunny',
posterURL: '../resources/bigBuckBunny.jpg'
},
{
status: 'paused',
infoHash: '6a9759bffd5c0af65319979fb7832189f4f3c35d',
displayName: 'Sintel',
posterURL: '../resources/sintel.jpg'
},
{
status: 'paused',
infoHash: '02767050e0be2fd4db9a2ad6c12416ac806ed6ed',
displayName: 'Tears of Steel',
posterURL: '../resources/tearsOfSteel.jpg'
}
],
downloadPath: path.join(os.homedir(), 'Downloads')
}
}