mirror of
https://github.com/iptv-org/iptv
synced 2026-11-29 12:35:07 -05:00
Merge pull request #60476 from iptv-org/patch-2026.11.1
Patch 2026.11.1
This commit is contained in:
3 files changed
+2
-49
No files matched your search
@@ -6,7 +6,6 @@ import { Logger, Collection } from '@freearhey/core'
|
||||
import { Storage } from '@freearhey/storage-js'
|
||||
import { PlaylistParser } from '../../core'
|
||||
import * as sdk from '@iptv-org/sdk'
|
||||
import { sortStreams } from '../../core/sortStreams'
|
||||
|
||||
const processedIssues = new Collection<Issue>()
|
||||
const skippedIssues = new Collection<Issue>()
|
||||
@@ -69,7 +68,6 @@ async function saveStreams() {
|
||||
for (const filepath of groupedStreams.keys()) {
|
||||
let filteredStreams = new Collection<Stream>(groupedStreams.get(filepath))
|
||||
filteredStreams = filteredStreams.filter((stream: Stream) => stream.removed === false)
|
||||
if (changedFiles.has(filepath)) filteredStreams = sortStreams(filteredStreams)
|
||||
|
||||
const playlist = new Playlist(filteredStreams, { public: false, raw: true })
|
||||
await streamsStorage.save(filepath, playlist.toString())
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8
|
||||
#EXTINF:-1 tvg-id="BBCNews.uk",BBC News HD (480p) [Geo-blocked]
|
||||
http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="BeanoTV.uk@SD",Beano TV (1080p)
|
||||
https://a5b4bacecd47433dad06d3189fc7422e.mediatailor.us-east-1.amazonaws.com/v1/manifest/04fd913bb278d8775298c26fdca9d9841f37601f/RakutenTV-eu_BeanoTV/b1f233d5-847c-437d-aa4f-f73e67a85323/2.m3u8|Referer="https://referer.xyz/"|User-Agent="Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1"|Origin="https://origin.xyz"
|
||||
#EXTINF:-1 tvg-id="",Fox Sports (720p) [Not 24/7;Geo-blocked]
|
||||
https://jmp2.uk/plu-5a74b8e1e22a61737979c6bf.m3u8
|
||||
#EXTINF:-1 tvg-id="BeanoTV.uk@SD",Beano TV (1080p)
|
||||
https://a5b4bacecd47433dad06d3189fc7422e.mediatailor.us-east-1.amazonaws.com/v1/manifest/04fd913bb278d8775298c26fdca9d9841f37601f/RakutenTV-eu_BeanoTV/b1f233d5-847c-437d-aa4f-f73e67a85323/2.m3u8|Referer="https://referer.xyz/"|User-Agent="Mozilla/5.0 (iPhone; CPU iPhone OS 17_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Mobile/15E148 Safari/604.1"|Origin="https://origin.xyz"
|
||||
@@ -13,46 +13,6 @@ beforeEach(() => {
|
||||
})
|
||||
|
||||
describe('playlist:update', () => {
|
||||
it('sorts edited and removed playlists without losing entries or playback options', () => {
|
||||
const entries = [
|
||||
'#EXTINF:-1 tvg-id="",Zulu (720p)',
|
||||
'https://example.com/zulu.m3u8',
|
||||
'#EXTINF:-1 tvg-id="",Alpha (720p)',
|
||||
'#EXTVLCOPT:http-referrer=https://example.com/',
|
||||
'https://example.com/alpha.m3u8',
|
||||
''
|
||||
].join('\r\n')
|
||||
for (const country of ['cy', 'br_example']) {
|
||||
fs.appendFileSync(`tests/__data__/output/streams/${country}.m3u`, entries)
|
||||
}
|
||||
|
||||
execSync(`${ENV_VAR} npm run playlist:update --silent`, { encoding: 'utf8' })
|
||||
for (const country of ['cy', 'br_example']) {
|
||||
const output = content(`tests/__data__/output/streams/${country}.m3u`)
|
||||
expect(output.indexOf(',Alpha (720p)')).toBeLessThan(output.indexOf(',Zulu (720p)'))
|
||||
expect(output).toContain('#EXTVLCOPT:http-referrer=https://example.com/')
|
||||
expect(output).toContain('https://example.com/alpha.m3u8')
|
||||
expect(output).toContain('https://example.com/zulu.m3u8')
|
||||
}
|
||||
expect(content('tests/__data__/output/streams/cy.m3u')).toContain(',AdaTV')
|
||||
expect(content('tests/__data__/output/streams/br_example.m3u')).toContain(',BBC America')
|
||||
})
|
||||
|
||||
it('leaves the order of unrelated playlists unchanged', () => {
|
||||
const filepath = 'tests/__data__/output/streams/zz.m3u'
|
||||
const original = [
|
||||
'#EXTM3U',
|
||||
'#EXTINF:-1 tvg-id="",Zulu (720p)',
|
||||
'https://example.com/zulu.m3u8',
|
||||
'#EXTINF:-1 tvg-id="",Alpha (720p)',
|
||||
'https://example.com/alpha.m3u8',
|
||||
''
|
||||
].join('\r\n')
|
||||
fs.writeFileSync(filepath, original)
|
||||
execSync(`${ENV_VAR} npm run playlist:update --silent`, { encoding: 'utf8' })
|
||||
expect(content(filepath)).toBe(original)
|
||||
})
|
||||
|
||||
it('keeps the main feed in the stream ID when an edit gives only the channel ID', () => {
|
||||
execSync(`${ENV_VAR} npm run playlist:update --silent`, { encoding: 'utf8' })
|
||||
|
||||
@@ -84,11 +44,6 @@ describe('playlist:update', () => {
|
||||
)
|
||||
})
|
||||
|
||||
const uk = content('tests/__data__/output/streams/uk.m3u')
|
||||
expect(uk.indexOf(',BBC News')).toBeLessThan(uk.indexOf(',Beano TV'))
|
||||
expect(uk.indexOf(',Beano TV')).toBeLessThan(uk.indexOf(',Fox Sports'))
|
||||
expect(uk).toContain('|Referer="https://referer.xyz/"|User-Agent=')
|
||||
|
||||
expect(content('tests/__data__/output/logs/playlist_update.log')).toBe(
|
||||
content('tests/__data__/expected/playlist_update/playlist_update.log')
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user