Skip to content

Commit

Permalink
🐛 Fix search extractor (#2493)
Browse files Browse the repository at this point in the history
* 🐛 Fix search extractor

* 📝 Update changelog

* 📝 Update changelog
  • Loading branch information
moisout authored Dec 12, 2023
1 parent 33f1c1a commit 344eb27
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.14.0]

### Breaking
### Breaking ⚠️

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

### Added

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

### Changed

- Switch homepage to trending, as popular was causing issues [#2490](https://github.com/ViewTube/viewtube/pull/2490)

### Fixed

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

## [0.13.1]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const extractSearchVideo = (video: SearchSourceApproximation) => {
date: parseRelativeTime(video.published?.text)?.toDate(),
text: video.published?.text
},
live: video.badges.some(badge => badge.label === 'LIVE')
live: video.badges?.some(badge => badge.label === 'LIVE')
} satisfies VTSearchVideoResultDto;
};

Expand Down
1 change: 1 addition & 0 deletions server/src/mapper/utils/handle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const getHandleFromUrl = (url: string): string => {
if (!url) return '';
const handleMatch = url.match(/\/@(.*)?\/?/i);
if (handleMatch?.[1]) {
return `@${handleMatch[1]}`;
Expand Down

0 comments on commit 344eb27

Please sign in to comment.