mirror of
https://github.com/iptv-org/iptv
synced 2026-10-21 18:46:20 -04:00
Update scripts
This commit is contained in:
1 parent
9902121ac0
commit
9d7cac7bda
21 files changed
+129
-55
No files matched your search
@@ -19,9 +19,7 @@ export class LanguagesGenerator implements Generator {
|
||||
}
|
||||
|
||||
async generate(): Promise<void> {
|
||||
const streams: Collection<Stream> = this.streams
|
||||
.sortBy((stream: Stream) => stream.title)
|
||||
.filter((stream: Stream) => stream.isSFW())
|
||||
const streams: Collection<Stream> = this.streams.filter((stream: Stream) => stream.isSFW())
|
||||
|
||||
const languages = new Collection<sdk.Models.Language>()
|
||||
streams.forEach((stream: Stream) => {
|
||||
@@ -39,7 +37,7 @@ export class LanguagesGenerator implements Generator {
|
||||
|
||||
if (languageStreams.isEmpty()) return
|
||||
|
||||
const playlist = new Playlist(languageStreams, { public: true })
|
||||
const playlist = new Playlist(languageStreams, { public: true, raw: false })
|
||||
const filepath = `languages/${language.code}.m3u`
|
||||
await this.storage.save(filepath, playlist.toString())
|
||||
this.logFile.append(
|
||||
@@ -50,7 +48,7 @@ export class LanguagesGenerator implements Generator {
|
||||
const undefinedStreams = streams.filter((stream: Stream) => stream.getLanguages().isEmpty())
|
||||
if (undefinedStreams.isEmpty()) return
|
||||
|
||||
const playlist = new Playlist(undefinedStreams, { public: true })
|
||||
const playlist = new Playlist(undefinedStreams, { public: true, raw: false })
|
||||
const filepath = 'languages/undefined.m3u'
|
||||
await this.storage.save(filepath, playlist.toString())
|
||||
this.logFile.append(
|
||||
|
||||
Reference in new issue
Block a user