Skip to content

Conversation

@dan-online
Copy link
Owner

Description

Closes #244

Type of change

  • Bug (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (addition or change to documentation)

Copilot AI review requested due to automatic review settings May 14, 2025 21:04
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented May 14, 2025

Deploying autopulseui with  Cloudflare Pages  Cloudflare Pages

Latest commit: c4fd83d
Status: ✅  Deploy successful!
Preview URL: https://e421aa41.autopulseui.pages.dev
Branch Preview URL: https://fix-targets-multiple-librari.autopulseui.pages.dev

View logs

Copy link
Contributor

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 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

Copy link
Contributor

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 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.

Copy link
Contributor

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 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.

@dan-online dan-online merged commit 32a3440 into main Jun 1, 2025
20 checks passed
@dan-online dan-online deleted the fix/targets-multiple-libraries branch June 1, 2025 16:47
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.

feat: Add support for path used in multiple libraries

2 participants