mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-21 04:57:46 -05:00
* added AMiABLE and PiGNUS to scene groups (#25) * Major Code Refactor (#27) Description Reimplemented Profilarr from the ground up to be more reusable, in addition to implemented a few improvements. Works almost identically to before, but will be much easier to develop for going forward. Improvements Implements feature mentioned in Issue #11. - Custom Formats are now automatically imported before quality profiles are imported. * fixed 2160 remux bug (#28) Fixed bug that was incorrectly prioritising WEBs in 2160p optimal profiles.
23 lines
931 B
Python
23 lines
931 B
Python
from exportarr import export_custom_formats, export_quality_profiles
|
|
from importarr import import_custom_formats, import_quality_profiles
|
|
from helpers import load_config, get_app_choice
|
|
|
|
def main():
|
|
app = get_app_choice().lower() # Convert to lowercase
|
|
config = load_config() # Load the entire configuration
|
|
|
|
# Now app will be 'radarr' or 'sonarr', matching the keys in the config dictionary
|
|
master_instance = next((inst for inst in config['instances'][app] if inst['name'] == 'Master'), None)
|
|
extra_instances = [inst for inst in config['instances'][app] if inst['name'] != 'Master']
|
|
|
|
if master_instance:
|
|
export_custom_formats(app, [master_instance], config)
|
|
export_quality_profiles(app, [master_instance], config)
|
|
|
|
if extra_instances:
|
|
import_custom_formats(app, extra_instances)
|
|
import_quality_profiles(app, extra_instances)
|
|
|
|
if __name__ == "__main__":
|
|
main()
|