Skip to content

Commit

Permalink
Merge pull request #39 from mauricerenck/develop
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
mauricerenck authored Nov 23, 2019
2 parents b683697 + 3016ffe commit 906d461
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 40 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ You can now see your download stats in the panel. This currently works only, if

## Installation

View this [step by step guide](/docs/kirby-podcaster-starterkit.md) on how to setup the plugin with the Kirby Starterkit.

- `composer require mauricerenck/podcaster`
- unzip [master.zip](https://github.com/mauricerenck/kirby-podcaster/releases/latest) as folder `site/plugins/kirby-podcaster`
- `git submodule add https://github.com/mauricerenck/kirby-podcaster.git site/plugins/kirby-podcaster`
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mauricerenck/podcaster",
"version": "1.2.3",
"version": "1.2.4",
"description": "A Kirby Podcast Plugin",
"type": "kirby-plugin",
"license": "MIT",
Expand Down
10 changes: 5 additions & 5 deletions index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "podcaster",
"version": "1.2.3",
"version": "1.2.4",
"description": "A Kirby Podcast Plugin",
"main": "index.js",
"author": "Maurice Renck",
Expand Down
30 changes: 17 additions & 13 deletions snippets/podlove-player.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<?php
namespace Plugin\Podcaster;

require_once __DIR__ . '/../utils/PodcasterUtils.php';
namespace Plugin\Podcaster;

use str;
use addslashes;

require_once __DIR__ . '/../utils/PodcasterUtils.php';

$podcasterUtils = new PodcasterUtils();
$podcasterUtils->setFeed($podcast);
$podcasterUtils->setCurrentEpisode($page);

$cover = false;
if($page->podcasterCover()->isNotEmpty()) {
if ($page->podcasterCover()->isNotEmpty()) {
$cover = $page->podcasterCover()->toFile()->resize(200)->url();
} else if($podcast->podcasterCover()->isNotEmpty()) {
} elseif ($podcast->podcasterCover()->isNotEmpty()) {
$cover = $podcast->podcasterCover()->toFile()->resize(200)->url();
}

Expand All @@ -21,7 +25,7 @@

<script>
podlovePlayer('#podlovePlayerContainer', {
<?php if($podcast->podcasterPodloveMainColor()->isNotEmpty() && $podcast->podcasterPodloveHighlighColor()->isNotEmpty()) : ?>
<?php if ($podcast->podcasterPodloveMainColor()->isNotEmpty() && $podcast->podcasterPodloveHighlighColor()->isNotEmpty()) : ?>
theme: {
main: '#<?php echo str_replace('#', '', $podcast->podcasterPodloveMainColor()); ?>',
highlight: '#<?php echo str_replace('#', '', $podcast->podcasterPodloveHighlighColor()); ?>'
Expand All @@ -34,19 +38,19 @@
audio: <?php echo ($podcast->podcasterPodloveTabsAudio()->isTrue()) ? 'true' : 'false'; ?>,
download: <?php echo ($podcast->podcasterPodloveTabsDownload()->isTrue()) ? 'true' : 'false'; ?>
},
title: '<?php echo $page->podcasterTitle()->or($page->title()); ?>',
subtitle: '<?php echo $page->podcasterSubtitle(); ?>',
summary: '<?php echo $page->podcasterDescription(); ?>',
title: '<?php echo addslashes(Str::replace(Str::unhtml($page->podcasterTitle()->or($page->title())), "\n", ' ')); ?>',
subtitle: '<?php echo addslashes(Str::replace(Str::unhtml($page->podcasterSubtitle()), "\n", ' ')); ?>',
summary: '<?php echo addslashes(Str::replace(Str::unhtml($page->podcasterDescription()), "\n", ' ')); ?>',
publicationDate: '<?php echo date('r', $page->date()->toDate()); ?>',
<?php if($cover !== false) : ?>
<?php if ($cover !== false) : ?>
poster: '<?php echo $cover; ?>',
<?php endif; ?>
link: '<?php echo $page->url(); ?>',
show: {
title: '<?php echo $podcast->podcasterTitle(); ?>',
subtitle: '<?php echo $podcast->podcasterSubtitle(); ?>',
summary: '<?php echo $podcast->podcasterDescription(); ?>',
<?php if($cover !== false) : ?>
title: '<?php echo addslashes(Str::replace(Str::unhtml(($podcast->podcasterTitle())), "\n", ' ')); ?>',
subtitle: '<?php echo addslashes(Str::replace(Str::unhtml($podcast->podcasterSubtitle()), "\n", ' ')); ?>',
summary: '<?php echo addslashes(Str::replace(Str::unhtml($podcast->podcasterDescription()), "\n", ' ')); ?>',
<?php if ($cover !== false) : ?>
poster: '<?php echo $cover; ?>',
<?php endif; ?>
link: '<?php echo $podcast->podcasterLink(); ?>'
Expand Down
5 changes: 1 addition & 4 deletions src/components/Episode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ export default {
this.getStats()
},
computed: {
id() {
return this.$store.state.form.current
},
pageValues() {
return this.$store.getters['form/values'](this.id)
return this.$store.getters['content/values'](this.id)
},
},
watch: {
Expand Down
5 changes: 1 addition & 4 deletions src/components/FeedStats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,8 @@ export default {
}
},
computed: {
id() {
return this.$store.state.form.current
},
pageValues() {
return this.$store.getters['form/values'](this.id)
return this.$store.getters['content/values'](this.id)
},
},
mounted() {
Expand Down
5 changes: 1 addition & 4 deletions src/components/TopTen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,8 @@ export default {
});
},
computed: {
id() {
return this.$store.state.form.current
},
pageValues() {
return this.$store.getters['form/values'](this.id)
return this.$store.getters['content/values'](this.id)
},
},
methods: {
Expand Down
5 changes: 1 addition & 4 deletions src/components/Wizard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,8 @@ export default {
this.headline = this.pageValues.podcasterWizardSrcFeed
},
computed: {
id() {
return this.$store.state.form.current
},
pageValues() {
return this.$store.getters['form/values'](this.id)
return this.$store.getters['content/values'](this.id)
},
},
methods: {
Expand Down
5 changes: 1 addition & 4 deletions src/components/YearGraph.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ export default {
}
},
computed: {
id() {
return this.$store.state.form.current
},
pageValues() {
return this.$store.getters['form/values'](this.id)
return this.$store.getters['content/values'](this.id)
},
},
mounted() {
Expand Down
4 changes: 4 additions & 0 deletions utils/PodcasterAudioUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ protected function parseAudioDuration($seconds)

protected function parseTitle($id3)
{
if (!isset($id3['tags_html'])) {
return null;
}

return $id3['tags_html']['id3v2']['title'][0];
}

Expand Down

0 comments on commit 906d461

Please sign in to comment.