diff --git a/backend/video/src/query_building.py b/backend/video/src/query_building.py index c214bbcc..2a2cd637 100644 --- a/backend/video/src/query_building.py +++ b/backend/video/src/query_building.py @@ -68,9 +68,10 @@ class QueryBuilder: for i in results if not i.get("watched") ] - continue_ids = {"bool": {"should": ids}} + if not ids: + return None - return continue_ids + return {"bool": {"should": ids}} def parse_type(self, video_type: str): """parse video type""" diff --git a/frontend/src/pages/ChannelVideo.tsx b/frontend/src/pages/ChannelVideo.tsx index 5fb199b9..ab43184a 100644 --- a/frontend/src/pages/ChannelVideo.tsx +++ b/frontend/src/pages/ChannelVideo.tsx @@ -81,6 +81,7 @@ const ChannelVideo = ({ videoType }: ChannelVideoProps) => { channelId, pagination?.current_page, videoType, + showEmbeddedVideo, ]); if (!channel) { diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index a5d83c31..11cd89cb 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -155,6 +155,7 @@ const Home = () => { userMeConfig.hide_watched, currentPage, pagination?.current_page, + showEmbeddedVideo, ]); return ( diff --git a/frontend/src/pages/Playlist.tsx b/frontend/src/pages/Playlist.tsx index 936680a7..3ea08180 100644 --- a/frontend/src/pages/Playlist.tsx +++ b/frontend/src/pages/Playlist.tsx @@ -110,7 +110,14 @@ const Playlist = () => { setRefresh(false); })(); // eslint-disable-next-line react-hooks/exhaustive-deps - }, [playlistId, userConfig.config.hide_watched, refresh, currentPage, pagination?.current_page]); + }, [ + playlistId, + userConfig.config.hide_watched, + refresh, + currentPage, + pagination?.current_page, + showEmbeddedVideo, + ]); if (!playlistId || !playlist) { return `Playlist ${playlistId} not found!`; diff --git a/frontend/src/pages/Search.tsx b/frontend/src/pages/Search.tsx index e853dd20..acf39d71 100644 --- a/frontend/src/pages/Search.tsx +++ b/frontend/src/pages/Search.tsx @@ -91,7 +91,7 @@ const Search = () => { } else { setSearchResults(EmptySearchResponse); } - }, [debouncedSearchTerm, refresh]); + }, [debouncedSearchTerm, refresh, showEmbeddedVideo]); const fetchResults = async (searchQuery: string) => { const searchResults = await loadSearch(searchQuery);