mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-11 17:40:03 -04:00
parent
4afbebfd63
commit
5dbaecf180
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@ import { Logger, Storage, Collection, Dictionary } from '@freearhey/core'
|
||||||
import { DATA_DIR, STREAMS_DIR } from '../../constants'
|
import { DATA_DIR, STREAMS_DIR } from '../../constants'
|
||||||
import { IssueLoader, PlaylistParser } from '../../core'
|
import { IssueLoader, PlaylistParser } from '../../core'
|
||||||
import { Stream, Playlist, Channel, Issue } from '../../models'
|
import { Stream, Playlist, Channel, Issue } from '../../models'
|
||||||
|
import validUrl from 'valid-url'
|
||||||
|
|
||||||
let processedIssues = new Collection()
|
let processedIssues = new Collection()
|
||||||
let streams: Collection
|
let streams: Collection
|
||||||
|
@ -105,6 +106,7 @@ async function addStreams(loader: IssueLoader) {
|
||||||
const data = issue.data
|
const data = issue.data
|
||||||
if (data.missing('channel_id') || data.missing('stream_url')) return
|
if (data.missing('channel_id') || data.missing('stream_url')) return
|
||||||
if (streams.includes((_stream: Stream) => _stream.url === data.get('stream_url'))) return
|
if (streams.includes((_stream: Stream) => _stream.url === data.get('stream_url'))) return
|
||||||
|
if (!validUrl.isUri(data.get('stream_url'))) return
|
||||||
|
|
||||||
const channel = groupedChannels.get(data.get('channel_id'))
|
const channel = groupedChannels.get(data.get('channel_id'))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue