Skip to content

Commit

Permalink
chore: cleanup and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricerenck committed Jul 3, 2020
1 parent 940711f commit 3e01921
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 1,871 deletions.
11 changes: 5 additions & 6 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
'Plugin\Podcaster\PodcasterStatsFile' => 'utils/PodcasterStatsFile.php',
'Plugin\Podcaster\PodcasterStatsPodTrac' => 'utils/PodcasterStatsPodTrac.php',
'Plugin\Podcaster\PodcasterWizard' => 'utils/PodcasterWizard.php',
// 'Plugin\Podcaster\PiwikTracker' => 'lib/PiwikTracker.php'
], __DIR__);

Kirby::plugin('mauricerenck/podcaster', [
Expand Down Expand Up @@ -98,9 +97,9 @@
$stats->increaseFeedVisits($podcast, $trackingDate);
}

if ($feed->podcasterMatomoFeedEnabled()->isTrue()) {
$matomoUtils = new PodcasterStatsMatomo($podcast->podcasterMatomoSiteId(), $episode);
$matomoUtils->trackEpisodeDownload($podcast);
if ($podcast->podcasterMatomoFeedEnabled()->isTrue()) {
$matomoUtils = new PodcasterStatsMatomo($podcast->podcasterMatomoSiteId());
$matomoUtils->trackFeedDownload($podcast);
}

return new Response($podcast->render(), 'text/xml');
Expand All @@ -123,8 +122,8 @@
}

if ($podcast->podcasterMatomoEnabled()->isTrue()) {
$matomoUtils = new PodcasterStatsMatomo($podcast->podcasterMatomoSiteId(), $episode);
$matomoUtils->trackEpisodeDownload($podcast);
$matomoUtils = new PodcasterStatsMatomo($podcast->podcasterMatomoSiteId());
$matomoUtils->trackEpisodeDownload($podcast, $episode);
}

$filename = str_replace('.mp3', '', $filename);
Expand Down
Loading

0 comments on commit 3e01921

Please sign in to comment.