mirror of
https://github.com/iptv-org/iptv
synced 2026-11-03 15:54:23 -05:00
Merge pull request #55984 from iptv-org/patch-2026.10.1
Patch 2026.10.1
This commit is contained in:
14 files changed
+808
-467
No files matched your search
@@ -604,5 +604,13 @@
|
||||
"country": "BR",
|
||||
"categories": [],
|
||||
"is_nsfw": false
|
||||
},
|
||||
{
|
||||
"id": "CNBCe.tr",
|
||||
"name": "CNBCe",
|
||||
"network": null,
|
||||
"country": "TR",
|
||||
"categories": [],
|
||||
"is_nsfw": false
|
||||
}
|
||||
]
|
||||
@@ -889,5 +889,21 @@
|
||||
"America/New_York"
|
||||
],
|
||||
"video_format": "576i"
|
||||
},
|
||||
{
|
||||
"channel": "CNBCe.tr",
|
||||
"id": "SD",
|
||||
"name": "SD",
|
||||
"is_main": true,
|
||||
"broadcast_area": [
|
||||
"c/TR"
|
||||
],
|
||||
"languages": [
|
||||
"eng"
|
||||
],
|
||||
"timezones": [
|
||||
"America/New_York"
|
||||
],
|
||||
"video_format": "576i"
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,3 @@
|
||||
#EXTM3U
|
||||
#EXTINF:-1 tvg-id="CNBCe.tr@SD",CNBCe
|
||||
https://ythls.onrender.com/channel/UC40TUSUx490U5uR1lZt3Ajg.m3u8
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports = [
|
||||
{
|
||||
number: 19956,
|
||||
body: '### Stream ID (required)\r\n\r\nCNBCe.tr\r\n\r\n### Notes\r\n\r\n_No response_',
|
||||
body: '### Stream ID (required)\r\n\r\nCNBCe.tr@SD\r\n\r\n### Notes\r\n\r\n_No response_',
|
||||
category: { name: 'Channel Search' }
|
||||
},
|
||||
{
|
||||
@@ -9,6 +9,21 @@ module.exports = [
|
||||
body: '### Stream ID (required)\r\n\r\n13thStreet.au\r\n\r\n### Notes\r\n\r\nI need Disney Channel East Stream m3u Url please\r\n\r\n### Contributing Guide\r\n\r\n- [x] I have read [Contributing Guide](https://github.com/iptv-org/iptv/blob/master/CONTRIBUTING.md)',
|
||||
category: { name: 'Channel Search' }
|
||||
},
|
||||
{
|
||||
number: 19958,
|
||||
body: '### Stream ID (required)\r\n\r\nCNBCe.tr@SD\r\n\r\n### Notes\r\n\r\n_No response_',
|
||||
category: { name: 'Channel Search' }
|
||||
},
|
||||
{
|
||||
number: 19959,
|
||||
body: '### Stream ID (required)\r\n\r\nCNBCe.com\r\n\r\n### Notes\r\n\r\n_No response_',
|
||||
category: { name: 'Channel Search' }
|
||||
},
|
||||
{
|
||||
number: 19960,
|
||||
body: '### Stream ID (required)\r\n\r\nCNBCe.tr\r\n\r\n### Notes\r\n\r\n_No response_',
|
||||
category: { name: 'Channel Search' }
|
||||
},
|
||||
{
|
||||
number: 20956,
|
||||
body: '### Stream ID (required)\r\n\r\nIONTV.us\r\n\r\n### Notes\r\n\r\nI need it fast please thank you\r\n\r\n### Contributing Guide\r\n\r\n- [x] I have read [Contributing Guide](https://github.com/iptv-org/iptv/blob/master/CONTRIBUTING.md)',
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
import { describe, beforeEach, it, expect } from 'vitest'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import { execFileSync } from 'child_process'
|
||||
import * as fs from 'fs-extra'
|
||||
|
||||
const ENV = {
|
||||
...process.env,
|
||||
DATA_DIR: 'tests/__data__/input/data',
|
||||
STREAMS_DIR: 'tests/__data__/output/streams',
|
||||
LOGS_DIR: 'tests/__data__/output/logs',
|
||||
GITHUB_REPOSITORY: 'test-owner/test-repo',
|
||||
GITHUB_SHA: 'main'
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
fs.copySync('tests/__data__/input/discussion_validate/streams', 'tests/__data__/output/streams')
|
||||
})
|
||||
|
||||
describe('discussion:validate', () => {
|
||||
it('can handle fulfilled channel search request', () => {
|
||||
const discussionNumber = 19956
|
||||
const body = '### Channel ID\n\nCNBCe.tr@SD'
|
||||
|
||||
const stdout = runDiscussionValidate(discussionNumber, body)
|
||||
if (process.env.DEBUG === 'true') console.log(stdout)
|
||||
|
||||
const result = readResultJson()
|
||||
expect(result.status).toBe('fulfilled')
|
||||
expect(result.label).toBe('check:failed')
|
||||
expect(result.comment).toContain('https://github.com/test-owner/test-repo/blob/main/')
|
||||
expect(result.close).toBe('true')
|
||||
})
|
||||
|
||||
it('can handle duplicate channel search request', () => {
|
||||
const discussionNumber = 19958
|
||||
const body = '### Channel ID\n\nCNBCe.tr@SD'
|
||||
|
||||
try {
|
||||
runDiscussionValidate(discussionNumber, body)
|
||||
throw new Error('Expected process to fail for duplicate request')
|
||||
} catch {
|
||||
const result = readResultJson()
|
||||
expect(result.status).toBe('duplicate_request')
|
||||
expect(result.label).toBe('check:failed')
|
||||
expect(result.comment).toContain('Duplicate of #19956.')
|
||||
expect(result.close).toBe('true')
|
||||
}
|
||||
})
|
||||
|
||||
it('can handle invalid channel id request', () => {
|
||||
const discussionNumber = 19959
|
||||
const body = '### Channel ID\n\nCNBCe.com@SD'
|
||||
|
||||
try {
|
||||
runDiscussionValidate(discussionNumber, body)
|
||||
throw new Error('Expected process to fail for invalid channel ID')
|
||||
} catch {
|
||||
const result = readResultJson()
|
||||
expect(result.status).toBe('invalid_channel_id')
|
||||
expect(result.label).toBe('check:failed')
|
||||
expect(result.comment).toContain('There is no channel with the ID "CNBCe.com" in the database.')
|
||||
expect(result.close).toBe('true')
|
||||
}
|
||||
})
|
||||
|
||||
it('can handle missing feed id request', () => {
|
||||
const discussionNumber = 19960
|
||||
const body = '### Channel ID\n\nCNBCe.tr'
|
||||
|
||||
try {
|
||||
runDiscussionValidate(discussionNumber, body)
|
||||
throw new Error('Expected process to fail for missing feed ID')
|
||||
} catch {
|
||||
const result = readResultJson()
|
||||
expect(result.status).toBe('missing_feed_id')
|
||||
expect(result.label).toBe('check:failed')
|
||||
expect(result.comment).toContain('The request is missing the feed ID.')
|
||||
expect(result.close).toBe('true')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
function runDiscussionValidate(number: number, body: string) {
|
||||
return execFileSync(
|
||||
process.execPath,
|
||||
[
|
||||
'--import',
|
||||
'tsx',
|
||||
'scripts/commands/discussion/validate.ts',
|
||||
'--number',
|
||||
`${number}`,
|
||||
'--body',
|
||||
body
|
||||
],
|
||||
{ encoding: 'utf8', env: ENV }
|
||||
)
|
||||
}
|
||||
|
||||
function readResultJson() {
|
||||
const filepath = 'tests/__data__/output/logs/result.json'
|
||||
const raw = fs.readFileSync(pathToFileURL(filepath), { encoding: 'utf8' })
|
||||
return JSON.parse(raw)
|
||||
}
|
||||
@@ -134,7 +134,7 @@ describe('playlist:validate', () => {
|
||||
} catch (error) {
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, error)
|
||||
expect((error as ExecError).stdout).toContain(
|
||||
'log_level.m3u\n 2 error \"new: https://streamer2.nexgen.bz/07-CHANNEL7/index.m3u8\" is not a valid URL\n\n1 problems (1 errors, 0 warnings)\n'
|
||||
'log_level.m3u\n 2 error "new: https://streamer2.nexgen.bz/07-CHANNEL7/index.m3u8" is not a valid URL\n\n1 problems (1 errors, 0 warnings)\n'
|
||||
)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -23,11 +23,13 @@ describe('report:create', () => {
|
||||
│ 4 │ 14179 │ 'streams:add' │ 'ManoramaNews.in' │ '(https://mitelefe.com/Api/Videos/GetSourceUrl/694564/0/HLS / https://ssl.cloud.telefe.com/Api/Vid...' │ 'invalid_stream_url' │
|
||||
│ 5 │ 15175 │ 'streams:add' │ 'Channel7.bz@SD' │ 'new: https://streamer2.nexgen.bz/07-CHANNEL7/index.m3u8' │ 'invalid_stream_url' │
|
||||
│ 6 │ 16120 │ 'streams:remove' │ undefined │ 'http://190.61.102.67:2000/play/a038/index.m3u8' │ 'nonexistent_link' │
|
||||
│ 7 │ 19956 │ 'channel search' │ 'CNBCe.tr' │ undefined │ 'invalid_channel_id' │
|
||||
│ 8 │ 19957 │ 'channel search' │ '13thStreet.au' │ undefined │ 'channel_closed' │
|
||||
│ 9 │ 20956 │ 'channel search' │ 'IONTV.us' │ undefined │ 'fulfilled' │
|
||||
│ 10 │ 25157 │ 'streams:add' │ 'OnTimeSports.eg@SD' │ 'OnTime Sports SD.mu38' │ 'invalid_stream_url' │
|
||||
│ 11 │ 39097 │ 'streams:edit' │ '~' │ 'https://jmp2.uk/plu-5a74b8e1e22a61737979c6bf.m3u8' │ 'nonexistent_link' │
|
||||
│ 7 │ 19957 │ 'channel search' │ '13thStreet.au' │ undefined │ 'channel_closed' │
|
||||
│ 8 │ 19958 │ 'channel search' │ 'CNBCe.tr@SD' │ undefined │ 'duplicate_request' │
|
||||
│ 9 │ 19959 │ 'channel search' │ 'CNBCe.com' │ undefined │ 'invalid_channel_id' │
|
||||
│ 10 │ 19960 │ 'channel search' │ 'CNBCe.tr' │ undefined │ 'duplicate_request' │
|
||||
│ 11 │ 20956 │ 'channel search' │ 'IONTV.us' │ undefined │ 'fulfilled' │
|
||||
│ 12 │ 25157 │ 'streams:add' │ 'OnTimeSports.eg@SD' │ 'OnTime Sports SD.mu38' │ 'invalid_stream_url' │
|
||||
│ 13 │ 39097 │ 'streams:edit' │ '~' │ 'https://jmp2.uk/plu-5a74b8e1e22a61737979c6bf.m3u8' │ 'nonexistent_link' │
|
||||
└─────────┴─────────────┴──────────────────┴─────────────────────────────┴────────────────────────────────────────────────────────────────────────────────────────────────────────┴──────────────────────┘`).trim()
|
||||
)
|
||||
).toBe(true)
|
||||
|
||||
Reference in new issue
Block a user