Show file list, open folder containing downloaded files, open individual files, play/pause individual videos
14 lines
298 B
JavaScript
14 lines
298 B
JavaScript
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
|
|
}
|