nystudio107 / craft-transcoder

Transcode video & audio files to various formats, and provide video thumbnails
https://nystudio107.com/plugins/transcoder
Other
43 stars 12 forks source link

Server error generated when getFileInfo returns no data #10

Closed arifje closed 5 years ago

arifje commented 5 years ago

When ffprobe can't run for some reason or there's no valid file data returned, getFileInfo() generates an server error which is not catched correctly:

screenshot 2018-10-26 at 09 40 28

Edit: for now I resolved it with:

{% set videoData = (craft.transcoder.getFileInfo(video, true)) ? craft.transcoder.getFileInfo(video, true) : false %}

But I don't know if this is the best way.

khalwat commented 5 years ago

Fixed in https://github.com/nystudio107/craft-transcoder/commit/af102a1d1d134cadf64c01daf15a494262d124aa