diff --git a/CHANGELOG.md b/CHANGELOG.md index cce06a17d55dd7baa779ba64a24d0c223810a69c..58e1750fa87fc15ec581c52210b726ef1592b6aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ yet implemented. [#179](https://git.project-insanity.org/onny/nextcloud-app-podcast/-/issues/179) @onny - Api use getRequestToken [#180](https://git.project-insanity.org/onny/nextcloud-app-podcast/-/issues/180) @onny +- Less mixed content: query fyyd api on server side + [#194](https://git.project-insanity.org/onny/nextcloud-app-podcast/-/issues/194) @onny ## 0.2 - 2021-02 diff --git a/lib/Service/FyydApiService.php b/lib/Service/FyydApiService.php index 6d087a7c66c1683f25b7c2627006c642b2954013..f109e52af91a9cebd17154ccaf8cdac2cd9f86b8 100644 --- a/lib/Service/FyydApiService.php +++ b/lib/Service/FyydApiService.php @@ -114,11 +114,26 @@ class FyydApiService { public function queryCategory(string $category, int $count = 20, int $page = 0) { - $url = "https://api.fyyd.de/0.2/podcast"; - - $options['query'] = [ - 'podcast_id' => $podcast_id, - ]; + if ($category == 'hot') { + $url = "https://api.fyyd.de/0.2/feature/podcast/hot"; + $options['query'] = [ + 'count' => $count, + 'page' => $page, + ]; + } else if ($category == 'latest') { + $url = "https://api.fyyd.de/0.2/podcast/latest"; + $options['query'] = [ + 'count' => $count, + 'page' => $page, + ]; + } else { + $url = "https://api.fyyd.de/0.2/category"; + $options['query'] = [ + 'count' => $count, + 'page' => $page, + 'category_id' => $category, + ]; + } $client = $this->clientService->newClient(); try { diff --git a/package.json b/package.json index 400a9ba0dce7edf09156592523bb18335426abba..fca2a21538fb9ef1edd1b8ddb427c61c9bc606f1 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "stylelint:fix": "stylelint src --fix" }, "dependencies": { + "@nextcloud/auth": "^1.3.0", "@nextcloud/axios": "^1.6.0", "@nextcloud/dialogs": "^3.1.1", "@nextcloud/l10n": "^1.4.1", diff --git a/src/services/ShowApi.js b/src/services/ShowApi.js index e2767375434ecffa02badbb79e257b6d9e192e2e..82045cce17ce18684abba31b4e1c885db3ba98df 100644 --- a/src/services/ShowApi.js +++ b/src/services/ShowApi.js @@ -112,7 +112,7 @@ export class ShowApi { return axios.get(this.url('/shows'), { params: { - category, + category: String(category), count, page, }, diff --git a/src/views/Browse.vue b/src/views/Browse.vue index b6977c114542afaad2d4c62318052d77d0815f80..6dc8afad945ba6b3974a5c8573d3b94ed7d23d95 100644 --- a/src/views/Browse.vue +++ b/src/views/Browse.vue @@ -30,7 +30,7 @@ showallurl="#/browse/hot" :podcasts="podcastsHot" /> <ItemSlider - title="t('podcast', 'New podcasts')" + :title="t('podcast', 'New podcasts')" showallurl="#/browse/new" :podcasts="podcastsLatest" /> </div>