Adds Target Videos Sorting and new filter options#267
Draft
mr-szgz wants to merge 18 commits into
Draft
Conversation
- Introduced `SortableListItem` class in `list_widgets.py` to support sorting of list items based on various attributes such as date, name, resolution, and file size. - Implemented sorting logic and formatting for different data types within the `SortableListItem` class. - Enhanced `CardButton` class in `widget_components.py` to include serialization methods for different card button types, allowing for consistent ID retrieval. - Updated `TargetMediaCardButton`, `TargetFaceCardButton`, and `EmbeddingCardButton` classes to implement the `to_id` method for serialization. - Added a new `uv.lock` file to manage Python package dependencies with versioning.
- Introduced new SVG glyphs for sorting: sort-size-big_on.svg, sort-size-small_bold-flipv.svg, sort-size-small_bold.svg, sort-size-small_on-flipv.svg, sort-size-small_on.svg. - Refactored the sorting mechanism in main_ui.py to utilize a more structured approach with Sortable and SortableListItem classes. - Updated the target videos sorting logic to support new sorting modes and improved UI responsiveness. - Removed deprecated sorting methods and integrated new sorting logic into the existing UI framework. - Enhanced tooltip information for media items in the list view to provide better context for sorting.
- Re-enabled target video sorting widgets and connected signals for sorting actions in main_ui.py. - Updated set_up_target_video_sorting_combobox to directly manipulate the main window's combo box. - Improved error handling in add_media_thumbnail_button for adding items to the list widget. - Removed commented-out code related to SortableListWidget and its methods in list_widgets.py for clarity. - Enhanced tooltip generation in SortableListItem with debug logging for better traceability.
- Added image dimension sliders for target videos with a range from 0 to 8K UHD. - Implemented filtering options for images, videos, and webcams with default states. - Improved sorting capabilities by integrating image dimensions and pixel counts. - Refactored filter and sorting logic to streamline the user interface and enhance performance. - Updated the `extract_frame_as_image` function to allow customizable scaling of thumbnails. - Fixed issues related to signal connections and widget visibility in the UI. - Addressed circular import issues and ensured proper initialization of components. - Added debug logging for better traceability during development and troubleshooting.
- Introduced `target_videos_list_actions.py` to encapsulate actions related to target videos list management. - Updated `MainWindow.ui` to include a status line edit for displaying target media status. - Modified `main_window.py` to connect new UI components and actions for better user feedback. - Adjusted progress bar handling in `ui_workers.py` to reflect loading status of target media. - Cleaned up unused imports and functions in `filter_actions.py` and `list_view_actions.py`. - Enhanced signal-slot connections for better responsiveness in the UI.
…ts module - Consolidated event filter classes for graphics view, video seek slider, and list widgets into a single file for better organization and maintainability. - Introduced a new sortable_widgets module to handle sortable list items and their associated logic, improving code structure. - Removed the deprecated list_widgets module to streamline the codebase. - Updated settings layout data to clarify workspace auto-load and auto-save options. - Enhanced the UI worker classes to utilize the new sortable widgets, ensuring compatibility with the updated structure. - Added debug print statements for better traceability during media loading processes.
- Removed the target videos reload button from the main window UI. - Updated icons for the search reset button, sort direction button, filter menu button, and various checkboxes to use consistent icon variables. - Changed the handling of image dimensions to use a new `SortableImageDimension` class for better clarity and consistency. - Modified the `add_media_thumbnail_button` function to retrieve video frame information and store it in the list item. - Updated the sorting logic to accommodate the new `VideoInfo` and `VideoFrame` data roles. - Refactored the `SortableListWidgetItem` to include methods for handling video information and frames. - Adjusted the `FilterWorker` to check for `SortableImageDimension` instead of the old `ImageDimension`.
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.
Summary
This work upgrades the target videos list into a more capable, metadata-driven, sortable/filterable UI while refactoring the list architecture to improve maintainability, responsiveness, and reliability.
Feature Additions
Sortable Target Videos List Refactor
app\ui\widgets\sortable_widgets.py)Custom widgets & new traversal paths
Using TargetVideosListWidget in MainWindow.ui
Added Sorting Modes
Added Sorting Options