Skip to content
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

Add radarr config option for setting minimum availability #149

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AhmedNSidd
Copy link

Description

I was noticing that some movies that my family added to the Plex Watchlist weren't being downloaded automatically. Upon further investigation, this was because they had not been fully released, and instead were just released in cinemas. Currently Overseerr offers a configuration option for setting a minimum availability for media requests in Radarr, so I thought it'd be appropriate to have an option for this in Watchlistarr as well.

Checklist

  • Documentation Updated
  • sbt scalafmtAll Run (and optionally sbt scalafmtSbt)
  • At least one approval from a codeowner

Copy link

coderabbitai bot commented May 9, 2024

Warning

Rate limit exceeded

@nylonee has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 35 minutes and 46 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between de52499 and bdaa76a.

Walkthrough

This set of updates introduces a new configuration field radarrMinimumAvailability across various Scala files, enhancing the Radarr integration by allowing dynamic setting of item availability. The modifications span from adding this field to configuration classes and utilities, updating keys, and ensuring the field is utilized in Radarr-related operations.

Changes

Files Change Summary
.../configuration/Configuration.scala, .../configuration/ConfigurationRedactor.scala, .../configuration/ConfigurationUtils.scala, .../configuration/Keys.scala Added radarrMinimumAvailability to configuration handling and key management.
.../radarr/RadarrPost.scala, .../radarr/RadarrUtils.scala Integrated radarrMinimumAvailability in Radarr post creation and utility functions.

🐰✨
In the land of code, where the bits align,
A rabbit hopped, leaving changes behind.
"radarrMinimumAvailability", a magical phrase,
Now threads through the code, in a labyrinthine maze.
Hop, skip, a jump, in the config it's cast,
For Radarr's tales, are future, not past! 🌟
🐰💻


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 0bfd5d1 and de52499.
Files ignored due to path filters (1)
  • src/main/resources/config-template.yaml is excluded by !**/*.yaml
Files selected for processing (6)
  • 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/RadarrPost.scala (1 hunks)
  • src/main/scala/radarr/RadarrUtils.scala (1 hunks)
Additional comments not posted (6)
src/main/scala/radarr/RadarrPost.scala (1)

8-8: The addition of minimumAvailability to RadarrPost aligns well with the new feature requirements.

src/main/scala/configuration/Configuration.scala (1)

31-31: The addition of radarrMinimumAvailability to RadarrConfiguration is correctly implemented and necessary for the new feature.

src/main/scala/configuration/Keys.scala (1)

18-18: The addition of the radarrMinimumAvailability key is correctly implemented and aligns with the new feature requirements.

src/main/scala/configuration/ConfigurationRedactor.scala (1)

23-23: The inclusion of radarrMinimumAvailability in the configuration output is correctly implemented and enhances transparency and debuggability.

src/main/scala/radarr/RadarrUtils.scala (1)

38-38: The update to include radarrMinimumAvailability in the addToRadarr method is correctly implemented and necessary for the new feature to function as intended.

src/main/scala/configuration/ConfigurationUtils.scala (1)

Line range hint 38-68: The update to include radarrMinimumAvailability in the create method is correctly implemented and necessary for the new feature to function as intended.

@AhmedNSidd
Copy link
Author

AhmedNSidd commented May 10, 2024

Just built the docker image from this PR and ran it on my personal media server, then added something to the watchlist and confirmed that the minimumAvailability that I had configured in watchlistarr was configured in Radarr as well for that media.

As expected, it changed the minimumAvailability in Radarr for that movie.

Copy link
Owner

@nylonee nylonee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry it took me a while to get to this - looks good, the tests are failing to compile though, could you update the tests?

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.

2 participants