GitHub repository: SickChill/sickchill

Issues:
issue_8726: state: open
title: fix: root dir index errors in mass add table and api, as well as refa…
body: …ctoring along the way

Fixes #

Proposed changes in this pull request:
-
-
-

- [ ] PR is based on the DEVELOP branch
- [ ] Don't send big changes all at once. Split up big PRs into multiple smaller PRs that are easier to manage and review
- [ ] Read [contribution guide](https://github.com/SickChill/SickChill/blob/master/.github/CONTRIBUTING.md)


<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
	- Enhanced file and directory manipulation across various components for improved robustness and clarity.
	- Improved error handling and logging for more informative feedback during exceptions.
	- Streamlined initialization and settings management by removing unnecessary code and simplifying logic.
	- Adjusted authentication and API logic for better security and efficiency.

- **Bug Fixes**
	- Corrected directory index handling to ensure accurate location retrieval.
	- Fixed variable naming and logic in show filtering to enhance user interface accuracy.

- **Refactor**
	- Simplified codebase by removing redundant functions and code related to path manipulation.
	- Refined usage of path handling libraries for more consistent and readable code.
	- Updated method and variable naming for greater clarity and maintainability.
	- Consolidated and clarified logic for directory and file handling operations.

- **Tests**
	- Updated tests to reflect removal of certain path manipulation functions.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
user: miigotu
issue_8272: state: open
title: Add a plugin system
body: This is so we can get rid of the wonky loading of clients, notifiers and providers and split those into separate packages. This allows an end user to not have to load 50 providers they aren't using into memory for example.

This old way is so bad, and results in memory issues that are unnecessary https://github.com/SickChill/sickchill/blob/master/sickchill/oldbeard/providers/__init__.py#L154

TODO:

- [ ] create abstract skeleton, and a base plugin that all plugins must subclass. Abstract and base should have descriptions and types and validators for all settings as well as a group of tests we can iterate to ensure settings are correct.

- [ ] create a base plugin, with standard methods that should work for most plugins. Plugins will override whatever methods necessary to make them work, usually at least the send method, and possibly the method that sets up the data that is received so it is structured in a way the send method understands. More data will be sent from sickchill to the extension methods than is necessary, so it can be filtered out better and structured to fit all plugins.

- [ ] create an example plugin package that subclasses the base plugin and shows how simple the procedure to create a plugin will be. 

- [ ] create settings reader that is universal for plugins

- [ ] ensure data integrity and private data security

plugins settings will be in this form:
```ini
[extensions]
  [[clients]]
    [[[transmission]]]
      server = 192.168.1.1
```
and will not inherit old settings, merge old settings unless they are internal plugins that are rewritten from the old packages. Plugins will not have access to the full settings inside SC, to ensure third party plugins cannot snoop your private information. First party plugins will be rewritten and settings merged to show how it is done. First party plugins will then be moved to individual packages under the sickchill namespace in pypi. I haven't decided if they will be moved to their own individual repositories on GitHub or stay as submodules in sickchill as a monorepo. 

- [ ] assert in sickchill.extensions.manager:discover that plugin is_subclass of the base class to ensure they adhere to practices and prevent data from being accessed other than what we provide.

- [ ] determine if all packages must be signed by the sickchill organization or if third party packages will be allowed without organization approval. Some data security NEEDS to be ensured, or some method of establishing trust must be implemented. Will decide as progress is made. 

- [ ] load required settings and their descriptions for each plugin from the plugin itself, and generate a form to set the settings for the plugin, possibly with custom hints given by the plugin settings. Plugin base will provide default form structuring for traditional types, and determine the type of value needed based on type hints and helper methods. This is drastically going to reduce the amount of code to create a plugin because the html  and server methods will be magically generated by the plugin base! The simplest plugins (most of them) will just have to define what variables/settings it needs and a send method! 

- [ ] checkbox interface to list available plugins from pypi, install them from pypi in batch form, and enable/disable/uninstall them.

- [ ] remove old configuration pages for these plugins, and change all code to USE the plugins rather than the old static implementations.
user: miigotu
labels: python: Pull requests that update Python code