fix continue watching none IDs, add showEmbeddedVideo to useEffect

This commit is contained in:
Simon 2025-01-31 10:38:10 +07:00
parent 702000a493
commit 168412724e
No known key found for this signature in database
GPG Key ID: 2C15AA5E89985DD4
5 changed files with 14 additions and 4 deletions

View File

@ -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"""

View File

@ -81,6 +81,7 @@ const ChannelVideo = ({ videoType }: ChannelVideoProps) => {
channelId,
pagination?.current_page,
videoType,
showEmbeddedVideo,
]);
if (!channel) {

View File

@ -155,6 +155,7 @@ const Home = () => {
userMeConfig.hide_watched,
currentPage,
pagination?.current_page,
showEmbeddedVideo,
]);
return (

View File

@ -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!`;

View File

@ -91,7 +91,7 @@ const Search = () => {
} else {
setSearchResults(EmptySearchResponse);
}
}, [debouncedSearchTerm, refresh]);
}, [debouncedSearchTerm, refresh, showEmbeddedVideo]);
const fetchResults = async (searchQuery: string) => {
const searchResults = await loadSearch(searchQuery);