-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Allow configuration for choosing to delete files #154
Conversation
Warning Review failedThe pull request is closed. WalkthroughThe changes introduce a Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant PlexTokenDeleteSync
participant RadarrUtils
participant SonarrUtils
participant Configuration
User->>PlexTokenDeleteSync: Request to delete movie/series
PlexTokenDeleteSync->>Configuration: Retrieve deleteFiles setting
Configuration-->>PlexTokenDeleteSync: Return deleteFiles value
PlexTokenDeleteSync->>RadarrUtils: deleteFromRadarr(client, config, deleteFiles)
RadarrUtils->>SonarrUtils: deleteFromSonarr(client, config, deleteFiles)
SonarrUtils-->>PlexTokenDeleteSync: Confirm deletion
PlexTokenDeleteSync-->>User: Acknowledge deletion
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
src/main/resources/config-template.yaml
is excluded by!**/*.yaml
Files selected for processing (9)
- src/main/scala/PlexTokenDeleteSync.scala (1 hunks)
- src/main/scala/configuration/Configuration.scala (1 hunks)
- src/main/scala/configuration/ConfigurationRedactor.scala (1 hunks)
- src/main/scala/configuration/ConfigurationUtils.scala (2 hunks)
- src/main/scala/configuration/Keys.scala (1 hunks)
- src/main/scala/radarr/RadarrUtils.scala (2 hunks)
- src/main/scala/sonarr/SonarrUtils.scala (1 hunks)
- src/test/scala/PlexTokenSyncSpec.scala (1 hunks)
- src/test/scala/configuration/ConfigurationUtilsSpec.scala (1 hunks)
Additional comments not posted (8)
src/main/scala/configuration/Keys.scala (1)
30-30
: The addition of thedeleteFiles
key is consistent with existing naming conventions and supports the new feature well.src/main/scala/configuration/Configuration.scala (1)
46-47
: The addition of thedeleteFiles
field to theDeleteConfiguration
case class is implemented correctly and aligns with the new feature requirements.src/main/scala/configuration/ConfigurationRedactor.scala (1)
37-37
: The inclusion of thedeleteFiles
configuration in theredactToString
method is appropriate and ensures that all relevant configuration details are visible for debugging and logging purposes.src/main/scala/radarr/RadarrUtils.scala (1)
53-61
: The updates to thedeleteFromRadarr
anddeleteToArr
methods correctly incorporate thedeleteFiles
parameter, allowing for conditional file deletion based on the new configuration setting.Also applies to: 88-90
src/main/scala/sonarr/SonarrUtils.scala (1)
56-64
: The updates to thedeleteFromSonarr
anddeleteToArr
methods correctly incorporate thedeleteFiles
parameter, allowing for conditional file deletion based on the new configuration setting.Also applies to: 71-73
src/main/scala/PlexTokenDeleteSync.scala (1)
72-72
: The updates to thedeleteMovie
anddeleteSeries
methods inPlexTokenDeleteSync
correctly use thedeleteFiles
parameter from the configuration to control file deletion, aligning with the new feature's requirements.Also applies to: 80-82
src/test/scala/PlexTokenSyncSpec.scala (1)
63-64
: The addition ofdeleteFiles
parameter with a default value oftrue
aligns with the new feature. Ensure this default behavior is documented in the user guide or API docs.src/main/scala/configuration/ConfigurationUtils.scala (1)
Line range hint
49-82
: The addition ofdeleteFiles
parameter with a default value oftrue
in thecreate
method is consistent with the new feature. Ensure this default behavior is documented in the user guide or API docs.
Description
Configuration to allow choosing whether files should be deleted off the system, or just the content from the Sonarr/Radarr database
Checklist
sbt scalafmtAll
Run (and optionallysbt scalafmtSbt
)