8000 Feature/202505 native preview image by qdraw · Pull Request #2147 · qdraw/starsky · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature/202505 native preview image #2147

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 53 commits into from
May 15, 2025
Merged

Conversation

qdraw
Copy link
Owner
@qdraw qdraw commented May 10, 2025

PR Details

Description / Motivation and Context

This pull request introduces several changes across multiple files, primarily focusing on improving thumbnail generation, enhancing socket-based communication, and refactoring database query methods. Key updates include the addition of new services for thumbnail management, modifications to existing methods for better functionality, and code cleanup to improve readability and maintainability.

Thumbnail Generation Enhancements:

  • Introduced ISmallThumbnailBackgroundJobService and implemented it in SmallThumbnailBackgroundJobService to handle background jobs for small thumbnails. This includes queue management and generating thumbnails of type ThumbnailGenerationType.SmallOnly. [1] [2]
  • Added IThumbnailSocketService and implemented it in ThumbnailSocketService to manage WebSocket notifications for thumbnail updates. This replaces the previous IWebSocketConnectionsService usage in ManualThumbnailGenerationService. [1] [2] [3]
  • Updated ManualThumbnailGenerationService to use ThumbnailSocketService for sending thumbnail generation results via WebSocket. Removed redundant methods like WhichFilesNeedToBePushedForUpdates. [1] [2]

Database Query Refactoring:

  • Simplified and modernized database query methods by removing unused code, reformatting methods, and improving readability. For instance, GetAllFilesQuery and GetAllObjectsQuery now use normalized paths and streamlined logic. [1] [2] [3]
  • Adjusted exception handling and logging in database queries to use more appropriate log levels (e.g., LogDebug instead of LogInformation).

Code Cleanup and Minor Improvements:

  • Removed unused imports and dependencies across several files, such as in ManualThumbnailGenerationService and QueryGetAllFiles. This reduces clutter and improves maintainability. [1] [2]
  • Fixed a typo in the XML documentation of IQuery to improve clarity.
  • Updated package.json to include a new format script for code formatting.

These changes collectively enhance the functionality, performance, and maintainability of the codebase, particularly in the areas of thumbnail generation and database operations.

Related Issue

How Has This Been Tested

  • C# Unit tests
  • Typescript Unit tests
  • Other Unit tests
  • Manual tests
  • Automatic End2end tests (starsky-tools/end2end)

Types of changes

  • Added for new features
  • Breaking change fix or feature that would cause existing functionality to change
  • Changed for non-breaking changes in existing functionality for example docs change / refactoring / dependency upgrades
  • Deprecated for soon-to-be removed features
  • Removed for now removed features
  • Fixed for any bug fixes
  • Security in case of vulnerabilities

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation accordingly (update when needed)
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the ./history.md document

@qdraw qdraw requested a review from Copilot May 15, 2025 18:20
Copy link
Contributor
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves thumbnail handling and database query efficiency while cleaning up unused code and modernizing syntax across the codebase.

  • Introduces native preview image generation for macOS and Windows.
  • Refactors multiple database query methods and adjusts error logging.
  • Implements new thumbnail generation services and updates WebSocket notification handling.

Reviewed Changes

Copilot reviewed 81 out of 81 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
starsky/starsky.foundation.native/PreviewImageNative/*.cs New native preview image service and helper implementations for macOS and Windows.
starsky/starsky.foundation.database/Query/*.cs Refactored queries with updated error handling, logging, and utilization of new features.
starsky/starsky.feature.thumbnail/Services/*.cs Updated thumbnail generation services, background job service, and WebSocket notification.
starsky/starsky.feature.export/Services/ExportService.cs Adjusted thumbnail generation call with improved ThumbnailGenerationType usage.
starsky/package.json Added a new format script for code formatting.

qdraw and others added 3 commits May 15, 2025 20:21
…roundJobService.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link

@qdraw qdraw merged commit ddcbfc2 into master May 15, 2025
29 checks passed
@qdraw qdraw deleted the feature/202505_native_preview_image branch May 15, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0