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