Skip to content

Commit 3e01921

Browse files
committed
chore: cleanup and fixes
1 parent 940711f commit 3e01921

File tree

6 files changed

+25
-1871
lines changed

6 files changed

+25
-1871
lines changed

index.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
'Plugin\Podcaster\PodcasterStatsFile' => 'utils/PodcasterStatsFile.php',
1919
'Plugin\Podcaster\PodcasterStatsPodTrac' => 'utils/PodcasterStatsPodTrac.php',
2020
'Plugin\Podcaster\PodcasterWizard' => 'utils/PodcasterWizard.php',
21-
// 'Plugin\Podcaster\PiwikTracker' => 'lib/PiwikTracker.php'
2221
], __DIR__);
2322

2423
Kirby::plugin('mauricerenck/podcaster', [
@@ -98,9 +97,9 @@
9897
$stats->increaseFeedVisits($podcast, $trackingDate);
9998
}
10099

101-
if ($feed->podcasterMatomoFeedEnabled()->isTrue()) {
102-
$matomoUtils = new PodcasterStatsMatomo($podcast->podcasterMatomoSiteId(), $episode);
103-
$matomoUtils->trackEpisodeDownload($podcast);
100+
if ($podcast->podcasterMatomoFeedEnabled()->isTrue()) {
101+
$matomoUtils = new PodcasterStatsMatomo($podcast->podcasterMatomoSiteId());
102+
$matomoUtils->trackFeedDownload($podcast);
104103
}
105104

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

125124
if ($podcast->podcasterMatomoEnabled()->isTrue()) {
126-
$matomoUtils = new PodcasterStatsMatomo($podcast->podcasterMatomoSiteId(), $episode);
127-
$matomoUtils->trackEpisodeDownload($podcast);
125+
$matomoUtils = new PodcasterStatsMatomo($podcast->podcasterMatomoSiteId());
126+
$matomoUtils->trackEpisodeDownload($podcast, $episode);
128127
}
129128

130129
$filename = str_replace('.mp3', '', $filename);

0 commit comments

Comments
 (0)