mirror of
https://github.com/iptv-org/iptv
synced 2025-12-16 10:26:48 -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
|
||||
id: files
|
||||
run: |
|
||||
FILES=streams/*.m3u
|
||||
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
|
||||
ANY_CHANGED=true
|
||||
fi
|
||||
|
||||
6
.github/workflows/format.yml
vendored
6
.github/workflows/format.yml
vendored
@@ -47,9 +47,8 @@ jobs:
|
||||
- name: changed files
|
||||
id: files_after
|
||||
run: |
|
||||
FILES=streams/*.m3u
|
||||
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
|
||||
ANY_CHANGED=true
|
||||
fi
|
||||
@@ -122,9 +121,8 @@ jobs:
|
||||
- name: changed files
|
||||
id: files_after
|
||||
run: |
|
||||
FILES=streams/*.m3u
|
||||
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
|
||||
ANY_CHANGED=true
|
||||
fi
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Logger, Storage, Collection, Dictionary } from '@freearhey/core'
|
||||
import { DataLoader, DataProcessor, PlaylistParser } from '../../core'
|
||||
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 { BlocklistRecord, Stream } from '../../models'
|
||||
import { program } from 'commander'
|
||||
@@ -30,13 +30,13 @@ async function main() {
|
||||
}: DataProcessorData = processor.process(data)
|
||||
|
||||
logger.info('loading streams...')
|
||||
const streamsStorage = new Storage(STREAMS_DIR)
|
||||
const rootStorage = new Storage(ROOT_DIR)
|
||||
const parser = new PlaylistParser({
|
||||
storage: streamsStorage,
|
||||
storage: rootStorage,
|
||||
channelsKeyById,
|
||||
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)
|
||||
logger.info(`found ${streams.count()} streams`)
|
||||
|
||||
|
||||
@@ -6,11 +6,10 @@ type ExecError = {
|
||||
stdout: string
|
||||
}
|
||||
|
||||
let ENV_VAR =
|
||||
'DATA_DIR=tests/__data__/input/data STREAMS_DIR=tests/__data__/input/playlist_validate'
|
||||
let ENV_VAR = 'DATA_DIR=tests/__data__/input/data ROOT_DIR=tests/__data__/input/playlist_validate'
|
||||
if (os.platform() === 'win32') {
|
||||
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', () => {
|
||||
|
||||
Reference in New Issue
Block a user