Torrent details
Show file list, open folder containing downloaded files, open individual files, play/pause individual videos
This commit is contained in:
13
renderer/lib/torrent-player.js
Normal file
13
renderer/lib/torrent-player.js
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user