ARDMediathekSeriesBridge: Besserer Itemtitel
This commit is contained in:
@@ -59,7 +59,7 @@ class ARDMediathekSeriesBridge extends BridgeAbstract
|
||||
}
|
||||
|
||||
// Extrahiere Serien-Informationen
|
||||
$this->seriesTitle = $data['title'] ?? 'Unbekannte Serie';
|
||||
$this->seriesTitle = trim($data['title'] ?? 'Unbekannte Serie');
|
||||
$this->seriesDescription = $data['synopsis'] ?? '';
|
||||
|
||||
// Die Episoden befinden sich im ersten Widget unter 'teasers'
|
||||
@@ -83,7 +83,17 @@ class ARDMediathekSeriesBridge extends BridgeAbstract
|
||||
$item = [];
|
||||
|
||||
// Titel der Episode
|
||||
$item['title'] = $teaser['longTitle'] ?? $teaser['mediumTitle'] ?? $teaser['shortTitle'] ?? 'Unbekannter Titel';
|
||||
$episodeTitle = $teaser['longTitle'] ?? $teaser['mediumTitle'] ?? $teaser['shortTitle'] ?? 'Unbekannter Titel';
|
||||
|
||||
// Extrahiere Staffel-/Episodeninfo wie "(S16/E01)" und formatiere zu "S16E01"
|
||||
$seasonEpisode = '';
|
||||
if (preg_match('/\(S(\d+)\/E(\d+)\)/', $episodeTitle, $matches)) {
|
||||
$seasonEpisode = 'S' . $matches[1] . 'E' . $matches[2] . ' ';
|
||||
// Entferne die Staffel-/Episodeninfo aus dem Episodentitel
|
||||
$episodeTitle = trim(preg_replace('/\s*\(S\d+\/E\d+\)\s*$/', '', $episodeTitle));
|
||||
}
|
||||
|
||||
$item['title'] = $this->seriesTitle . ' ' . $seasonEpisode . $episodeTitle;
|
||||
|
||||
// URL zur Episode
|
||||
$episodeId = $teaser['id'] ?? '';
|
||||
|
||||
Reference in New Issue
Block a user