|
20 | 20 | ], |
21 | 21 | 'blueprints' => [ |
22 | 22 | 'pages/podcasterfeed' => __DIR__ . '/blueprints/pages/podcasterfeed.yml', |
23 | | - 'tabs/podcasterepisode' => __DIR__ . '/blueprints/tabs/episode.yml' |
| 23 | + 'tabs/podcasterepisode' => __DIR__ . '/blueprints/tabs/episode.yml', |
| 24 | + 'files/podcaster-episode' => __DIR__ . '/blueprints/files/podcaster-episode.yml' |
24 | 25 | ], |
25 | 26 | 'snippets' => [ |
26 | 27 | 'podcaster-player' => __DIR__ . '/snippets/podcaster-player.php', |
27 | 28 | 'podcaster-podlove-player' => __DIR__ . '/snippets/podlove-player.php', |
28 | | - 'podcaster-html5-player' => __DIR__ . '/snippets/html5-player.php' |
| 29 | + 'podcaster-html5-player' => __DIR__ . '/snippets/html5-player.php', |
| 30 | + 'podcaster-ogaudio' => __DIR__ . '/snippets/og-audio.php' |
29 | 31 | ], |
30 | 32 | 'routes' => [ |
31 | 33 | [ |
32 | 34 | 'pattern' => '(:all)/' . option('mauricerenck.podcaster.defaultFeed', 'feed'), |
33 | 35 | 'action' => function ($slug) { |
34 | | - $page = page($slug . '/' . option('mauricerenck.podcaster.defaultFeed', 'feed')); |
| 36 | + $podcasterUtils = new PodcasterUtils(); |
| 37 | + $page = $podcasterUtils->getPageFromSlug($slug. '/' . option('mauricerenck.podcaster.defaultFeed', 'feed')); |
35 | 38 |
|
36 | 39 | if(option('mauricerenck.podcaster.statsInternal') === true) { |
37 | 40 | $stats = new PodcasterStats(); |
|
67 | 70 | [ |
68 | 71 | 'pattern' => '(:all)/' . option('mauricerenck.podcaster.downloadTriggerPath', 'download') . '/(:any)', |
69 | 72 | 'action' => function ($slug, $filename) { |
70 | | - $episode = page($slug); |
| 73 | + |
| 74 | + $podcasterUtils = new PodcasterUtils(); |
| 75 | + $episode = $podcasterUtils->getPageFromSlug($slug); |
| 76 | + |
71 | 77 | $podcast = $episode->siblings()->find('feed'); |
72 | 78 |
|
73 | 79 | if(option('mauricerenck.podcaster.statsInternal') === true) { |
|
107 | 113 | ], |
108 | 114 | 'hooks' => [ |
109 | 115 | 'file.create:after' => function ($file) { |
110 | | - if($file->isAudio()) { |
| 116 | + if($file->extension() == 'mp3') { |
111 | 117 | try { |
112 | 118 | $audioUtils = new PodcasterAudioUtils(); |
113 | 119 | $audioUtils->setAudioFileMeta($file); |
|
117 | 123 | } |
118 | 124 | }, |
119 | 125 | 'file.replace:after' => function ($file) { |
120 | | - if ($file->isAudio()) { |
| 126 | + if($file->extension() == 'mp3') { |
121 | 127 | try { |
122 | 128 | $audioUtils = new PodcasterAudioUtils(); |
123 | 129 | $audioUtils->setAudioFileMeta($file); |
|
0 commit comments