Torrent details

Show file list, open folder containing downloaded files, open individual files, play/pause individual videos
This commit is contained in:
DC
2016-03-14 00:51:00 -07:00
parent 74b713d706
commit 8108c407d3
7 changed files with 316 additions and 196 deletions

View File

@@ -0,0 +1,13 @@
module.exports = {
isPlayable: isPlayable
}
var path = require('path')
/**
* Determines whether a file in a torrent is audio/video we can play
*/
function isPlayable (file) {
var extname = path.extname(file.name)
return ['.mp4', '.m4v', '.webm', '.mov', '.mkv'].indexOf(extname) !== -1
}