Skip to content

Commit

Permalink
Merge branch 'blakeblackshear:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
weitheng authored Nov 2, 2024
2 parents a124584 + d7935ab commit b92285c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions docker/main/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ ENV TOKENIZERS_PARALLELISM=true
# https://github.com/huggingface/transformers/issues/27214
ENV TRANSFORMERS_NO_ADVISORY_WARNINGS=1

# Set OpenCV ffmpeg loglevel to fatal: https://ffmpeg.org/doxygen/trunk/log_8h.html
ENV OPENCV_FFMPEG_LOGLEVEL=8

ENV PATH="/usr/local/go2rtc/bin:/usr/local/tempio/bin:/usr/local/nginx/sbin:${PATH}"
ENV LIBAVFORMAT_VERSION_MAJOR=60

Expand Down
2 changes: 1 addition & 1 deletion frigate/util/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ async def calculate_duration(video: Optional[any]) -> float:
width = height = 0

try:
# Open the video stream
# Open the video stream using OpenCV
video = cv2.VideoCapture(url)

# Check if the video stream was opened successfully
Expand Down
5 changes: 2 additions & 3 deletions web/src/pages/Explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -428,9 +428,8 @@ export default function Explore() {
searchTerm={searchTerm}
searchFilter={searchFilter}
searchResults={searchResults}
isLoading={
(isLoadingInitialData || isLoadingMore || isValidating) ?? true
}
isLoading={(isLoadingInitialData || isLoadingMore) ?? true}
isValidating={isValidating}
hasMore={!isReachingEnd}
columns={gridColumns}
defaultView={defaultView}
Expand Down
7 changes: 5 additions & 2 deletions web/src/views/search/SearchView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type SearchViewProps = {
searchFilter?: SearchFilter;
searchResults?: SearchResult[];
isLoading: boolean;
isValidating: boolean;
hasMore: boolean;
columns: number;
defaultView?: string;
Expand All @@ -55,6 +56,7 @@ export default function SearchView({
searchFilter,
searchResults,
isLoading,
isValidating,
hasMore,
columns,
defaultView = "summary",
Expand Down Expand Up @@ -397,8 +399,9 @@ export default function SearchView({
</div>
)}

{isLoading &&
(searchTerm ||
{((isLoading && uniqueResults?.length == 0) || // show on initial load
(isValidating && !isLoading)) && // or revalidation
(searchTerm || // or change of filter/search term
(searchFilter && Object.keys(searchFilter).length !== 0)) && (
<ActivityIndicator className="absolute left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 rounded-2xl bg-background/80 p-3 dark:bg-background/50" />
)}
Expand Down

0 comments on commit b92285c

Please sign in to comment.