refacto: revert podcast to title prop to show on bar
This commit is contained in:
parent
6b6d21fa2f
commit
818124534b
@ -13,6 +13,7 @@ use OCA\GPodderSync\Core\EpisodeAction\EpisodeAction;
|
||||
* @psalm-import-type EpisodeActionType from EpisodeAction
|
||||
*
|
||||
* @psalm-type EpisodeActionExtraDataType = array{
|
||||
* title: string,
|
||||
* url: ?string,
|
||||
* name: string,
|
||||
* link: ?string,
|
||||
@ -30,6 +31,7 @@ use OCA\GPodderSync\Core\EpisodeAction\EpisodeAction;
|
||||
class EpisodeActionExtraData implements \JsonSerializable
|
||||
{
|
||||
public function __construct(
|
||||
private string $title,
|
||||
private ?string $url,
|
||||
private string $name,
|
||||
private ?string $link,
|
||||
@ -102,6 +104,7 @@ class EpisodeActionExtraData implements \JsonSerializable
|
||||
public function toArray(): array {
|
||||
return
|
||||
[
|
||||
'title' => $this->title,
|
||||
'url' => $this->url,
|
||||
'name' => $this->name,
|
||||
'link' => $this->link,
|
||||
|
@ -27,6 +27,7 @@ class EpisodeActionReader extends CoreEpisodeActionReader
|
||||
$episodes = [];
|
||||
$xml = new \SimpleXMLElement($xmlString);
|
||||
$channel = $xml->channel;
|
||||
$title = (string) $channel->title;
|
||||
|
||||
// Find episode by url and add data for it
|
||||
/** @var \SimpleXMLElement $item */
|
||||
@ -108,6 +109,7 @@ class EpisodeActionReader extends CoreEpisodeActionReader
|
||||
$pubDate = $rawPubDate ? new \DateTime($rawPubDate) : null;
|
||||
|
||||
$episodes[] = new EpisodeActionExtraData(
|
||||
$title,
|
||||
$url,
|
||||
$name,
|
||||
$link,
|
||||
|
@ -41,7 +41,7 @@
|
||||
:link="modalEpisode.link"
|
||||
:name="modalEpisode.name"
|
||||
:size="modalEpisode.size"
|
||||
:title="title"
|
||||
:title="modalEpisode.title"
|
||||
:url="modalEpisode.url" />
|
||||
</NcModal>
|
||||
</div>
|
||||
@ -74,12 +74,6 @@ export default {
|
||||
PlayButton,
|
||||
StopButton,
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
episodes: [],
|
||||
|
@ -4,7 +4,7 @@
|
||||
<strong>{{ player.episode.name }}</strong>
|
||||
</a>
|
||||
<router-link :to="hash">
|
||||
<i>{{ player.episode.podcast }}</i>
|
||||
<i>{{ player.episode.title }}</i>
|
||||
</router-link>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -14,7 +14,7 @@
|
||||
:image-url="feed.imageUrl"
|
||||
:link="feed.link"
|
||||
:title="feed.title" />
|
||||
<Episodes v-if="feed" :title="feed.title" />
|
||||
<Episodes v-if="feed" />
|
||||
</NcAppContent>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user