mirror of
https://github.com/iptv-org/iptv
synced 2026-05-07 01:57:21 -04:00
Update scripts
This commit is contained in:
@@ -82,7 +82,7 @@ async function main() {
|
||||
logger.info('adding the missing quality...')
|
||||
const progressBar = new cliProgress.SingleBar({
|
||||
clearOnComplete: true,
|
||||
format: `[{bar}] {percentage}% | {value}/{total}`
|
||||
format: '[{bar}] {percentage}% | {value}/{total}'
|
||||
})
|
||||
progressBar.start(streams.count(), 0)
|
||||
await eachLimit(streams.all(), options.parallel, async (stream: Stream) => {
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
import { IssueLoader, PlaylistParser } from '../../core'
|
||||
import { isURI, getStreamInfo, loadIssues } from '../../utils'
|
||||
import { Playlist, Issue, Stream } from '../../models'
|
||||
import { loadData, data as apiData } from '../../api'
|
||||
import { Logger, Collection } from '@freearhey/core'
|
||||
import { isURI, getStreamInfo } from '../../utils'
|
||||
import { Storage } from '@freearhey/storage-js'
|
||||
import { STREAMS_DIR } from '../../constants'
|
||||
import { PlaylistParser } from '../../core'
|
||||
import * as sdk from '@iptv-org/sdk'
|
||||
|
||||
const processedIssues = new Collection()
|
||||
|
||||
async function main() {
|
||||
const logger = new Logger({ level: -999 })
|
||||
const issueLoader = new IssueLoader()
|
||||
|
||||
logger.info('loading issues...')
|
||||
const issues = await issueLoader.load()
|
||||
const issues = await loadIssues()
|
||||
|
||||
logger.info('loading data from api...')
|
||||
await loadData()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { isURI, truncate, loadIssues, loadDiscussions } from '../../utils'
|
||||
import { Logger, Collection, Dictionary } from '@freearhey/core'
|
||||
import { IssueLoader, PlaylistParser } from '../../core'
|
||||
import { Storage } from '@freearhey/storage-js'
|
||||
import { isURI, truncate } from '../../utils'
|
||||
import { STREAMS_DIR } from '../../constants'
|
||||
import { Issue, Stream } from '../../models'
|
||||
import { Discussion, Issue, Stream } from '../../models'
|
||||
import { PlaylistParser } from '../../core'
|
||||
import { data, loadData } from '../../api'
|
||||
|
||||
const status = {
|
||||
@@ -22,11 +22,13 @@ const status = {
|
||||
|
||||
async function main() {
|
||||
const logger = new Logger()
|
||||
const issueLoader = new IssueLoader()
|
||||
let report = new Collection()
|
||||
|
||||
logger.info('loading issues...')
|
||||
const issues = await issueLoader.load()
|
||||
const issues = await loadIssues()
|
||||
|
||||
logger.info('loading discussions...')
|
||||
const discussions = await loadDiscussions()
|
||||
|
||||
logger.info('loading data from api...')
|
||||
await loadData()
|
||||
@@ -135,16 +137,17 @@ async function main() {
|
||||
})
|
||||
|
||||
logger.info('checking channel search requests...')
|
||||
const channelSearchRequests = issues.filter(issue =>
|
||||
issue.labels.find((label: string) => label === 'channel search')
|
||||
const channelSearchRequests = discussions.filter(
|
||||
(discussion: Discussion) => discussion.category === 'Channel Search'
|
||||
)
|
||||
const channelSearchRequestsBuffer = new Dictionary()
|
||||
channelSearchRequests.forEach((issue: Issue) => {
|
||||
const streamId = issue.data.getString('stream_id') || issue.data.getString('channel_id') || ''
|
||||
channelSearchRequests.forEach((discussion: Discussion) => {
|
||||
const streamId =
|
||||
discussion.data.getString('stream_id') || discussion.data.getString('channel_id') || ''
|
||||
const [channelId, feedId] = streamId.split('@')
|
||||
|
||||
const result = {
|
||||
issueNumber: issue.number,
|
||||
issueNumber: discussion.number,
|
||||
type: 'channel search',
|
||||
streamId: streamId || undefined,
|
||||
streamUrl: undefined,
|
||||
|
||||
Reference in New Issue
Block a user