fix: episode image retrival
This commit is contained in:
parent
767a6e9bac
commit
b2f2a96f2b
@ -61,14 +61,9 @@ class EpisodeActionReader
|
||||
// Get episode image
|
||||
$image = $this->stringOrNull($item->image->url);
|
||||
|
||||
$itemChildren = $item->children('http://www.itunes.com/dtds/podcast-1.0.dtd');
|
||||
if (!$image && $itemChildren) {
|
||||
$imageAttributes = (array) $itemChildren->image->attributes();
|
||||
$image = $this->stringOrNull(array_key_exists('href', $imageAttributes) ? (string) $imageAttributes['href'] : '');
|
||||
}
|
||||
|
||||
if (!$image && $iTunesItemChildren) {
|
||||
$image = $this->stringOrNull($iTunesItemChildren->image['href']);
|
||||
$imageAttributes = $iTunesItemChildren->image->attributes();
|
||||
$image = $this->stringOrNull($imageAttributes ? (string) $imageAttributes->href : '');
|
||||
}
|
||||
|
||||
if (!$image) {
|
||||
@ -76,15 +71,8 @@ class EpisodeActionReader
|
||||
}
|
||||
|
||||
if (!$image && $iTunesChannelChildren) {
|
||||
$image = $this->stringOrNull($iTunesChannelChildren->image['href']);
|
||||
}
|
||||
|
||||
if (!$image) {
|
||||
$channelChildren = $channel->children('http://www.itunes.com/dtds/podcast-1.0.dtd');
|
||||
if ($channelChildren) {
|
||||
$imageAttributes = (array) $channelChildren->image->attributes();
|
||||
$image = $this->stringOrNull(array_key_exists('href', $imageAttributes) ? (string) $imageAttributes['href'] : '');
|
||||
}
|
||||
$imageAttributes = $iTunesChannelChildren->image->attributes();
|
||||
$image = $this->stringOrNull($imageAttributes ? (string) $imageAttributes->href : '');
|
||||
}
|
||||
|
||||
if (!$image) {
|
||||
|
Loading…
Reference in New Issue
Block a user