epg-grabber 0.29.6 → 0.29.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -78,8 +78,8 @@ Arguments:
|
|
|
78
78
|
- `--channels`: path to list of channels (can be specified via config file)
|
|
79
79
|
- `--lang`: set default language for all programs (default: 'en')
|
|
80
80
|
- `--days`: number of days for which to grab the program (default: 1)
|
|
81
|
-
- `--delay`: delay between requests (default: 3000)
|
|
82
|
-
- `--timeout`: set a timeout for each request (default: 5000)
|
|
81
|
+
- `--delay`: delay between requests in milliseconds (default: 3000)
|
|
82
|
+
- `--timeout`: set a timeout for each request in milliseconds (default: 5000)
|
|
83
83
|
- `--cache-ttl`: maximum time for storing each request in milliseconds (default: 0)
|
|
84
84
|
- `--gzip`: compress the output (default: false)
|
|
85
85
|
- `--debug`: enable debug mode (default: false)
|
package/bin/epg-grabber.js
CHANGED
|
@@ -24,8 +24,8 @@ program
|
|
|
24
24
|
.option('--channels <channels>', 'Path to channels.xml file')
|
|
25
25
|
.option('--lang <lang>', 'Set default language for all programs')
|
|
26
26
|
.option('--days <days>', 'Number of days for which to grab the program', parseNumber)
|
|
27
|
-
.option('--delay <delay>', 'Delay between requests (in
|
|
28
|
-
.option('--timeout <timeout>', 'Set a timeout for each request (in
|
|
27
|
+
.option('--delay <delay>', 'Delay between requests (in milliseconds)', parseNumber)
|
|
28
|
+
.option('--timeout <timeout>', 'Set a timeout for each request (in milliseconds)', parseNumber)
|
|
29
29
|
.option(
|
|
30
30
|
'--cache-ttl <cacheTtl>',
|
|
31
31
|
'Maximum time for storing each request (in milliseconds)',
|
|
@@ -76,7 +76,6 @@ async function main() {
|
|
|
76
76
|
const total = channels.length * days
|
|
77
77
|
const utcDate = getUTCDate()
|
|
78
78
|
const dates = Array.from({ length: days }, (_, i) => utcDate.add(i, 'd'))
|
|
79
|
-
console.log(dates)
|
|
80
79
|
for (let channel of channels) {
|
|
81
80
|
if (!channel.logo && config.logo) {
|
|
82
81
|
channel.logo = await grabber.loadLogo(channel)
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" ?><tv date="
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?><tv date="20230113">
|
|
2
2
|
<channel id="1TV.com"><display-name>1 TV</display-name><icon src="https://example.com/logos/1TV.png"/><url>https://example.com</url></channel>
|
|
3
3
|
<channel id="2TV.com"><display-name>2 TV</display-name><url>https://example.com</url></channel>
|
|
4
4
|
<programme start="20220101000000 +0000" stop="20220101010000 +0000" channel="1TV.com"><title lang="fr">Program1</title></programme>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" ?><tv date="
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" ?><tv date="20230113">
|
|
2
2
|
<channel id="1TV.com"><display-name>1 TV</display-name><icon src="https://example.com/logos/1TV.png"/><url>https://example.com</url></channel>
|
|
3
3
|
<channel id="2TV.com"><display-name>2 TV</display-name><url>https://example.com</url></channel>
|
|
4
4
|
</tv>
|
|
Binary file
|