mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-02 14:29:11 +02:00
feat: add podcast banner field for each podcast + refactor images configuration
- rename image fields on podcast, episode and persons for better clarity - set different sizes config for podcast cover, banner and persons avatars - add tiny size for covers - fix responsive on admin forms
This commit is contained in:
parent
5c56f3e6f0
commit
4a8147bfbb
79 changed files with 506 additions and 419 deletions
|
|
@ -115,9 +115,9 @@ class PodcastImportController extends BaseController
|
|||
property_exists($nsItunes, 'image') && $nsItunes->image !== null &&
|
||||
$nsItunes->image->attributes()['href'] !== null
|
||||
) {
|
||||
$imageFile = download_file((string) $nsItunes->image->attributes()['href']);
|
||||
$coverFile = download_file((string) $nsItunes->image->attributes()['href']);
|
||||
} else {
|
||||
$imageFile = download_file((string) $feed->channel[0]->image->url);
|
||||
$coverFile = download_file((string) $feed->channel[0]->image->url);
|
||||
}
|
||||
|
||||
$location = null;
|
||||
|
|
@ -140,7 +140,8 @@ class PodcastImportController extends BaseController
|
|||
'title' => (string) $feed->channel[0]->title,
|
||||
'description_markdown' => $converter->convert($channelDescriptionHtml),
|
||||
'description_html' => $channelDescriptionHtml,
|
||||
'image' => new Image($imageFile),
|
||||
'cover' => new Image($coverFile),
|
||||
'banner' => null,
|
||||
'language_code' => $this->request->getPost('language'),
|
||||
'category_id' => $this->request->getPost('category'),
|
||||
'parental_advisory' =>
|
||||
|
|
@ -249,7 +250,7 @@ class PodcastImportController extends BaseController
|
|||
'full_name' => $fullName,
|
||||
'unique_name' => slugify($fullName),
|
||||
'information_url' => $podcastPerson->attributes()['href'],
|
||||
'image' => new Image(download_file((string) $podcastPerson->attributes()['img'])),
|
||||
'avatar' => new Image(download_file((string) $podcastPerson->attributes()['img'])),
|
||||
'created_by' => user_id(),
|
||||
'updated_by' => user_id(),
|
||||
]);
|
||||
|
|
@ -326,9 +327,9 @@ class PodcastImportController extends BaseController
|
|||
property_exists($nsItunes, 'image') && $nsItunes->image !== null &&
|
||||
$nsItunes->image->attributes()['href'] !== null
|
||||
) {
|
||||
$episodeImage = new Image(download_file((string) $nsItunes->image->attributes()['href']));
|
||||
$episodeCover = new Image(download_file((string) $nsItunes->image->attributes()['href']));
|
||||
} else {
|
||||
$episodeImage = null;
|
||||
$episodeCover = null;
|
||||
}
|
||||
|
||||
$location = null;
|
||||
|
|
@ -351,7 +352,7 @@ class PodcastImportController extends BaseController
|
|||
),
|
||||
'description_markdown' => $converter->convert($itemDescriptionHtml),
|
||||
'description_html' => $itemDescriptionHtml,
|
||||
'image' => $episodeImage,
|
||||
'cover' => $episodeCover,
|
||||
'parental_advisory' =>
|
||||
property_exists($nsItunes, 'explicit') && $nsItunes->explicit !== null
|
||||
? (in_array((string) $nsItunes->explicit, ['yes', 'true'], true)
|
||||
|
|
@ -402,7 +403,7 @@ class PodcastImportController extends BaseController
|
|||
'full_name' => $fullName,
|
||||
'unique_name' => slugify($fullName),
|
||||
'information_url' => $episodePerson->attributes()['href'],
|
||||
'image' => new Image(download_file((string) $episodePerson->attributes()['img'])),
|
||||
'avatar' => new Image(download_file((string) $episodePerson->attributes()['img'])),
|
||||
'created_by' => user_id(),
|
||||
'updated_by' => user_id(),
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue