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

KeyError: 'opposing_listing_type' #106

Closed 1cu closed 4 months ago

1cu commented 4 months ago

Jellyfin Version 10.8.13

mumc git:(MUMC-Latest) ✗ python3 mumc.py 
----------------------------------------------------------------------------------------
Version: 5.7.2
----------------------------------------------------------------------------------------
0 - emby
1 - jellyfin
Enter number for server branding (default emby): 1
----------------------------------------------------------------------------------------
Enter server ip or name (default http://localhost): http://localhost
----------------------------------------------------------------------------------------
If you have not explicity changed this option, press enter for default.
Space for no port.
Enter port (default 8096): 
----------------------------------------------------------------------------------------
If you have not explicity changed this option in jellyfin, press enter for default.
For example: http://example.com/<baseurl>
Enter base url (default n/a): 
----------------------------------------------------------------------------------------
Enter admin username: 
----------------------------------------------------------------------------------------
Plain text password used to grab authentication key; password is not stored.
Enter admin password: 
----------------------------------------------------------------------------------------
Decide how the script will use the libraries chosen for each user.
0 - blacklist - Chosen libraries will blacklisted.
                All other libraries will be whitelisted.
1 - whitelist - Chosen libraries will whitelisted.
                All other libraries will be blacklisted.
Choose how the script will use the chosen libraries. (default 0 - blacklist): 
----------------------------------------------------------------------------------------
Decide how the script will match media items to libraries.
0 - byId - Media items will be matched to libraries using 'LibraryIds'.
1 - byPath - Media items will be matched to libraries using 'Paths'.
2 - byNetworkPath - Media items will be matched to libraries using 'NetworkPaths'.
   If your libraries do not have a 'Shared Network Folder' you must filter byPath.
   If your libraries have a 'Shared Network Folder' you must filter byNetworkPath.
   Filtering byId does not have the above limitations.
Choose how the script will match media items to libraries. (default 0 - byId): 
----------------------------------------------------------------------------------------
Enter the desired blacktag name. Do not use backslash '\'.
Use a comma ',' to seperate multiple tag names.
Empty space(s) at the beginning or end of tags will be removed
 Ex: tagname,tag name,tag-name
Leave blank to disable the blacktagging functionality.
Input desired blacktags: 
----------------------------------------------------------------------------------------
Enter the desired whitetag name. Do not use backslash '\'.
Use a comma ',' to seperate multiple tag names.
Empty space(s) at the beginning or end of tags will be removed
 Ex: tagname,tag name,tag-name
Leave blank to disable the whitetagging functionality.
Input desired whitetags: 
----------------------------------------------------------------------------------------
Decide if users disabled in the GUI should be considered.
0 - Hide disabled users
1 - Show disabled users
Enter number (default 1 - Show disabled users): 
----------------------------------------------------------------------------------------
Decide how to select users and/or libraries.
0 - Select users and libraries.
    Select specific users and the specific libraries to be blacklisted for each user.
1 - Select users only.
    Selected users will have all libraries blacklisted according to their access policy.
2 - Select libraries only.
    Selected libraries will be blacklisted for all users according to their access policy.
Enter number (default 0 - Select users and libraries): 
----------------------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/foo/tools/mumc/mumc_modules/mumc_config_import.py", line 90, in importConfig
    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/foo/tools/mumc/mumc.py", line 110, in <module>
    MUMC()
  File "/home/foo/tools/mumc/mumc.py", line 28, in MUMC
    cfg,init_dict=importConfig(init_dict,cmdopt_dict)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/foo/tools/mumc/mumc_modules/mumc_config_import.py", line 106, in importConfig
    importHasException(init_dict,cmdopt_dict)
  File "/home/foo/tools/mumc/mumc_modules/mumc_config_import.py", line 21, in importHasException
    build_configuration_file(init_dict)
  File "/home/foo/tools/mumc/mumc_modules/mumc_config_builder.py", line 140, in build_configuration_file
    the_dict['admin_settings']['users']=get_users_and_libraries(the_dict)
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/foo/tools/mumc/mumc_modules/mumc_builder_userlibrary.py", line 47, in get_users_and_libraries
    the_dict=add_libraries_to_new_users(the_dict)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/foo/tools/mumc/mumc_modules/mumc_builder_library.py", line 304, in add_libraries_to_new_users
    temp_the_dict['all_users_dict'][this_user_index][the_dict['opposing_listing_type']].append(the_dict['all_libraries_list'][lib_index])
                                                     ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'opposing_listing_type'
1cu commented 4 months ago

This works fine:

Time Stamp Start: 20240430170750
MUMC Version: 5.6.5
MUMC Config Version: 5.6.5
Jellyfin Version: 10.8.13
Python Version: 3.11.2
OS Info: Linux-6.1.0-20-amd64-x86_64-with-glibc2.36
terrelsa13 commented 4 months ago

@1cu This is my mistake. I have fixed it with the latest release v5.7.3.

Let me know if you have any other issues.