fix: 💄 take itunes image first
This commit is contained in:
parent
1302c82fdb
commit
f94b529d6d
@ -55,22 +55,24 @@ class EpisodeActionReader extends CoreEpisodeActionReader
|
|||||||
$link = $this->stringOrNull($item->link);
|
$link = $this->stringOrNull($item->link);
|
||||||
|
|
||||||
// Get episode image
|
// Get episode image
|
||||||
$image = $this->stringOrNull($item->image->url);
|
if (isset($iTunesItemChildren)) {
|
||||||
|
|
||||||
if (!isset($image) && isset($iTunesItemChildren)) {
|
|
||||||
$imageAttributes = $iTunesItemChildren->image->attributes();
|
$imageAttributes = $iTunesItemChildren->image->attributes();
|
||||||
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($image)) {
|
|
||||||
$image = $this->stringOrNull($channel->image->url);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($image) && isset($iTunesChannelChildren)) {
|
if (!isset($image) && isset($iTunesChannelChildren)) {
|
||||||
$imageAttributes = $iTunesChannelChildren->image->attributes();
|
$imageAttributes = $iTunesChannelChildren->image->attributes();
|
||||||
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!isset($image)) {
|
||||||
|
$image = $this->stringOrNull($item->image->url);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isset($image)) {
|
||||||
|
$image = $this->stringOrNull($channel->image->url);
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($image)) {
|
if (!isset($image)) {
|
||||||
preg_match('/<itunes:image\s+href="([^"]+)"/', $xmlString, $matches);
|
preg_match('/<itunes:image\s+href="([^"]+)"/', $xmlString, $matches);
|
||||||
if (count($matches) > 1) {
|
if (count($matches) > 1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user