terrelsa13 / MUMC

Multi-User Media Cleaner aka MUMC (pronounced Mew-Mick) will go through movies, tv episodes, audio tracks, and audiobooks in your Emby/Jellyfin libraries deleting media items you no longer want.
GNU General Public License v3.0
92 stars 6 forks source link

MUMC-Beta v5.1.2 #90

Closed keppo070 closed 10 months ago

keppo070 commented 10 months ago

Tried the Beta v5.1.2 because curious. Copied my old mumc_config.py from v4.1.24 seems mandatory

Following Error

LegacyConfigNameError: The print_movie_post_processing_info variable is missing from mumc_config.py
LegacyConfigNameError: The print_episode_post_processing_info variable is missing from mumc_config.py
LegacyConfigNameError: The print_audio_post_processing_info variable is missing from mumc_config.py
terrelsa13 commented 10 months ago

Should not be mandatory to copy the old config. Just like it in the past, if no config if found it will walk thru prompts to build a new one.

On the same note:

The script could add missing config variables automatically in the background. But then it would have to make assumptions about those values.

Go ahead and add these three variables to the config:

  1. print_movie_post_processing_info = True
  2. print_episode_post_processing_info = True
  3. print_audio_post_processing_info = True

After those are added: Try running v5 again. That should allow the script to continue.

keppo070 commented 10 months ago

Without copying the old config

----------------------------------------------------------------------------------------
Version: 5.1.2
----------------------------------------------------------------------------------------
0:emby
1:jellyfin
Enter number for server branding (default emby): 0
Traceback (most recent call last):
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc_modules/mumc_config_import.py", line 87, in importConf                                   ig
    import mumc_config as cfg
ModuleNotFoundError: No module named 'mumc_config'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc.py", line 104, in <module>
    main()
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc.py", line 27, in main
    cfg,init_dict=importConfig(init_dict,cmdopt_dict)
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc_modules/mumc_config_import.py", line 103, in importCon                                   fig
    importHasException(init_dict,cmdopt_dict)
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc_modules/mumc_config_import.py", line 22, in importHasE                                   xception
    build_configuration_file(init_dict)
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc_modules/mumc_config_builder.py", line 28, in build_con                                   figuration_file
    the_dict=setYAMLConfigSkeleton(the_dict)
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc_modules/mumc_config_skeleton.py", line 32, in setYAMLC                                   onfigSkeleton
    the_dict['advanced_settings']['filter_statements']['movie']['query_filter']['favorited']=None
KeyError: 'movie'

When added the three lines you mentioned

----------------------------------------------------------------------------------------
Version: 5.1.2
----------------------------------------------------------------------------------------
0:emby
1:jellyfin
Enter number for server branding (default emby):
Traceback (most recent call last):
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc_modules/mumc_config_import.py", line 94, in importConfig
    convert_legacyConfigToYAML(legacy_dict,init_dict['mumc_path'],init_dict['config_file_name_no_ext'])
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc_modules/mumc_config_convert.py", line 59, in convert_legacyConfigToYAML
    config_data=setYAMLConfigSkeleton(cfg)
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc_modules/mumc_config_skeleton.py", line 32, in setYAMLConfigSkeleton
    the_dict['advanced_settings']['filter_statements']['movie']['query_filter']['favorited']=None
KeyError: 'movie'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc.py", line 104, in <module>
    main()
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc.py", line 27, in main
    cfg,init_dict=importConfig(init_dict,cmdopt_dict)
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc_modules/mumc_config_import.py", line 103, in importConfig
    importHasException(init_dict,cmdopt_dict)
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc_modules/mumc_config_import.py", line 22, in importHasException
    build_configuration_file(init_dict)
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc_modules/mumc_config_builder.py", line 28, in build_configuration_file
    the_dict=setYAMLConfigSkeleton(the_dict)
  File "/home/patrick/programmeren/python/mumc5b/MUMC-MUMC-Beta/mumc_modules/mumc_config_skeleton.py", line 32, in setYAMLConfigSkeleton
    the_dict['advanced_settings']['filter_statements']['movie']['query_filter']['favorited']=None
KeyError: 'movie'
terrelsa13 commented 10 months ago

Try again with v5.1.4. Looks like a dictionary key was being used before it was defined.

keppo070 commented 10 months ago

Copied my old mumc_config.py and the conversion to yaml works great. No errors.

terrelsa13 commented 10 months ago

Awesome!