Fix clip scan deduplication by display name#168
Open
justingleader wants to merge 1 commit intonikopueringer:mainfrom
Open
Fix clip scan deduplication by display name#168justingleader wants to merge 1 commit intonikopueringer:mainfrom
justingleader wants to merge 1 commit intonikopueringer:mainfrom
Conversation
Owner
|
I'm not fully understanding the problem being solved here. Can you elaborate for me? I'm not sure if the current behavior is actually causing an issue. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this change?
Fixes a scan bug where
scan_clips_dir()deduplicated clips by the user-visibleclip.nameafter metadata had been loaded. If two distinct clips shared the same display name, the later one was silently dropped from the scan results.This change switches deduplication to the clip's on-disk identity instead, so distinct clips from different projects still appear. It also preserves the existing behavior where a valid folder-backed clip wins over a loose video file with the same stem.
How was it tested?
uv sync --group devuv run pytest -q(173 passed, 1 skipped)uv run ruff check backend/clip_state.py tests/test_clip_state.pyuv run ruff format --check backend/clip_state.py tests/test_clip_state.pyChecklist
uv run pytestpassesuv run ruff checkpassesuv run ruff format --checkpasses