mirror of
https://github.com/iptv-org/iptv
synced 2026-10-22 02:56:48 -04:00
Update scripts
This commit is contained in:
1 parent
9902121ac0
commit
9d7cac7bda
21 files changed
+129
-55
No files matched your search
@@ -25,9 +25,7 @@ export class CountriesGenerator implements Generator {
|
||||
}
|
||||
|
||||
async generate(): Promise<void> {
|
||||
const streams = this.streams
|
||||
.sortBy((stream: Stream) => stream.title)
|
||||
.filter((stream: Stream) => stream.isSFW())
|
||||
const streams = this.streams.filter((stream: Stream) => stream.isSFW())
|
||||
|
||||
const streamsGroupedByCountryCode = {}
|
||||
streams.forEach((stream: Stream) => {
|
||||
@@ -43,7 +41,7 @@ export class CountriesGenerator implements Generator {
|
||||
for (const countryCode in streamsGroupedByCountryCode) {
|
||||
const countryStreams = streamsGroupedByCountryCode[countryCode]
|
||||
|
||||
const playlist = new Playlist(countryStreams, { public: true })
|
||||
const playlist = new Playlist(countryStreams, { public: true, raw: false })
|
||||
const filepath = `countries/${countryCode.toLowerCase()}.m3u`
|
||||
await this.storage.save(filepath, playlist.toString())
|
||||
this.logFile.append(
|
||||
@@ -52,7 +50,10 @@ export class CountriesGenerator implements Generator {
|
||||
}
|
||||
|
||||
const internationalStreams = streams.filter((stream: Stream) => stream.isInternational())
|
||||
const internationalPlaylist = new Playlist(internationalStreams, { public: true })
|
||||
const internationalPlaylist = new Playlist(internationalStreams, {
|
||||
public: true,
|
||||
displayUniqueName: true
|
||||
})
|
||||
const internationalFilepath = 'countries/int.m3u'
|
||||
await this.storage.save(internationalFilepath, internationalPlaylist.toString())
|
||||
this.logFile.append(
|
||||
@@ -66,7 +67,7 @@ export class CountriesGenerator implements Generator {
|
||||
const undefinedStreams = streams.filter((stream: Stream) =>
|
||||
stream.getBroadcastAreaCodes().isEmpty()
|
||||
)
|
||||
const undefinedPlaylist = new Playlist(undefinedStreams, { public: true })
|
||||
const undefinedPlaylist = new Playlist(undefinedStreams, { public: true, raw: false })
|
||||
const undefinedFilepath = 'countries/undefined.m3u'
|
||||
await this.storage.save(undefinedFilepath, undefinedPlaylist.toString())
|
||||
this.logFile.append(
|
||||
|
||||
Reference in new issue
Block a user