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

Clean up and update Sonarr plugin internals #14

Merged
merged 1 commit into from
Feb 18, 2023

Conversation

Callum027
Copy link
Member

@Callum027 Callum027 commented Feb 18, 2023

Refactors the internal implementation of the Sonarr plugin to use the latest plugin API interfaces and be more inline with the up-to-date Dummy reference plugin.

  • Move API functions to buildarr.plugins.sonarr.api
  • Remove SonarrSecrets from get_initialize_js, and take in host URL and API key as normal
  • Make SonarrConfig and SonarrSecrets use the generic interface, and replace base class type definitions with specific ones
  • Split SonarrConfig into SonarrInstanceConfig (instance-specific) and SonarrConfig (global)
  • Remove unnecessary shebangs from plugin.py and cli.py
  • Remove all extra newlines left where the file descriptor used to be
  • Define the initialize.js response parsing regex as a pre-compiled re.Pattern (INITIALIZE_JS_RES_PATTERN)

@Callum027 Callum027 added enhancement New feature or request refactor Code refactoring-related issue or pull request labels Feb 18, 2023
@Callum027 Callum027 added this to the v0.1.1 milestone Feb 18, 2023
@Callum027 Callum027 self-assigned this Feb 18, 2023
@Callum027 Callum027 linked an issue Feb 18, 2023 that may be closed by this pull request
7 tasks
@Callum027 Callum027 merged commit 524dcf7 into main Feb 18, 2023
@Callum027 Callum027 deleted the 13-sonarr-plugin-refactor-1 branch February 18, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Code refactoring-related issue or pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up and update Sonarr plugin internals
1 participant