Verbessere Beschreibungen in Feeds & setze Limits
This commit is contained in:
@@ -120,60 +120,17 @@ class AnimationDigitalNetworkBridge extends BridgeAbstract {
|
||||
$item['author'] = $episodeDetails['show']['title'];
|
||||
}
|
||||
|
||||
// Content aufbauen
|
||||
// Content: Bild + Beschreibung
|
||||
$content = '';
|
||||
|
||||
// Bild
|
||||
if (!empty($video['image'])) {
|
||||
$content .= '<img src="' . $video['image'] . '" alt="' . htmlspecialchars($item['title']) . '" style="max-width: 100%;"><br><br>';
|
||||
$content .= '<img src="' . $video['image'] . '" alt="' . htmlspecialchars($item['title']) . '"><br>';
|
||||
}
|
||||
|
||||
// Summary/Beschreibung
|
||||
// Beschreibung
|
||||
if (isset($episodeDetails['summary']) && !empty($episodeDetails['summary'])) {
|
||||
$content .= '<p><strong>Beschreibung:</strong><br>' . nl2br(htmlspecialchars($episodeDetails['summary'])) . '</p>';
|
||||
}
|
||||
|
||||
// Episode-Infos
|
||||
$content .= '<p>';
|
||||
if (!empty($video['number'])) {
|
||||
$content .= '<strong>Episode:</strong> ' . htmlspecialchars($video['number']) . '<br>';
|
||||
}
|
||||
if (!empty($video['name'])) {
|
||||
$content .= '<strong>Titel:</strong> ' . htmlspecialchars($video['name']) . '<br>';
|
||||
}
|
||||
if (!empty($video['seasonTitle'])) {
|
||||
$content .= '<strong>Staffel/Abschnitt:</strong> ' . htmlspecialchars($video['seasonTitle']) . '<br>';
|
||||
}
|
||||
if (isset($video['duration'])) {
|
||||
$minutes = floor($video['duration'] / 60);
|
||||
$seconds = $video['duration'] % 60;
|
||||
$content .= '<strong>Dauer:</strong> ' . $minutes . ':' . sprintf('%02d', $seconds) . ' Min.<br>';
|
||||
}
|
||||
if (isset($episodeDetails['rating'])) {
|
||||
$content .= '<strong>Bewertung:</strong> ' . $episodeDetails['rating'] . '/5';
|
||||
if (isset($episodeDetails['ratingsCount'])) {
|
||||
$content .= ' (' . $episodeDetails['ratingsCount'] . ' Bewertungen)';
|
||||
}
|
||||
$content .= '<br>';
|
||||
}
|
||||
$content .= '</p>';
|
||||
|
||||
// Verfügbarkeit
|
||||
if (isset($video['free']) || isset($video['freeWithAds'])) {
|
||||
$content .= '<p><strong>Verfügbarkeit:</strong> ';
|
||||
if (!empty($video['free'])) {
|
||||
$content .= 'Kostenlos';
|
||||
} elseif (!empty($video['freeWithAds'])) {
|
||||
$content .= 'Kostenlos mit Werbung';
|
||||
} else {
|
||||
$content .= 'Premium';
|
||||
}
|
||||
$content .= '</p>';
|
||||
}
|
||||
|
||||
// Show-Info (falls verfügbar)
|
||||
if (isset($episodeDetails['show']['summary']) && !empty($episodeDetails['show']['summary'])) {
|
||||
$content .= '<hr><p><strong>Über die Serie:</strong><br>' . nl2br(htmlspecialchars($episodeDetails['show']['summary'])) . '</p>';
|
||||
$content .= '<p>' . nl2br(htmlspecialchars($episodeDetails['summary'])) . '</p>';
|
||||
}
|
||||
|
||||
$item['content'] = $content;
|
||||
|
||||
Reference in New Issue
Block a user