Skip to content

Commit 344eb27

Browse files
authored
🐛 Fix search extractor (#2493)
* 🐛 Fix search extractor * 📝 Update changelog * 📝 Update changelog
1 parent 33f1c1a commit 344eb27

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55

66
## [0.14.0]
77

8-
### Breaking
8+
### Breaking ⚠️
99

1010
- Disable clustering by default [#2377](https://github.com/ViewTube/viewtube/pull/2377)
11+
- Clustering is now disabled by default. If you want to use clustering, you have to set the `VIEWTUBE_CLUSTERED` environment variable to `true`.
1112

1213
### Added
1314

1415
- Directly call fastify instance from nuxt server [#2377](https://github.com/ViewTube/viewtube/pull/2377)
1516
- Detect theme from system [#2379](https://github.com/ViewTube/viewtube/pull/2379)
1617
- Upgrade dependencies [#2380](https://github.com/ViewTube/viewtube/pull/2380)
1718

19+
### Changed
20+
21+
- Switch homepage to trending, as popular was causing issues [#2490](https://github.com/ViewTube/viewtube/pull/2490)
22+
1823
### Fixed
1924

2025
- Fix nuxt import on windows (only relevant for development) [#2377](https://github.com/ViewTube/viewtube/pull/2377)
2126
- Fix "window is not defined" when logged in and "Rewrite YouTube URLs" is enabled [#2469](https://github.com/ViewTube/viewtube/pull/2469)
27+
- Fix certain search terms not working [#2493](https://github.com/ViewTube/viewtube/pull/2493)
2228

2329
## [0.13.1]
2430

server/src/mapper/converter/search/vt-search-result.extractors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const extractSearchVideo = (video: SearchSourceApproximation) => {
146146
date: parseRelativeTime(video.published?.text)?.toDate(),
147147
text: video.published?.text
148148
},
149-
live: video.badges.some(badge => badge.label === 'LIVE')
149+
live: video.badges?.some(badge => badge.label === 'LIVE')
150150
} satisfies VTSearchVideoResultDto;
151151
};
152152

server/src/mapper/utils/handle.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export const getHandleFromUrl = (url: string): string => {
2+
if (!url) return '';
23
const handleMatch = url.match(/\/@(.*)?\/?/i);
34
if (handleMatch?.[1]) {
45
return `@${handleMatch[1]}`;

0 commit comments

Comments
 (0)