Ensure consistency between extension-categories, between torrent-player and torrent-poster.

Add additional audio-file-extensions.
This commit is contained in:
Borewit
2018-08-13 21:35:37 +02:00
parent e0de30baff
commit c2a38bd4e0
3 changed files with 13 additions and 32 deletions

View File

@@ -3,12 +3,7 @@ module.exports = torrentPoster
const captureFrame = require('capture-frame')
const path = require('path')
const mediaExtensions = {
audio: ['.aac', '.asf', '.flac', '.m2a', '.m4a', '.mp2', '.mp4', '.mp3', '.oga', '.ogg', '.opus',
'.wma', '.wav', '.wv', '.wvp'],
video: ['.mp4', '.m4v', '.webm', '.mov', '.mkv'],
image: ['.gif', '.jpg', '.jpeg', '.png']
}
const mediaExtensions = require('./media-extensions')
function torrentPoster (torrent, cb) {
// First, try to use a poster image if available