-
Notifications
You must be signed in to change notification settings - Fork 2k
Fix crash in task.imported_items #6326
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
Conversation
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
There was a problem hiding this 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 fixes a crash in the ImportTask.imported_items() method that occurred when the method was called with certain choice flags (like Action.ALBUMS, Action.TRACKS, or Action.SKIP). The issue was triggered by the importsource plugin during the import_task_choice event, which called imported_items() before items were actually imported. The fix replaces an assert False statement with a return of an empty list, which is the appropriate behavior for these edge cases.
Changes:
- Replaces
assert Falsewithreturn []in the else branch ofImportTask.imported_items()method
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6326 +/- ##
=======================================
Coverage 68.95% 68.95%
=======================================
Files 140 140
Lines 18685 18685
Branches 3058 3058
=======================================
Hits 12885 12885
Misses 5153 5153
Partials 647 647
🚀 New features to boost your workflow:
|
4c5fd32 to
d998da2
Compare
d998da2 to
d2600c3
Compare
Description
Fixes #6291
I think it does not hurt if the imported_items() method returned an empty list instead of an throwing an exception if there is nothing in it!
To Do
Documentation.