File tree Expand file tree Collapse file tree 6 files changed +10
-65
lines changed Expand file tree Collapse file tree 6 files changed +10
-65
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import {
10
10
IndexLanguageGenerator ,
11
11
IndexCountryGenerator ,
12
12
SubdivisionsGenerator ,
13
- IndexRegionGenerator ,
14
13
CategoriesGenerator ,
15
14
CountriesGenerator ,
16
15
LanguagesGenerator ,
@@ -124,9 +123,6 @@ async function main() {
124
123
logger . info ( 'generating index.language.m3u...' )
125
124
await new IndexLanguageGenerator ( { streams, logFile } ) . generate ( )
126
125
127
- logger . info ( 'generating index.region.m3u...' )
128
- await new IndexRegionGenerator ( { streams, regions, logFile } ) . generate ( )
129
-
130
126
logger . info ( 'saving generators.log...' )
131
127
const logStorage = new Storage ( LOGS_DIR )
132
128
logStorage . saveFile ( logFile )
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ export * from './indexCountryGenerator'
6
6
export * from './indexGenerator'
7
7
export * from './indexLanguageGenerator'
8
8
export * from './indexNsfwGenerator'
9
- export * from './indexRegionGenerator'
10
9
export * from './languagesGenerator'
11
10
export * from './rawGenerator'
12
11
export * from './regionsGenerator'
Original file line number Diff line number Diff line change @@ -26,13 +26,6 @@ export class IndexCountryGenerator implements Generator {
26
26
. orderBy ( ( stream : Stream ) => stream . getTitle ( ) )
27
27
. filter ( ( stream : Stream ) => stream . isSFW ( ) )
28
28
. forEach ( ( stream : Stream ) => {
29
- if ( stream . isInternational ( ) ) {
30
- const streamClone = stream . clone ( )
31
- streamClone . groupTitle = 'International'
32
- groupedStreams . add ( streamClone )
33
- return
34
- }
35
-
36
29
if ( ! stream . hasBroadcastArea ( ) ) {
37
30
const streamClone = stream . clone ( )
38
31
streamClone . groupTitle = 'Undefined'
@@ -45,6 +38,12 @@ export class IndexCountryGenerator implements Generator {
45
38
streamClone . groupTitle = country . name
46
39
groupedStreams . add ( streamClone )
47
40
} )
41
+
42
+ if ( stream . isInternational ( ) ) {
43
+ const streamClone = stream . clone ( )
44
+ streamClone . groupTitle = 'International'
45
+ groupedStreams . add ( streamClone )
46
+ }
48
47
} )
49
48
50
49
groupedStreams = groupedStreams . orderBy ( ( stream : Stream ) => {
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -28,8 +28,6 @@ export class RegionsGenerator implements Generator {
28
28
. filter ( ( stream : Stream ) => stream . isSFW ( ) )
29
29
30
30
this . regions . forEach ( async ( region : Region ) => {
31
- if ( region . isWorldwide ( ) ) return
32
-
33
31
const regionStreams = streams . filter ( ( stream : Stream ) => stream . isBroadcastInRegion ( region ) )
34
32
35
33
const playlist = new Playlist ( regionStreams , { public : true } )
Original file line number Diff line number Diff line change @@ -32,23 +32,27 @@ export class BroadcastArea {
32
32
if ( ! city ) return
33
33
citiesIncluded . add ( city )
34
34
regionsIncluded = regionsIncluded . concat ( city . getRegions ( ) )
35
+ break
35
36
}
36
37
case 's' : {
37
38
const subdivision : Subdivision = subdivisionsKeyByCode . get ( code )
38
39
if ( ! subdivision ) return
39
40
subdivisionsIncluded . add ( subdivision )
40
41
regionsIncluded = regionsIncluded . concat ( subdivision . getRegions ( ) )
42
+ break
41
43
}
42
44
case 'c' : {
43
45
const country : Country = countriesKeyByCode . get ( code )
44
46
if ( ! country ) return
45
47
countriesIncluded . add ( country )
46
48
regionsIncluded = regionsIncluded . concat ( country . getRegions ( ) )
49
+ break
47
50
}
48
51
case 'r' : {
49
52
const region : Region = regionsKeyByCode . get ( code )
50
53
if ( ! region ) return
51
54
regionsIncluded = regionsIncluded . concat ( region . getRegions ( ) )
55
+ break
52
56
}
53
57
}
54
58
} )
You can’t perform that action at this time.
0 commit comments