diff --git a/renderer/lib/torrent-poster.js b/renderer/lib/torrent-poster.js index 7f1a2e8a..8274a7fa 100644 --- a/renderer/lib/torrent-poster.js +++ b/renderer/lib/torrent-poster.js @@ -4,12 +4,18 @@ var captureVideoFrame = require('./capture-video-frame') var path = require('path') function torrentPoster (torrent, cb) { - // First, try to use the largest video file + // First, try to use a poster image if available + var posterFile = torrent.files.filter(function (file) { + return /^poster\.(jpg|png|gif)$/.test(file.name) + })[0] + if (posterFile) return torrentPosterFromImage(posterFile, torrent, cb) + + // Second, try to use the largest video file // Filter out file formats that the