Skip to content

[HOTFIX] Fix uploading cover art manually #2094

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 3 commits into from
Jul 19, 2025
Merged

Conversation

gantoine
Copy link
Member

Checklist
Please check all that apply.

  • I've tested the changes locally
  • I've updated relevant comments
  • I've assigned reviewers for this PR
  • I've added unit tests that cover the changes

@gantoine gantoine requested a review from Copilot July 19, 2025 03:30
Copy link

trunk-io bot commented Jul 19, 2025

Running Code Quality on PRs by uploading data to Trunk will soon be removed. You can still run checks on your PRs using trunk-action - see the migration guide for more information.

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 hotfix addresses manual cover art uploading functionality by refactoring the image handling logic and updating return types to use None instead of empty strings. The changes consolidate artwork processing into a dedicated method and ensure consistent null handling across the filesystem resource handlers.

  • Refactored manual artwork upload handling to use a new centralized store_artwork method
  • Changed return types from empty strings to None for better null handling consistency
  • Cleaned up debug print statements and unused imports

Reviewed Changes

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

Show a summary per file
File Description
backend/handler/metadata/igdb_handler.py Removed debug print statement
backend/handler/filesystem/tests/test_resources_handler.py Updated test assertions to expect None instead of empty strings and fixed method calls
backend/handler/filesystem/resources_handler.py Changed return types to use None, added new store_artwork method, refactored build_artwork_path
backend/handler/filesystem/base_handler.py Removed debug print statement
backend/endpoints/rom.py Refactored artwork handling to use new store_artwork method, removed unused PIL import
backend/endpoints/collections.py Updated to use new store_artwork method, removed unused PIL import

@gantoine gantoine force-pushed the hotfix-cover-upload branch from fe03131 to 73545ff Compare July 19, 2025 03:32
Copy link

github-actions bot commented Jul 19, 2025

Test Results

318 tests  ±0   318 ✅ ±0   44s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 2acae8c. ± Comparison against base commit 28bc570.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 19, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
8002 5240 65% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
backend/endpoints/collections.py 34% 🟢
backend/endpoints/rom.py 39% 🟢
backend/handler/filesystem/base_handler.py 96% 🟢
backend/handler/filesystem/resources_handler.py 70% 🟢
backend/handler/metadata/igdb_handler.py 69% 🟢
TOTAL 62% 🟢

updated for commit: 2acae8c by action🐍

@gantoine gantoine merged commit 8d3419e into master Jul 19, 2025
9 checks passed
@gantoine gantoine deleted the hotfix-cover-upload branch July 19, 2025 04:01
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