mirror of
https://github.com/iptv-org/iptv
synced 2025-12-21 12:57:26 -05:00
Update scripts
This commit is contained in:
@@ -28,19 +28,7 @@ export class IndexRegionGenerator implements Generator {
|
||||
.orderBy((stream: Stream) => stream.getTitle())
|
||||
.filter((stream: Stream) => stream.isSFW())
|
||||
.forEach((stream: Stream) => {
|
||||
if (stream.isInternational()) {
|
||||
const streamClone = stream.clone()
|
||||
streamClone.groupTitle = 'International'
|
||||
groupedStreams.push(streamClone)
|
||||
return
|
||||
}
|
||||
|
||||
if (!stream.hasBroadcastArea()) {
|
||||
const streamClone = stream.clone()
|
||||
streamClone.groupTitle = 'Undefined'
|
||||
groupedStreams.push(streamClone)
|
||||
return
|
||||
}
|
||||
if (!stream.hasBroadcastArea()) return
|
||||
|
||||
stream.getBroadcastRegions().forEach((region: Region) => {
|
||||
const streamClone = stream.clone()
|
||||
@@ -49,11 +37,7 @@ export class IndexRegionGenerator implements Generator {
|
||||
})
|
||||
})
|
||||
|
||||
groupedStreams = groupedStreams.orderBy((stream: Stream) => {
|
||||
if (stream.groupTitle === 'International') return 'ZZ'
|
||||
if (stream.groupTitle === 'Undefined') return 'ZZZ'
|
||||
return stream.groupTitle
|
||||
})
|
||||
groupedStreams = groupedStreams.orderBy((stream: Stream) => stream.groupTitle)
|
||||
|
||||
const playlist = new Playlist(groupedStreams, { public: true })
|
||||
const filepath = 'index.region.m3u'
|
||||
|
||||
Reference in New Issue
Block a user