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);
|
||||
|
||||
// Get episode image
|
||||
$image = $this->stringOrNull($item->image->url);
|
||||
|
||||
if (!isset($image) && isset($iTunesItemChildren)) {
|
||||
if (isset($iTunesItemChildren)) {
|
||||
$imageAttributes = $iTunesItemChildren->image->attributes();
|
||||
$image = $this->stringOrNull(isset($imageAttributes) ? (string) $imageAttributes->href : '');
|
||||
}
|
||||
|
||||
if (!isset($image)) {
|
||||
$image = $this->stringOrNull($channel->image->url);
|
||||
}
|
||||
|
||||
if (!isset($image) && isset($iTunesChannelChildren)) {
|
||||
$imageAttributes = $iTunesChannelChildren->image->attributes();
|
||||
$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)) {
|
||||
preg_match('/<itunes:image\s+href="([^"]+)"/', $xmlString, $matches);
|
||||
if (count($matches) > 1) {
|
||||
|
Loading…
Reference in New Issue
Block a user