mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 10:00:05 -04:00
Update index.js
This commit is contained in:
parent
a31987d5b9
commit
3c62f24cf1
1 changed files with 4 additions and 2 deletions
|
@ -6,7 +6,7 @@ const ffmpeg = require('fluent-ffmpeg')
|
||||||
const verbose = process.env.npm_config_debug || false
|
const verbose = process.env.npm_config_debug || false
|
||||||
const errorLog = 'error.log'
|
const errorLog = 'error.log'
|
||||||
const config = {
|
const config = {
|
||||||
timeout: 60
|
timeout: 10
|
||||||
}
|
}
|
||||||
|
|
||||||
let stats = {
|
let stats = {
|
||||||
|
@ -44,10 +44,12 @@ async function test() {
|
||||||
await new Promise(resolve => {
|
await new Promise(resolve => {
|
||||||
|
|
||||||
const timeout = setTimeout(() => {
|
const timeout = setTimeout(() => {
|
||||||
|
|
||||||
resolve()
|
resolve()
|
||||||
|
|
||||||
}, config.timeout * 1000)
|
}, config.timeout * 1000)
|
||||||
|
|
||||||
ffmpeg(item.url).ffprobe((err) => {
|
ffmpeg(item.url, { timeout: 60 }).ffprobe((err) => {
|
||||||
|
|
||||||
if(err) {
|
if(err) {
|
||||||
const message = parseMessage(err, item.url)
|
const message = parseMessage(err, item.url)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue