mirror of
https://github.com/iptv-org/iptv
synced 2026-03-21 19:31:01 -04:00
Update validate.ts
This commit is contained in:
@@ -3,6 +3,7 @@ import { Storage } from '@freearhey/storage-js'
|
||||
import { PlaylistParser } from '../../core'
|
||||
import { data, loadData } from '../../api'
|
||||
import { ROOT_DIR } from '../../constants'
|
||||
import { isURI } from '../../utils.js'
|
||||
import { Stream } from '../../models'
|
||||
import * as sdk from '@iptv-org/sdk'
|
||||
import { program } from 'commander'
|
||||
@@ -63,6 +64,14 @@ async function main() {
|
||||
buffer.set(stream.url, true)
|
||||
}
|
||||
|
||||
if (!isURI(stream.url)) {
|
||||
log.add({
|
||||
type: 'error',
|
||||
line: stream.getLine(),
|
||||
message: `"${stream.url}" is not a valid URL`
|
||||
})
|
||||
}
|
||||
|
||||
if (stream.channel) {
|
||||
const blocklistRecords = new Collection(
|
||||
data.blocklistRecordsGroupedByChannel.get(stream.channel)
|
||||
|
||||
Reference in New Issue
Block a user