diff options
Diffstat (limited to 'client/src/app/search/search.service.ts')
-rw-r--r-- | client/src/app/search/search.service.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/app/search/search.service.ts b/client/src/app/search/search.service.ts index 7610fee8c..3cad5aaa7 100644 --- a/client/src/app/search/search.service.ts +++ b/client/src/app/search/search.service.ts | |||
@@ -11,6 +11,7 @@ import { Video } from '@app/shared/video/video.model' | |||
11 | import { AdvancedSearch } from '@app/search/advanced-search.model' | 11 | import { AdvancedSearch } from '@app/search/advanced-search.model' |
12 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 12 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
13 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' | 13 | import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' |
14 | import { peertubeLocalStorage } from '@app/shared/misc/peertube-web-storage' | ||
14 | 15 | ||
15 | @Injectable() | 16 | @Injectable() |
16 | export class SearchService { | 17 | export class SearchService { |
@@ -21,7 +22,11 @@ export class SearchService { | |||
21 | private restExtractor: RestExtractor, | 22 | private restExtractor: RestExtractor, |
22 | private restService: RestService, | 23 | private restService: RestService, |
23 | private videoService: VideoService | 24 | private videoService: VideoService |
24 | ) {} | 25 | ) { |
26 | // Add ability to override search endpoint if the user updated this local storage key | ||
27 | const searchUrl = peertubeLocalStorage.getItem('search-url') | ||
28 | if (searchUrl) SearchService.BASE_SEARCH_URL = searchUrl | ||
29 | } | ||
25 | 30 | ||
26 | searchVideos (parameters: { | 31 | searchVideos (parameters: { |
27 | search: string, | 32 | search: string, |