Skip to content

Commit 6e91800

Browse files
authored
Merge pull request #152 from racacax/v3.6.2
ignore remaining details if rate limit fails Telecablesat
2 parents b6d0602 + de34274 commit 6e91800

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

integrity.sha256

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
09fa2df37a2079af91a741213d56909796367a782793302f434e7f045752ea4b
1+
7396539c08de66eb9938af3c52a251b9fab66d64881a58b2da2acb4baa71bab9

src/Component/Provider/Telecablesat.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ private function addDetails(Program &$program, string $url)
101101
$desc .= "\n";
102102
}
103103
$program->addDesc($desc);
104+
105+
return true;
106+
} else {
107+
return false;
104108
}
105109
}
106110

@@ -145,7 +149,10 @@ public function constructEPG(string $channel, string $date): Channel | bool
145149
$program
146150
);
147151
if ($this->enableDetails) {
148-
$this->addDetails($program, self::$BASE_URL.$links[1][$i]);
152+
$result = $this->addDetails($program, self::$BASE_URL.$links[1][$i]);
153+
if (!$result) {
154+
break;
155+
}
149156
sleep(3);
150157
}
151158
}

src/Component/XmlExporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function startExport(string $filePath): void
3434
$this->content->formatOutput = true;
3535
$this->content->loadXML('<?xml version="1.0" encoding="UTF-8"?>
3636
<!DOCTYPE tv SYSTEM "resources/validation/xmltv.dtd">
37-
<!-- Generated with XML TV Fr v3.6.1 -->
37+
<!-- Generated with XML TV Fr v3.6.2 -->
3838
<tv/>');
3939
$this->content->documentElement->setAttribute('source-info-url', 'https://github.com/racacax/XML-TV-Fr');
4040
$this->content->documentElement->setAttribute('source-info-name', 'XML TV Fr');

0 commit comments

Comments
 (0)