mirror of
https://github.com/iptv-org/iptv
synced 2025-12-19 03:46:47 -05:00
Merge pull request #21640 from iptv-org/patch-2025.05.3
Patch 2025.05.3
This commit is contained in:
3
.github/workflows/check.yml
vendored
3
.github/workflows/check.yml
vendored
@@ -16,9 +16,8 @@ jobs:
|
|||||||
- name: changed files
|
- name: changed files
|
||||||
id: files
|
id: files
|
||||||
run: |
|
run: |
|
||||||
FILES=streams/*.m3u
|
|
||||||
ANY_CHANGED=false
|
ANY_CHANGED=false
|
||||||
ALL_CHANGED_FILES=$(git diff --name-only "${FILES}" | tr '\n' ' ')
|
ALL_CHANGED_FILES=$(git diff --name-only origin/master HEAD streams/ | tr '\n' ' ')
|
||||||
if [ -n "${ALL_CHANGED_FILES}" ]; then
|
if [ -n "${ALL_CHANGED_FILES}" ]; then
|
||||||
ANY_CHANGED=true
|
ANY_CHANGED=true
|
||||||
fi
|
fi
|
||||||
|
|||||||
6
.github/workflows/format.yml
vendored
6
.github/workflows/format.yml
vendored
@@ -47,9 +47,8 @@ jobs:
|
|||||||
- name: changed files
|
- name: changed files
|
||||||
id: files_after
|
id: files_after
|
||||||
run: |
|
run: |
|
||||||
FILES=streams/*.m3u
|
|
||||||
ANY_CHANGED=false
|
ANY_CHANGED=false
|
||||||
ALL_CHANGED_FILES=$(git diff --name-only "${FILES}" | tr '\n' ' ')
|
ALL_CHANGED_FILES=$(git diff --name-only origin/master HEAD streams/ | tr '\n' ' ')
|
||||||
if [ -n "${ALL_CHANGED_FILES}" ]; then
|
if [ -n "${ALL_CHANGED_FILES}" ]; then
|
||||||
ANY_CHANGED=true
|
ANY_CHANGED=true
|
||||||
fi
|
fi
|
||||||
@@ -122,9 +121,8 @@ jobs:
|
|||||||
- name: changed files
|
- name: changed files
|
||||||
id: files_after
|
id: files_after
|
||||||
run: |
|
run: |
|
||||||
FILES=streams/*.m3u
|
|
||||||
ANY_CHANGED=false
|
ANY_CHANGED=false
|
||||||
ALL_CHANGED_FILES=$(git diff --name-only "${FILES}" | tr '\n' ' ')
|
ALL_CHANGED_FILES=$(git diff --name-only origin/master HEAD streams/ | tr '\n' ' ')
|
||||||
if [ -n "${ALL_CHANGED_FILES}" ]; then
|
if [ -n "${ALL_CHANGED_FILES}" ]; then
|
||||||
ANY_CHANGED=true
|
ANY_CHANGED=true
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Logger, Storage, Collection, Dictionary } from '@freearhey/core'
|
import { Logger, Storage, Collection, Dictionary } from '@freearhey/core'
|
||||||
import { DataLoader, DataProcessor, PlaylistParser } from '../../core'
|
import { DataLoader, DataProcessor, PlaylistParser } from '../../core'
|
||||||
import { DataProcessorData } from '../../types/dataProcessor'
|
import { DataProcessorData } from '../../types/dataProcessor'
|
||||||
import { DATA_DIR, STREAMS_DIR } from '../../constants'
|
import { DATA_DIR, ROOT_DIR } from '../../constants'
|
||||||
import { DataLoaderData } from '../../types/dataLoader'
|
import { DataLoaderData } from '../../types/dataLoader'
|
||||||
import { BlocklistRecord, Stream } from '../../models'
|
import { BlocklistRecord, Stream } from '../../models'
|
||||||
import { program } from 'commander'
|
import { program } from 'commander'
|
||||||
@@ -30,13 +30,13 @@ async function main() {
|
|||||||
}: DataProcessorData = processor.process(data)
|
}: DataProcessorData = processor.process(data)
|
||||||
|
|
||||||
logger.info('loading streams...')
|
logger.info('loading streams...')
|
||||||
const streamsStorage = new Storage(STREAMS_DIR)
|
const rootStorage = new Storage(ROOT_DIR)
|
||||||
const parser = new PlaylistParser({
|
const parser = new PlaylistParser({
|
||||||
storage: streamsStorage,
|
storage: rootStorage,
|
||||||
channelsKeyById,
|
channelsKeyById,
|
||||||
feedsGroupedByChannelId
|
feedsGroupedByChannelId
|
||||||
})
|
})
|
||||||
const files = program.args.length ? program.args : await streamsStorage.list('**/*.m3u')
|
const files = program.args.length ? program.args : await rootStorage.list('streams/**/*.m3u')
|
||||||
const streams = await parser.parse(files)
|
const streams = await parser.parse(files)
|
||||||
logger.info(`found ${streams.count()} streams`)
|
logger.info(`found ${streams.count()} streams`)
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,10 @@ type ExecError = {
|
|||||||
stdout: string
|
stdout: string
|
||||||
}
|
}
|
||||||
|
|
||||||
let ENV_VAR =
|
let ENV_VAR = 'DATA_DIR=tests/__data__/input/data ROOT_DIR=tests/__data__/input/playlist_validate'
|
||||||
'DATA_DIR=tests/__data__/input/data STREAMS_DIR=tests/__data__/input/playlist_validate'
|
|
||||||
if (os.platform() === 'win32') {
|
if (os.platform() === 'win32') {
|
||||||
ENV_VAR =
|
ENV_VAR =
|
||||||
'SET "DATA_DIR=tests/__data__/input/data" && SET "STREAMS_DIR=tests/__data__/input/playlist_validate" &&'
|
'SET "DATA_DIR=tests/__data__/input/data" && SET "ROOT_DIR=tests/__data__/input/playlist_validate" &&'
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('playlist:validate', () => {
|
describe('playlist:validate', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user