diff --git a/lib/Search/SearchProvider.php b/lib/Search/SearchProvider.php index c84f120cd0dc151f9e5fd330d45296ca39c055e9..56dce0e576c399b01fcbca853dcf1a503d3394bb 100644 --- a/lib/Search/SearchProvider.php +++ b/lib/Search/SearchProvider.php @@ -73,13 +73,13 @@ class SearchProvider implements IProvider { public function search(IUser $user, ISearchQuery $query): SearchResult { $term = $query->getTerm(); - $url = "https://de1.api.radio-browser.info/json/stations/byname/" . $term . "?limit=20"; + $url = "https://api.fyyd.de/0.2/search/podcast?count=10&title=" . $term; $client = $this->clientService->newClient(); try { $response = $client->get($url); } catch (Exception $e) { - $this->logger->error("Could not search for podcast shows: " . $e->getMessage()); + $this->logger->error("Could not search for podcasts: " . $e->getMessage()); throw $e; } $body = $response->getBody(); @@ -87,13 +87,13 @@ class SearchProvider implements IProvider { $result = array_map(function (array $result) use ($term) { return new SearchResultEntry( - $result['favicon'], - $result['name'], - str_replace(",",", ",$result['tags']), - $this->url->linkToRouteAbsolute('podcast.page.index') . '#/search/' . $term, + $result['smallImageURL'], + $result['title'], + $result['description'], + $this->url->linkToRouteAbsolute('podcast.page.index') . '#/browse/show/' . $result['id'], 'icon-podcast-trans' ); - }, $parsed); + }, $parsed['data']); return SearchResult::complete( $this->getName(), diff --git a/src/views/Episode.vue b/src/views/Episode.vue index a8b4f2e665ff6d8f594a6b70b2a043c1d4cf9e41..7f490da1955df8e2fc8583d0f543a97436feb1ef 100644 --- a/src/views/Episode.vue +++ b/src/views/Episode.vue @@ -179,6 +179,7 @@ export default { .podcastImage { width: 200px; height: 200px; + flex-shrink: 0; background-size: cover; background-position: center; box-shadow: 0 4px 60px rgba(0,0,0,.5); @@ -188,6 +189,7 @@ export default { .podcastDescription { max-width: 500px; + width: 100%; color: #ddd; h1 { diff --git a/src/views/Show.vue b/src/views/Show.vue index 7287e67a561ac64b5b81722c94963b896f2ca3bb..63a6540916874ea2c64e1489a56494f72d6dce33 100644 --- a/src/views/Show.vue +++ b/src/views/Show.vue @@ -230,6 +230,7 @@ export default { .podcastImage { width: 200px; height: 200px; + flex-shrink: 0; background-size: cover; background-position: center; box-shadow: 0 4px 60px rgba(0,0,0,.5); @@ -239,6 +240,7 @@ export default { .podcastDescription { max-width: 500px; + width: 100%; color: #ddd; h1 { diff --git a/src/views/ShowEmpty.vue b/src/views/ShowEmpty.vue index ad7e08470d43f2e690e7037393dc099bf14c21f8..65ba57315da52991ab0d389824c4b896d66e8a7d 100644 --- a/src/views/ShowEmpty.vue +++ b/src/views/ShowEmpty.vue @@ -28,13 +28,13 @@ <div class="podcastDescriptionTitle" /> <div class="podcastDescriptionSubTitle" - style="width: 300px;" /> + style="max-width: 300px; width: 100%;" /> <div class="podcastDescriptionSubTitle" - style="width: 400px;" /> + style="max-width: 400px; width: 100%;" /> <div class="podcastDescriptionSubTitle" - style="width: 200px;" /> + style="max-width: 200px; width: 100%;" /> </div> </div> <table class="episodeTable"> @@ -106,6 +106,7 @@ $avatar-offset: 52 + 16; .podcastImageEmpty { width: 200px; height: 200px; + flex-shrink: 0; background-color: #ccc; margin-right: 25px; border-radius: 5px; @@ -116,10 +117,12 @@ $avatar-offset: 52 + 16; .podcastDescriptionEmpty { max-width: 500px; + width: 100%; } .podcastDescriptionTitle { - width: 500px; + max-width: 500px; + width: 100%; height: 35px; border-radius: 5px; margin-bottom: 30px; @@ -163,8 +166,8 @@ $avatar-offset: 52 + 16; 0% { background-position: -100px; } - 40%, 100% { - background-position: 140px; + 60%, 100% { + background-position: 500px; } }