mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-12 01:50:04 -04:00
Delete checker.js
This commit is contained in:
parent
03b43f0ae6
commit
4f35487214
1 changed files with 0 additions and 19 deletions
|
@ -1,19 +0,0 @@
|
||||||
const IPTVChecker = require('iptv-checker')
|
|
||||||
|
|
||||||
const checker = {}
|
|
||||||
|
|
||||||
checker.check = async function (item, config) {
|
|
||||||
const ic = new IPTVChecker(config)
|
|
||||||
const result = await ic.checkStream({ url: item.url, http: item.http })
|
|
||||||
|
|
||||||
return {
|
|
||||||
_id: item._id,
|
|
||||||
url: item.url,
|
|
||||||
http: item.http,
|
|
||||||
error: !result.status.ok ? { code: result.status.code, message: result.status.message } : null,
|
|
||||||
streams: result.status.ok ? result.status.metadata.streams : [],
|
|
||||||
requests: result.status.ok ? result.status.metadata.requests : []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = checker
|
|
Loading…
Add table
Add a link
Reference in a new issue