Skip to content

Commit

Permalink
Merge pull request #17 from mauricerenck/develop
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
mauricerenck authored May 4, 2019
2 parents d14b423 + ff05fdb commit 62a0c2f
Show file tree
Hide file tree
Showing 8 changed files with 39 additions and 47 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@
/vendor/symfony
/vendor/theseer
/vendor/webmozart
/.history
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"email": "[email protected]"
}
],
"version": "1.0.3",
"version": "1.0.4",
"autoload": {
"files": [
"utils/PodcasterUtils.php",
Expand Down
56 changes: 28 additions & 28 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
'pattern' => '(:all)/' . option('mauricerenck.podcaster.defaultFeed', 'feed'),
'action' => function ($slug) {
$podcasterUtils = new PodcasterUtils();

$page = $podcasterUtils->getPageFromSlug($slug. '/' . option('mauricerenck.podcaster.defaultFeed', 'feed'));

if(option('mauricerenck.podcaster.statsInternal') === true) {
Expand Down Expand Up @@ -102,7 +103,7 @@
$episode = $podcasterUtils->getPageFromSlug($slug);
$podcasterUtils->setCurrentEpisode($episode);

$podcast = $episode->siblings()->find('feed');
$podcast = $episode->siblings()->find(option('mauricerenck.podcaster.defaultFeed', 'feed'));

if(option('mauricerenck.podcaster.statsInternal') === true) {
$stats = new PodcasterStats();
Expand Down
12 changes: 0 additions & 12 deletions routes.php

This file was deleted.

4 changes: 2 additions & 2 deletions snippets/podlove-player.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

$audioFile = $podcasterUtils->getPodcastFile();
?>
<div id="podlovePlayer"></div>
<div id="podlovePlayerContainer"></div>
<script src="//cdn.podlove.org/web-player/embed.js"></script>

<script>
podlovePlayer('#podlovePlayer', {
podlovePlayer('#podlovePlayerContainer', {
<?php if($podcast->podcasterPodloveMainColor()->isNotEmpty() && $podcast->podcasterPodloveHighlighColor()->isNotEmpty()) : ?>
theme: {
main: '#<?php echo str_replace('#', '', $podcast->podcasterPodloveMainColor()); ?>',
Expand Down
3 changes: 2 additions & 1 deletion utils/PodcasterStats.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ public function increaseDownloads($page, int $trackingDate): void {
$stats = new PodcasterStatsMySql();
}

$stats->increaseDownloads($page, $trackingDate);

$podTrack = new PodcasterStatsPodTrac();
$podTrack->increaseDownloads($page);

$stats->increaseDownloads($page, $trackingDate);
}

public function increaseFeedVisits($page, int $trackingDate) {
Expand Down
5 changes: 3 additions & 2 deletions utils/PodcasterStatsMysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ public function increaseDownloads($episode, string $trackingDate) {
$downloadDate = $this->formatTrackingDate($trackingDate);
$episodeStats = $this->getEpisodeStats($episode->uid(), $downloadDate);

$podcast = str::slug($episode->siblings()->find('feed')->podcasterTitle());
$podcast = str::slug($episode->siblings()->find(option('mauricerenck.podcaster.defaultFeed', 'feed'))->podcasterTitle());

if(!$episodeStats) {
$this->setDownloads($podcast, $episode->uid(), $downloadDate);
return true;
Expand Down Expand Up @@ -161,4 +162,4 @@ private function formatTrackingDate($timestamp): string {
return date('Y-m-d', $timestamp);
}

}
}

0 comments on commit 62a0c2f

Please sign in to comment.