-
-
Notifications
You must be signed in to change notification settings - Fork 8
fix(targets): add multiple library matching #253
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
Deploying autopulseui with
|
| Latest commit: |
c4fd83d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e421aa41.autopulseui.pages.dev |
| Branch Preview URL: | https://fix-targets-multiple-librari.autopulseui.pages.dev |
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 issue #244 by enhancing the library matching logic to support multiple matching libraries. Key changes include:
- Changing the Plex target’s and Emby's get_library functions to get_libraries that return all matching libraries.
- Updating the process logic in Plex to utilize a HashMap for tracking event scan success statuses.
- Modifying tests to verify the correct ordering and values of returned libraries.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/service/src/settings/targets/plex.rs | Updated library matching logic and event processing to handle multiple libraries, with adjusted success tracking |
| crates/service/src/settings/targets/emby.rs | Revised library matching from single (Option) to multiple (Vec), with corresponding adjustments in event library lookup |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
…accurate status management
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 issue #244 by updating library matching logic for Plex and Emby targets to support handling multiple libraries.
- Update Plex and Emby code to return and process multiple matching libraries instead of a single match.
- Adjust tests to validate that the first match is correctly prioritized.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| crates/service/src/settings/targets/plex.rs | Modified library lookup to return multiple matches and updated event scanning logic. |
| crates/service/src/settings/targets/emby.rs | Updated library matching and scan result aggregation to support multiple libraries. |
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 an issue with library matching by refactoring both Plex and Emby targets to support returning multiple library matches instead of a single one. Key changes include:
- Changing the API methods from get_library to get_libraries to return vectors of matches.
- Updating event processing to aggregate results using a HashMap for success tracking.
- Modifying tests accordingly to reflect the new multi-library matching behavior.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/service/src/settings/targets/plex.rs | Refactored get_library to get_libraries; updated logic in process to collect multiple library matches and track scan success with a HashMap. |
| crates/service/src/settings/targets/emby.rs | Refactored get_library to get_libraries; updated processing flow to handle multiple library matches and aggregate scan outcomes using a HashMap. |
Description
Closes #244
Type of change