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

Unknown string format: Unplayed #83

Closed Floflobel closed 10 months ago

Floflobel commented 1 year ago

Hello,

I've been trying to get your tool to work for a while but I can't. I'm always confronted with a problem. The most annoying problem is this error message:

$ python3 mumc.py

-----------------------------------------------------------

-----------------------------------------------------------
MUMC Version: 4.1.20
Emby Version: 4.8.0.39
Python Version: 3.11.4
Time Stamp: 20230717122818
-----------------------------------------------------------

-----------------------------------------------------------
Start...
Cleaning media for server at: https://streaming.domain:443/emby
-----------------------------------------------------------

-----------------------------------------------------------
Get List Of Media For:
Floflobel - 4fd64ef2422e40e0ba6e095eb9f74ecd
-----------------------------------------------------------
Traceback (most recent call last):
  File "/dev/shm/MUMC/mumc.py", line 8589, in <module>
    movie_dict,movie_found=get_media_items('movie',config_dict,movie_dict,user_key)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/dev/shm/MUMC/mumc.py", line 5863, in get_media_items
    =get_playedCreatedDays_playedCreatedCounts(item,media_played_days,media_created_days,cut_off_date_played_media,cut_off_date_created_media,
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/dev/shm/MUMC/mumc.py", line 4365, in get_playedCreatedDays_playedCreatedCounts
    if ((cut_off_date_played) > (parse(item['UserData']['LastPlayedDate']))):
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dateutil/parser/_parser.py", line 1368, in parse
    return DEFAULTPARSER.parse(timestr, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dateutil/parser/_parser.py", line 643, in parse
    raise ParserError("Unknown string format: %s", timestr)
dateutil.parser._parser.ParserError: Unknown string format: Unplayed
#-------------Basic Config Options Start Here---------------#

#----------------------------------------------------------#
# Played Filter Statements
#
# [A,B,C]
#
# A - Condition Days
# B - Played Count Inequality
# C - Played Count
#
# Condition Days (A): Find media items last played at least this many days ago
#   0-730500 - Number of days filter will use to determine when the media item was last played
#  -1 - To disable deleting specified media type
#
# Played Count Inequality (B): Delete media items within this range based off of the chosen *_played_count.
#   > - Filter media items with a played count greater than *_played_count days ago
#   < - Filter media items with a played count less than *_played_count days ago
#   >= - Filter media items with a played count greater than or equal to *_played_count days ago
#   <= - Filter media items with a played count less than or equal to *_played_count days ago
#   == - Filter media items with a played count equal to *_played_count days ago
#   not > - Filter media items with a played count not greater than *_played_count days ago
#   not < - Filter media items with a played count not less than *_played_count days ago
#   not >= - Filter media items with a played count not greater than or equal to *_played_count days ago
#   not <= - Filter media items with a played count not less than or equal to *_played_count days ago
#   not == - Filter media items with a played count not equal to *_played_count days ago
#
# Played Count (C): Find media items with a played count relative to this number.
#   1-730500 - Number of times a media item has been played
#
# ([-1,'>=',1] : default)
#----------------------------------------------------------#
played_filter_movie=[22, '>=', 1]
played_filter_episode=[-1, '>=', 1]
played_filter_audio=[-1, '>=', 1]

#----------------------------------------------------------#
# Created Filter Statements
#
# [A,B,C,D]
#
# A - Condition Days
# B - Played Count Inequality
# C - Played Count
# D - Behaviorial Control
#
# Condition Days (A): Find media items created at least this many days ago
#   0-730500 - Number of days filter will use to determine when the media item was created
#  -1 - To disable deleting specified media type
#
# Played Count Inequality (B): Delete media items within this range based off of the chosen *_played_count.
#   > - Filter media items with a played count greater than *_played_count days ago
#   < - Filter media items with a played count less than *_played_count days ago
#   >= - Filter media items with a played count greater than or equal to *_played_count days ago
#   <= - Filter media items with a played count less than or equal to *_played_count days ago
#   == - Filter media items with a played count equal to *_played_count days ago
#   not > - Filter media items with a played count not greater than *_played_count days ago
#   not < - Filter media items with a played count not less than *_played_count days ago
#   not >= - Filter media items with a played count not greater than or equal to *_played_count days ago
#   not <= - Filter media items with a played count not less than or equal to *_played_count days ago
#   not == - Filter media items with a played count not equal to *_played_count days ago
#
# Played Count (C): Find media items with a played count relative to this number.
#   0-730500 - Number of times a media item has been played
#
# Behavioral Control (D): Determine if favorited_behavior_*, whitetagged_behavior_*, blacktagged_behavior_*,
#  whitelisted_behavior_*, and blacklisted_behavior_* apply to media items meeting the created_filter_*.
#   False - Media items meeting the created_filter_* will be deleted regardless of favorited_behavior_*,
#    whitetagged_behavior_*, blacktagged_behavior_*, whitelisted_behavior_*, and blacklisted_behavior_*
#   True - Media items meeting the created_filter_* will also have to meet configured behaviors; favorited_behavior_*,
#    whitetagged_behavior_*, blacktagged_behavior_*, whitelisted_behavior_*, and blacklisted_behavior_*
#
# ([-1,'>=',1,True] : default)
#----------------------------------------------------------#
created_filter_movie=[-1, '>=', 1, True]
created_filter_episode=[-1, '>=', 1, True]
created_filter_audio=[-1, '>=', 1, True]

#------------Advanced Config Options Start Here-------------#

#----------------------------------------------------------#
# Favorited Behavioral Statements
#
# Favoriting is the first (and highest) priority
#  Whitetagging behavior is ignored
#  Blacktagging behavior is ignored
#  Whitelisting behavior is ignored
#  Blacklisting behavior is ignored
#
# [W, X, Y, Z]
#
# W - Action
# X - User Conditional
# Y - Played Conditional
# Z - Action Control
#
# Action (W): Specify which action should be taken when (X) and (Y) is True.
#   delete - Delete media item from server
#   keep - Do NOT delete media item from server
#
# User Conditional (X): Specify how monitored users must have the media item favorited.
#   all - Every monitored user must have the media item favorited
#   any - One or more monitored users must have the media item favorited
#
# Played Conditional (Y): Specify how monitored users must meet played_filter_*.
#   all - Every monitored user must meet the played_filter_*
#   any - One or more monitored users must meet the played_filter_*
#   ignore - Ignore if monitored users meet the played_filter_*
#
# Action Control (Z): Specify the action the script will take when (X) and (Y) is True/False
#   0 - No action taken on True; No action taken on False (disabled)
#   1 - No action taken on True; Action taken on False
#   2 - No action taken on True; Opposite action taken on False
#   3 - Action taken on True; No action taken on False (recommended)
#   4 - Action taken on True; Action taken on False
#   5 - Action taken on True; Opposite action taken on False (recommended)
#   6 - Opposite action taken on True; No action taken on False
#   7 - Opposite action taken on True; Action taken on False
#   8 - Opposite action taken on True; Opposite action taken on False
#
# (['keep','any','ignore',3] : default)
#----------------------------------------------------------#
favorited_behavior_movie=['keep', 'any', 'ignore', 3]
favorited_behavior_episode=['keep', 'any', 'ignore', 3]
favorited_behavior_audio=['keep', 'any', 'ignore', 3]

#----------------------------------------------------------#
# Advanced movie favorites configurations
#     Requires 'favorited_behavior_movie[3]>=0'
#----------------------------------------------------------#
#  Keep movie based on the genres
#  0 - ok to delete movie when genres are set as a favorite
#  1 - keep movie if FIRST genre listed is set as a favorite
#  2 - keep movie if ANY genre listed is set as a favorite
# (0 : default)
#----------------------------------------------------------#
favorited_advanced_movie_genre=0
favorited_advanced_movie_library_genre=0

#----------------------------------------------------------#
# Advanced episode favorites configurations
#     Requires 'favorited_behavior_episode[3]>=0'
#----------------------------------------------------------#
#  Keep episode based on the genre(s) or studio-network(s)
#  0 - ok to delete episode when its genres or studio-networks are set as a favorite
#  1 - keep episode if FIRST genre or studio-network is set as a favorite
#  2 - keep episode if ANY genres or studio-networks are set as a favorite
# (0 : default)
#----------------------------------------------------------#
favorited_advanced_episode_genre=0
favorited_advanced_season_genre=0
favorited_advanced_series_genre=0
favorited_advanced_tv_library_genre=0
favorited_advanced_tv_studio_network=0
favorited_advanced_tv_studio_network_genre=0

#----------------------------------------------------------#
# Advanced track favorites configurations
#     Requires 'favorited_behavior_audio[3]>=0'
#----------------------------------------------------------#
#  Keep track based on the genre(s) or artist(s)
#  0 - ok to delete track when its genres or artists are set as a favorite
#  1 - keep track if FIRST genre or artist is set as a favorite
#  2 - keep track if ANY genres or artists are set as a favorite
# (0 : default)
#----------------------------------------------------------#
favorited_advanced_track_genre=0
favorited_advanced_album_genre=0
favorited_advanced_music_library_genre=0
favorited_advanced_track_artist=0
favorited_advanced_album_artist=0

#----------------------------------------------------------#
# User entered whitetag name; chosen during setup
#  Use a comma ',' to seperate multiple tag names
#   Ex: tagname,tag name,tag-name
#  Backslash '\' not allowed
#----------------------------------------------------------#
whitetag=''

#----------------------------------------------------------#
# Whitetagged Behavioral Statements
#  Tags applied to a media item are seen by all users
#
# Whitetagging is the second priority
#  Blacktagging behavior is ignored
#  Whitelisting behavior is ignored
#  Blacklisting behavior is ignored
#
# [W, X, Y, Z]
#
# W - Action
# X - User Conditional
# Y - Played Conditional
# Z - Action Control
#
# Action (W): Specify which action should be taken when (X) and (Y) is True.
#   delete - Delete media item from server
#   keep - Do NOT delete media item from server
#
# User Conditional (X): Specify how monitored users must have the media item whitetagged.
#   all - Every monitored user must have the media item whitetagged
#   any - N/A; Tags apply to all users
#
# Played Conditional (Y): Specify how monitored users must meet played_filter_*.
#   all - Every monitored user must meet the played_filter_*
#   any - One or more monitored users must meet the played_filter_*
#   ignore - Ignore if monitored users meet the played_filter_*
#
# Action Control (Z): Specify the action the script will take when (X) and (Y) is True/False
#   0 - No action taken on True; No action taken on False (disabled)
#   1 - No action taken on True; Action taken on False
#   2 - No action taken on True; Opposite action taken on False
#   3 - Action taken on True; No action taken on False (recommended)
#   4 - Action taken on True; Action taken on False
#   5 - Action taken on True; Opposite action taken on False (recommended)
#   6 - Opposite action taken on True; No action taken on False
#   7 - Opposite action taken on True; Action taken on False
#   8 - Opposite action taken on True; Opposite action taken on False
#
# (['keep','all','ignore',0] : default)
#----------------------------------------------------------#
whitetagged_behavior_movie=['keep', 'all', 'ignore', 0]
whitetagged_behavior_episode=['keep', 'all', 'ignore', 0]
whitetagged_behavior_audio=['keep', 'all', 'ignore', 0]

#----------------------------------------------------------#
# User entered blacktag name; chosen during setup
#  Use a comma ',' to seperate multiple tag names
#   Ex: tagname,tag name,tag-name
#  Backslash '\' not allowed
#----------------------------------------------------------#
blacktag=''

#----------------------------------------------------------#
# Blacktagged Behavioral Statements
#  Tags applied to a media item are seen by all users
#
# Blacktagging is the third priority
#  Whitelisting behavior is ignored
#  Blacklisting behavior is ignored
#
# [W, X, Y, Z]
#
# W - Action
# X - User Conditional
# Y - Played Conditional
# Z - Action Control
#
# Action (W): Specify which action should be taken when (X) and (Y) is True.
#   delete - Delete media item from server
#   keep - Do NOT delete media item from server
#
# User Conditional (X): Specify how monitored users must have the media item blacktagged.
#   all - Every monitored user must have the media item blacktagged
#   any - N/A; Tags apply to all users
#
# Played Conditional (Y): Specify how monitored users must meet played_filter_*.
#   all - Every monitored user must meet the played_filter_*
#   any - One or more monitored users must meet the played_filter_*
#   ignore - Ignore if monitored users meet the played_filter_*
#
# Action Control (Z): Specify the action the script will take when (X) and (Y) is True/False
#   0 - No action taken on True; No action taken on False (disabled)
#   1 - No action taken on True; Action taken on False
#   2 - No action taken on True; Opposite action taken on False
#   3 - Action taken on True; No action taken on False (recommended)
#   4 - Action taken on True; Action taken on False
#   5 - Action taken on True; Opposite action taken on False (recommended)
#   6 - Opposite action taken on True; No action taken on False
#   7 - Opposite action taken on True; Action taken on False
#   8 - Opposite action taken on True; Opposite action taken on False
#
# (['delete','all','any',0] : default)
#----------------------------------------------------------#
blacktagged_behavior_movie=['delete', 'all', 'any', 0]
blacktagged_behavior_episode=['delete', 'all', 'any', 0]
blacktagged_behavior_audio=['delete', 'all', 'any', 0]

#----------------------------------------------------------#
# Whitelisted Behavioral Statements
#
# Whitelisting is the fourth priority
#  Blacklisting behavior is ignored
#
# [W, X, Y, Z]
#
# W - Action
# X - User Conditional
# Y - Played Conditional
# Z - Action Control
#
# Action (W): Specify which action should be taken when (X) and (Y) is True.
#   delete - Delete media item from server
#   keep - Do NOT delete media item from server
#
# User Conditional (X): Specify how monitored users must have the media item whitelisted.
#   all - Every monitored user must have the media item whitelisted
#   any - One or more monitored users must have the media item whitelisted
#
# Played Conditional (Y): Specify how monitored users must meet played_filter_*.
#   all - Every monitored user must meet the played_filter_*
#   any - One or more monitored users must meet the played_filter_*
#   ignore - Ignore if monitored users meet the played_filter_*
#
# Action Control (Z): Specify the action the script will take when (X) and (Y) is True/False
#   0 - No action taken on True; No action taken on False (disabled)
#   1 - No action taken on True; Action taken on False
#   2 - No action taken on True; Opposite action taken on False
#   3 - Action taken on True; No action taken on False (recommended)
#   4 - Action taken on True; Action taken on False
#   5 - Action taken on True; Opposite action taken on False (recommended)
#   6 - Opposite action taken on True; No action taken on False
#   7 - Opposite action taken on True; Action taken on False
#   8 - Opposite action taken on True; Opposite action taken on False
#
# (['keep','any','ignore',3] : default)
#----------------------------------------------------------#
whitelisted_behavior_movie=['keep', 'any', 'ignore', 3]
whitelisted_behavior_episode=['keep', 'any', 'ignore', 3]
whitelisted_behavior_audio=['keep', 'any', 'ignore', 3]

#----------------------------------------------------------#
# Blacklisted Behavioral Statements
#
# Blacklisting is the fifth (and lowest) priority
#
# [W, X, Y, Z]
#
# W - Action
# X - User Conditional
# Y - Played Conditional
# Z - Action Control
#
# Action (W): Specify which action should be taken when (X) and (Y) is True.
#   delete - Delete media item from server
#   keep - Do NOT delete media item from server
#
# User Conditional (X): Specify how monitored users must have the media item blacklisted.
#   all - Every monitored user must have the media item blacklisted
#   any - One or more monitored users must have the media item blacklisted
#
# Played Conditional (Y): Specify how monitored users must meet played_filter_*.
#   all - Every monitored user must meet the played_filter_*
#   any - One or more monitored users must meet the played_filter_*
#   ignore - Ignore if monitored users meet the played_filter_*
#
# Action Control (Z): Specify the action the script will take when (X) and (Y) is True/False
#   0 - No action taken on True; No action taken on False (disabled)
#   1 - No action taken on True; Action taken on False
#   2 - No action taken on True; Opposite action taken on False
#   3 - Action taken on True; No action taken on False (recommended)
#   4 - Action taken on True; Action taken on False
#   5 - Action taken on True; Opposite action taken on False (recommended)
#   6 - Opposite action taken on True; No action taken on False
#   7 - Opposite action taken on True; Action taken on False
#   8 - Opposite action taken on True; Opposite action taken on False
#
# (['delete','any','any',3] : default)
#----------------------------------------------------------#
blacklisted_behavior_movie=['delete', 'any', 'any', 3]
blacklisted_behavior_episode=['delete', 'any', 'any', 3]
blacklisted_behavior_audio=['delete', 'any', 'any', 3]

#----------------------------------------------------------#
# Decide the minimum number of episodes to remain in all tv series'
# This ignores the played and unplayed states of episodes
#  0 - Episodes will be deleted based on the Filter and Behavioral Statements
#  1-730500 - Episodes will be deleted based on the Filter and Behavioral Statements;
#              unless the remaining played and unplayed episodes are less than or
#              equal to the chosen value
# (0 : default)
#----------------------------------------------------------#
minimum_number_episodes=0

#----------------------------------------------------------#
# Decide the minimum number of played episodes to remain in all tv series'
# Keeping one or more played epsiodes for each series allows the "Next Up"
#  functionality to notify user(s) when a new episode for a series
#  is available
# This value applies only to played and episodes
#  0 - Episodes will be deleted based on the Filter and Behavioral Statements
#  1-730500 - Episodes will be deleted based on the Filter and Behavioral Statements;
#              unless the remaining played episodes are less than or equal to the
#              chosen value
# (0 : default)
#----------------------------------------------------------#
minimum_number_played_episodes=0

#----------------------------------------------------------#
# Decide how 'minimum_number_episodes' and 'minimum_number_played_episodes' will behave.
# The minimum number of played and unplayed episodes will vary for each user and for each
#  series when multiple users are watching the same series at different paces.
# The following option gives a mechanism to control this in different ways.
# The 'minimum_number_episodes' and 'minimum_number_played_episodes' will be based off of...
#  'User's Name' - The UserName specified; If matching UserName not found script will assume default.
#  'User's Id' - The UserId specified; If matching UserName not found script will assume default.
#  'Max Played' - The first user with the highest number of played episodes to be deleted for each series.
#  'Min Played' - The first user with the lowest number of played episodes to be deleted for each series.
#  'Max Unplayed' - The first user with the highest number of unplayed episodes to be deleted for each series.
#  'Min Unplayed' - The first user with the lowest number of unplayed episodes to be deleted for each series.
# The Max/Min Played/Unplayed values can be mixed and matched. For example...
#  'Max Unplayed Min Played' - The number played episodes to be deleted is based off the user
#                                with the highest number of unplayed episodes to be deleted for a
#                                specified series. The number of unplayed episodes to be deleted is
#                                based off the user with the lowest number of played episodes to be
#                                deleted for a specified series.
# ('Min Played Min Unplayed' : default)
#----------------------------------------------------------#
minimum_number_episodes_behavior='Max Played Min Unplayed'

#----------------------------------------------------------#
# Add last played date for items missing the LastPlayedDate data
# When played state is imported from Trakt the LastPlayedDate is
#  not populated. To allow the script to maintain functionality
#  the current date and time the script is run can be used as the
#  LastPlayedDate value.
#  False - Do not set the LastPlayedDate; days since played will show as
#        the number of days since 1970-Jan-01 00:00:00hrs for any media
#        items missng the LastPlayedDate data.
#  True - Set the LastPlayedDate; the current date-time the script is
#        run will be saved as the LastPlayedDate for any media items
#        missing the LastPlayedDate data. Only media items missing the
#        LastPlayedDate data are modified
# (True : default)
#----------------------------------------------------------#
movie_set_missing_last_played_date=True
episode_set_missing_last_played_date=True
audio_set_missing_last_played_date=True

#----------------------------------------------------------#
# Enable/Disable console outputs by type
#----------------------------------------------------------#
# Should the script print its output to the console
#  False - Do not print this output type to the console
#  True - Print this output type to the console
# (True : default)
#----------------------------------------------------------#
print_script_header=True
print_warnings=True
print_user_header=True
print_movie_delete_info=True
print_movie_keep_info=True
print_episode_delete_info=True
print_episode_keep_info=True
print_audio_delete_info=True
print_audio_keep_info=True
print_summary_header=True
print_movie_summary=True
print_episode_summary=True
print_audio_summary=True
print_script_footer=True

#----------------------------------------------------------#
# Set to True to add new users or edit existing users
# Must be a boolean True or False value
#  False - Operate normally
#  True  - Enable configuration editor mode; will NOT delete media items
#           Resets to dry run mode (REMOVE_FILES=False)
# (False : default)
#----------------------------------------------------------#
UPDATE_CONFIG=False

#----------------------------------------------------------#
# Must be a boolean True or False value
#  False - Disables the ability to delete media (dry run mode)
#  True - Enable the ability to delete media
# (False : default)
#----------------------------------------------------------#
REMOVE_FILES=False

#---------!!!DO NOT MODIFY ANYTHING BELOW!!!----------------#
# These are automatically created during setup.
#   If you do not know EXACTLY what you are doing; changing these
#      may cause script failure.
#   The only way to recover from script failure is to revert the
#      config back to the way it was OR rebuild a new config.
#----------------------------------------------------------#

#----------------------------------------------------------#
# Server branding; chosen during setup
#  0 - 'emby'
#  1 - 'jellyfin'
#----------------------------------------------------------#
server_brand='emby'

#----------------------------------------------------------#
# Server URL; created during setup
#----------------------------------------------------------#
server_url='https://streaming.domain:443/emby'

#----------------------------------------------------------#
# Authentication Key; requested from server during setup
#  Used for API queries sent to the server
#  Also know as an Access Token
#----------------------------------------------------------#
auth_key=''

#----------------------------------------------------------#
# Decide how the script will use the libraries chosen for each user
#  Only used during creation or editing of the configuration file
#  0 - blacklist - Chosen libraries will blacklisted
#                  All other libraries will be whitelisted
#  1 - whitelist - Chosen libraries will whitelisted
#                  All other libraries will be blacklisted
# (blacklist : default)
#----------------------------------------------------------#
library_setup_behavior='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 - byNetwork Path - Media items will be matched to libraries using 'NetworkPaths'
# Filtering byId does not apply to the rules below.
# Filtering byPath requires no shared network folders are configured.
# Filtering byNetworkPath requires shared network folders are configured.
# (byId : default)
#----------------------------------------------------------#
library_matching_behavior='byId'

#----------------------------------------------------------#
# User UserName(s) and UserId(s) of monitored account(s); chosen during setup
# The order of the UserName(s):UserId(s) here must match the order of the
#  UserId(s)/UserNames(s) in user_bl_libs and user_wl_libs
#----------------------------------------------------------#
user_keys='["Floflobel:4fd64ef2422e40e0ba6e095eb9f74ecd"]'

#----------------------------------------------------------#
# Blacklisted libraries with corresponding user keys(s)
# These libraries are typically searched for media items to delete
# Chosen during setup
#----------------------------------------------------------#
user_bl_libs='[{"userid": "4fd64ef2422e40e0ba6e095eb9f74ecd", "username": "Floflobel", "0": {"libid": "db4c1708cbb5dd1676284a40f2950aba", "collectiontype": "movies", "path": "/media/storage3/films", "networkpath": ""}, "1": {"libid": "db4c1708cbb5dd1676284a40f2950aba", "collectiontype": "movies", "path": "/media/storage6/films", "networkpath": ""}, "2": {"libid": "db4c1708cbb5dd1676284a40f2950aba", "collectiontype": "movies", "path": "/media/storage4/films", "networkpath": ""}, "3": {"libid": "db4c1708cbb5dd1676284a40f2950aba", "collectiontype": "movies", "path": "/media/storage7/films", "networkpath": ""}, "4": {"libid": "db4c1708cbb5dd1676284a40f2950aba", "collectiontype": "movies", "path": "/media/storage8/films", "networkpath": ""}, "5": {"libid": "db4c1708cbb5dd1676284a40f2950aba", "collectiontype": "movies", "path": "/media/storage2/films", "networkpath": ""}, "6": {"libid": "db4c1708cbb5dd1676284a40f2950aba", "collectiontype": "movies", "path": "/media/storage9/films", "networkpath": ""}}]'

#----------------------------------------------------------#
# Whitelisted libraries with corresponding user keys(s)
# These libraries are typically not searched for media items to delete
# Chosen during setup
#----------------------------------------------------------#
user_wl_libs='[{"userid": "4fd64ef2422e40e0ba6e095eb9f74ecd", "username": "Floflobel", "7": {"libid": "4243b5a6131c8132dd863e2585f88056", "collectiontype": "playlists", "path": "/var/lib/emby/data/playlists", "networkpath": ""}, "8": {"libid": "4243b5a6131c8132dd863e2585f88056", "collectiontype": "playlists", "path": "/var/lib/emby/data/userplaylists", "networkpath": ""}, "9": {"libid": "23f368a8448168d1fd434a016eb66fb6", "collectiontype": "tvshows", "path": "/media/storage3/manga", "networkpath": ""}, "10": {"libid": "23f368a8448168d1fd434a016eb66fb6", "collectiontype": "tvshows", "path": "/media/storage6/manga", "networkpath": ""}, "11": {"libid": "23f368a8448168d1fd434a016eb66fb6", "collectiontype": "tvshows", "path": "/media/storage7/manga", "networkpath": ""}, "12": {"libid": "23f368a8448168d1fd434a016eb66fb6", "collectiontype": "tvshows", "path": "/media/storage4/manga", "networkpath": ""}, "13": {"libid": "23f368a8448168d1fd434a016eb66fb6", "collectiontype": "tvshows", "path": "/media/storage8/manga", "networkpath": ""}, "14": {"libid": "23f368a8448168d1fd434a016eb66fb6", "collectiontype": "tvshows", "path": "/media/storage2/manga", "networkpath": ""}, "15": {"libid": "23f368a8448168d1fd434a016eb66fb6", "collectiontype": "tvshows", "path": "/media/storage9/manga", "networkpath": ""}, "16": {"libid": "d565273fd114d77bdf349a2896867069", "collectiontype": "tvshows", "path": "/media/storage3/series", "networkpath": ""}, "17": {"libid": "d565273fd114d77bdf349a2896867069", "collectiontype": "tvshows", "path": "/media/storage6/series", "networkpath": ""}, "18": {"libid": "d565273fd114d77bdf349a2896867069", "collectiontype": "tvshows", "path": "/media/storage7/series", "networkpath": ""}, "19": {"libid": "d565273fd114d77bdf349a2896867069", "collectiontype": "tvshows", "path": "/media/storage4/series", "networkpath": ""}, "20": {"libid": "d565273fd114d77bdf349a2896867069", "collectiontype": "tvshows", "path": "/media/storage8/series", "networkpath": ""}, "21": {"libid": "d565273fd114d77bdf349a2896867069", "collectiontype": "tvshows", "path": "/media/storage2/series", "networkpath": ""}, "22": {"libid": "d565273fd114d77bdf349a2896867069", "collectiontype": "tvshows", "path": "/media/storage9/series", "networkpath": ""}}]'

#----------------------------------------------------------#
# API query attempts
# Number of times to retry an API request
#  Delay between initial attempt and the first retry is 1 second
#  The delay will double with each attempt after the first retry
#  Delay between the orginal request and retry #1 is (2^0) 1 second
#  Delay between retry #1 and retry #2 is (2^1) 2 seconds
#  Delay between retry #2 and retry #3 is (2^2) 4 seconds
#  Delay between retry #3 and retry #4 is (2^3) 8 seconds
#  Delay between retry #4 and retry #5 is (2^4) 16 seconds
#  Delay between retry #5 and retry #6 is (2^5) 32 seconds
#  ...
#  Delay between retry #15 and retry #16 is (2^15) 32768 seconds
#  0-16 - number of retry attempts
#  (4 : default)
#----------------------------------------------------------#
api_query_attempts=4

#----------------------------------------------------------#
# API query item limit
# To keep the server running smoothly we do not want it to return a
#  large amount of metadata from a single API query
# If the server lags or bogs down when this script runs try lowering
#  this value to allow the server to return smaller amounts of data
# ALL media items and their metadata are processed regardless of this value
#  1-10000 - maximum number of media items the server will return for each API query
#  (25 : default)
#----------------------------------------------------------#
api_query_item_limit=25

#----------------------------------------------------------#
# API cache maximum size
# To keep the script running efficiently we do not want to send the
#  same requests to the server repeatedly
# If any single data entry is larger than the cache size, that data entry
#  will not be cached
# 0.1MB of cache is better than 0MB of cache
# Recommend setting DEBUG=1 to print the cache stats to determine the
#  best cache settings (i.e. size, fallback behavior, and last accessed time)
#
# MegaByte Sizing Reference
#  1MB = 1048576 Bytes
#  1000MB = 1GB
#  10000MB = 10GB
#
#  0 - Disable cache
#  1-10000 - Size of cache in megabytes (MB)
#  (32 : default)
#----------------------------------------------------------#
api_query_cache_size=32

#----------------------------------------------------------#
# API cache fallback behavior
# By default the script is a hybrid LFU-LRU RAM Cache
#
# 1.First the cache is filled
# 2.Once full the cache uses api_query_cache_last_accessed_time to
#    establish a minimum age an entry has to be for removal
# 3.Then the oldest entry meeting the minimum age (from step 2) with
#    the lowest number of hits (reads) is removed
# 4.If no entrys meet the minimum age or all have the same number of
#    cache hits (reads); api_query_cache_fallback_behavior is used
# Recommend setting DEBUG=1 to print the cache stats to determine the
#  best cache settings (i.e. size, fallback behavior, and last accessed time)
#
# Fallback To
#  'FIFO' - First In First Out (first entry is removed)
#  'LFU' - Least Frequently Used (first entry with the lowest number of hits is removed)
#  'LRU' - Least Recently Used (first entry with the oldest access time is removed)
#  (LRU : default)
#----------------------------------------------------------#
api_query_cache_fallback_behavior='LRU'

#----------------------------------------------------------#
# API cache entry minium age
#
# Once full the cache uses api_query_cache_last_accessed_time to
#  establish a minimum age an entry has to be for removal
#
# Bigger is NOT always better. The older an entry is allowed to be, the lower
#  the number of elgible entries for removal when cache is full.
#  When this happens the script will not be able to find an entry that
#  satisfies LFU-LRU and will use api_query_cache_fallback_behavior
#  until there is enough space in cache for the newest entry.
# Of course setting a bigger cache size means needing to remove less
#  cache entries.
# Increase api_query_cache_size before increasing this api_query_cache_last_accessed_time
# Recommend setting DEBUG=1 to print the cache stats to determine the
#  best cache settings (i.e. size, fallback behavior, and last accessed time)
#
# Millisecond Timing Reference
#  1ms = 0.001s
#  1000ms = 1s
#  100000ms = 100s
#
#  0-600000 - Minimum cached entry age for removal in milliseconds (ms)
#  (200 : default)
#----------------------------------------------------------#
api_query_cache_last_accessed_time=200

#----------------------------------------------------------#
# Must be an integer value
#  Debug log file save to: /the/script/directory/mumc_DEBUG.log
#  The debug log file can be large (i.e. 10s to 100s of MBytes)
#  Recommend only enabling DEBUG when necessary
#   0 - Debug messaging disabled
#   1 - Level 1 debug messaging enabled
#   2 - Level 2 debug messaging enabled
#   3 - Level 3 debug messaging enabled
#   4 - Level 4 debug messaging enabled
# (0 : default)
#----------------------------------------------------------#
DEBUG=4

#-------------End Config Options----------------------------#

DEBUG:


server_brand='emby'
user_keys=[
    "Floflobel:4fd64ef2422e40e0ba6e095eb9f74ecd"
]
played_filter_movie=[22, '>=', 1]
played_filter_episode=[-1, '>=', 1]
played_filter_audio=[-1, '>=', 1]
created_filter_movie=[-1, '>=', 1, True]
created_filter_episode=[-1, '>=', 1, True]
created_filter_audio=[-1, '>=', 1, True]
favorited_behavior_movie=['keep', 'any', 'ignore', 3]
favorited_behavior_episode=['keep', 'any', 'ignore', 3]
favorited_behavior_audio=['keep', 'any', 'ignore', 3]
favorited_advanced_movie_genre=0
favorited_advanced_movie_library_genre=0
favorited_advanced_episode_genre=0
favorited_advanced_season_genre=0
favorited_advanced_series_genre=0
favorited_advanced_tv_library_genre=0
favorited_advanced_tv_studio_network=0
favorited_advanced_tv_studio_network_genre=0
favorited_advanced_track_genre=0
favorited_advanced_album_genre=0
favorited_advanced_music_library_genre=0
favorited_advanced_track_artist=0
favorited_advanced_album_artist=0
whitetag=''
whitetagged_behavior_movie=['keep', 'all', 'ignore', 0]
whitetagged_behavior_episode=['keep', 'all', 'ignore', 0]
whitetagged_behavior_audio=['keep', 'all', 'ignore', 0]
blacktag=''
blacktagged_behavior_movie=['delete', 'all', 'any', 0]
blacktagged_behavior_episode=['delete', 'all', 'any', 0]
blacktagged_behavior_audio=['delete', 'all', 'any', 0]
whitelisted_behavior_movie=['keep', 'any', 'ignore', 3]
whitelisted_behavior_episode=['keep', 'any', 'ignore', 3]
whitelisted_behavior_audio=['keep', 'any', 'ignore', 3]
blacklisted_behavior_movie=['delete', 'any', 'any', 3]
blacklisted_behavior_episode=['delete', 'any', 'any', 3]
blacklisted_behavior_audio=['delete', 'any', 'any', 3]
minimum_number_episodes=0
minimum_number_played_episodes=0
minimum_number_episodes_behavior='Max Played Min Unplayed'
movie_set_missing_last_played_date=True
episode_set_missing_last_played_date=True
audio_set_missing_last_played_date=True
print_script_header='True'
print_warnings='True'
print_user_header='True'
print_movie_delete_info='True'
print_movie_keep_info='True'
print_episode_delete_info='True'
print_episode_keep_info='True'
print_audio_delete_info='True'
print_audio_keep_info='True'
print_summary_header='True'
print_movie_summary='True'
print_episode_summary='True'
print_audio_summary='True'
print_script_footer='True'
UPDATE_CONFIG='False'
REMOVE_FILES='False'
server_url='https://streaming.domain:443/emby'
auth_key=''
library_setup_behavior='blacklist'
library_matching_behavior='byid'
user_bl_libs=[
    {
        "userid": "4fd64ef2422e40e0ba6e095eb9f74ecd",
        "username": "Floflobel",
        "0": {
            "libid": "db4c1708cbb5dd1676284a40f2950aba",
            "collectiontype": "movies",
            "path": "/media/storage3/films",
            "networkpath": ""
        },
        "1": {
            "libid": "db4c1708cbb5dd1676284a40f2950aba",
            "collectiontype": "movies",
            "path": "/media/storage6/films",
            "networkpath": ""
        },
        "2": {
            "libid": "db4c1708cbb5dd1676284a40f2950aba",
            "collectiontype": "movies",
            "path": "/media/storage4/films",
            "networkpath": ""
        },
        "3": {
            "libid": "db4c1708cbb5dd1676284a40f2950aba",
            "collectiontype": "movies",
            "path": "/media/storage7/films",
            "networkpath": ""
        },
        "4": {
            "libid": "db4c1708cbb5dd1676284a40f2950aba",
            "collectiontype": "movies",
            "path": "/media/storage8/films",
            "networkpath": ""
        },
        "5": {
            "libid": "db4c1708cbb5dd1676284a40f2950aba",
            "collectiontype": "movies",
            "path": "/media/storage2/films",
            "networkpath": ""
        },
        "6": {
            "libid": "db4c1708cbb5dd1676284a40f2950aba",
            "collectiontype": "movies",
            "path": "/media/storage9/films",
            "networkpath": ""
        }
    }
]
user_wl_libs=[
    {
        "userid": "4fd64ef2422e40e0ba6e095eb9f74ecd",
        "username": "Floflobel",
        "7": {
            "libid": "4243b5a6131c8132dd863e2585f88056",
            "collectiontype": "playlists",
            "path": "/var/lib/emby/data/playlists",
            "networkpath": ""
        },
        "8": {
            "libid": "4243b5a6131c8132dd863e2585f88056",
            "collectiontype": "playlists",
            "path": "/var/lib/emby/data/userplaylists",
            "networkpath": ""
        },
        "9": {
            "libid": "23f368a8448168d1fd434a016eb66fb6",
            "collectiontype": "tvshows",
            "path": "/media/storage3/manga",
            "networkpath": ""
        },
        "10": {
            "libid": "23f368a8448168d1fd434a016eb66fb6",
            "collectiontype": "tvshows",
            "path": "/media/storage6/manga",
            "networkpath": ""
        },
        "11": {
            "libid": "23f368a8448168d1fd434a016eb66fb6",
            "collectiontype": "tvshows",
            "path": "/media/storage7/manga",
            "networkpath": ""
        },
        "12": {
            "libid": "23f368a8448168d1fd434a016eb66fb6",
            "collectiontype": "tvshows",
            "path": "/media/storage4/manga",
            "networkpath": ""
        },
        "13": {
            "libid": "23f368a8448168d1fd434a016eb66fb6",
            "collectiontype": "tvshows",
            "path": "/media/storage8/manga",
            "networkpath": ""
        },
        "14": {
            "libid": "23f368a8448168d1fd434a016eb66fb6",
            "collectiontype": "tvshows",
            "path": "/media/storage2/manga",
            "networkpath": ""
        },
        "15": {
            "libid": "23f368a8448168d1fd434a016eb66fb6",
            "collectiontype": "tvshows",
            "path": "/media/storage9/manga",
            "networkpath": ""
        },
        "16": {
            "libid": "d565273fd114d77bdf349a2896867069",
            "collectiontype": "tvshows",
            "path": "/media/storage3/series",
            "networkpath": ""
        },
        "17": {
            "libid": "d565273fd114d77bdf349a2896867069",
            "collectiontype": "tvshows",
            "path": "/media/storage6/series",
            "networkpath": ""
        },
        "18": {
            "libid": "d565273fd114d77bdf349a2896867069",
            "collectiontype": "tvshows",
            "path": "/media/storage7/series",
            "networkpath": ""
        },
        "19": {
            "libid": "d565273fd114d77bdf349a2896867069",
            "collectiontype": "tvshows",
            "path": "/media/storage4/series",
            "networkpath": ""
        },
        "20": {
            "libid": "d565273fd114d77bdf349a2896867069",
            "collectiontype": "tvshows",
            "path": "/media/storage8/series",
            "networkpath": ""
        },
        "21": {
            "libid": "d565273fd114d77bdf349a2896867069",
            "collectiontype": "tvshows",
            "path": "/media/storage2/series",
            "networkpath": ""
        },
        "22": {
            "libid": "d565273fd114d77bdf349a2896867069",
            "collectiontype": "tvshows",
            "path": "/media/storage9/series",
            "networkpath": ""
        }
    }
]
api_query_attempts=4
api_query_item_limit=25
api_query_cache_size=32
api_query_cache_fallback_behavior='LRU'
api_query_cache_last_accessed_time=200
DEBUG=4
-----------------------------------------------------------

-----------------------------------------------------------
MUMC Version: 4.1.20

get_server_version - url request:
https://streaming.domain:443/emby/System/Info?api_key=XXXXX
Response code: 200
Data Returned From The get_server_version Request:
{
    "SystemUpdateLevel": "Beta",
    "OperatingSystemDisplayName": "Unix",
    "HasPendingRestart": false,
    "IsShuttingDown": false,
    "OperatingSystem": "Linux",
    "SupportsLibraryMonitor": true,
    "SupportsLocalPortConfiguration": true,
    "SupportsWakeServer": false,
    "WebSocketPortNumber": 8096,
    "CompletedInstallations": [],
    "CanSelfRestart": true,
    "CanSelfUpdate": false,
    "CanLaunchWebBrowser": false,
    "ProgramDataPath": "/var/lib/emby",
    "ItemsByNamePath": "/var/lib/emby/metadata",
    "CachePath": "/var/lib/emby/cache",
    "LogPath": "/var/lib/emby/logs",
    "InternalMetadataPath": "/var/lib/emby/metadata",
    "TranscodingTempPath": "/var/lib/emby/transcoding-temp",
    "HttpServerPortNumber": 8096,
    "SupportsHttps": true,
    "HttpsPortNumber": 8920,
    "HasUpdateAvailable": false,
    "SupportsAutoRunAtStartup": false,
    "HardwareAccelerationRequiresPremiere": true,
    "LocalAddress": "http://192.168.1.153:8096",
    "LocalAddresses": [
        "http://192.168.1.153:8096"
    ],
    "WanAddress": "https://X.X.X.X:8920",
    "RemoteAddresses": [
        "https://X.X.X.X:8920"
    ],
    "ServerName": "NAME",
    "Version": "4.8.0.39",
    "Id": "XXXXXX"
}
Emby Version: 4.8.0.39
Python Version: 3.11.4
OS Info: Linux-6.3.12-200.fc38.x86_64-x86_64-with-glibc2.37
Time Stamp: 20230717122818
-----------------------------------------------------------

-----------------------------------------------------------
Start...
Cleaning media for server at: https://streaming.domain:443/emby
-----------------------------------------------------------

Building Blacklisted Libraries...
Building library for user with Id: 4fd64ef2422e40e0ba6e095eb9f74ecd
Building library for user with name: 'Floflobel'
Library Id: db4c1708cbb5dd1676284a40f2950aba
Collection Type: 'movies'
Path: '/media/storage3/films'
Network Path: ''
Library Id: db4c1708cbb5dd1676284a40f2950aba
Collection Type: 'movies'
Path: '/media/storage6/films'
Network Path: ''
Library Id: db4c1708cbb5dd1676284a40f2950aba
Collection Type: 'movies'
Path: '/media/storage4/films'
Network Path: ''
Library Id: db4c1708cbb5dd1676284a40f2950aba
Collection Type: 'movies'
Path: '/media/storage7/films'
Network Path: ''
Library Id: db4c1708cbb5dd1676284a40f2950aba
Collection Type: 'movies'
Path: '/media/storage8/films'
Network Path: ''
Library Id: db4c1708cbb5dd1676284a40f2950aba
Collection Type: 'movies'
Path: '/media/storage2/films'
Network Path: ''
Library Id: db4c1708cbb5dd1676284a40f2950aba
Collection Type: 'movies'
Path: '/media/storage9/films'
Network Path: ''
Building Whitelisted Libraries...
Building library for user with Id: 4fd64ef2422e40e0ba6e095eb9f74ecd
Building library for user with name: 'Floflobel'
Library Id: 4243b5a6131c8132dd863e2585f88056
Collection Type: 'playlists'
Path: '/var/lib/emby/data/playlists'
Network Path: ''
Library Id: 4243b5a6131c8132dd863e2585f88056
Collection Type: 'playlists'
Path: '/var/lib/emby/data/userplaylists'
Network Path: ''
Library Id: 23f368a8448168d1fd434a016eb66fb6
Collection Type: 'tvshows'
Path: '/media/storage3/manga'
Network Path: ''
Library Id: 23f368a8448168d1fd434a016eb66fb6
Collection Type: 'tvshows'
Path: '/media/storage6/manga'
Network Path: ''
Library Id: 23f368a8448168d1fd434a016eb66fb6
Collection Type: 'tvshows'
Path: '/media/storage7/manga'
Network Path: ''
Library Id: 23f368a8448168d1fd434a016eb66fb6
Collection Type: 'tvshows'
Path: '/media/storage4/manga'
Network Path: ''
Library Id: 23f368a8448168d1fd434a016eb66fb6
Collection Type: 'tvshows'
Path: '/media/storage8/manga'
Network Path: ''
Library Id: 23f368a8448168d1fd434a016eb66fb6
Collection Type: 'tvshows'
Path: '/media/storage2/manga'
Network Path: ''
Library Id: 23f368a8448168d1fd434a016eb66fb6
Collection Type: 'tvshows'
Path: '/media/storage9/manga'
Network Path: ''
Library Id: d565273fd114d77bdf349a2896867069
Collection Type: 'tvshows'
Path: '/media/storage3/series'
Network Path: ''
Library Id: d565273fd114d77bdf349a2896867069
Collection Type: 'tvshows'
Path: '/media/storage6/series'
Network Path: ''
Library Id: d565273fd114d77bdf349a2896867069
Collection Type: 'tvshows'
Path: '/media/storage7/series'
Network Path: ''
Library Id: d565273fd114d77bdf349a2896867069
Collection Type: 'tvshows'
Path: '/media/storage4/series'
Network Path: ''
Library Id: d565273fd114d77bdf349a2896867069
Collection Type: 'tvshows'
Path: '/media/storage8/series'
Network Path: ''
Library Id: d565273fd114d77bdf349a2896867069
Collection Type: 'tvshows'
Path: '/media/storage2/series'
Network Path: ''
Library Id: d565273fd114d77bdf349a2896867069
Collection Type: 'tvshows'
Path: '/media/storage9/series'
Network Path: ''

current_user - url request:
https://streaming.domain:443/emby/Users/4fd64ef2422e40e0ba6e095eb9f74ecd/?api_key=XXXXX
Response code: 200
Data Returned From The current_user Request:
{
    "Name": "Floflobel",
    "ServerId": "XXXXXX",
    "Prefix": "F",
    "DateCreated": "0001-01-01T00:00:00.0000000Z",
    "Id": "4fd64ef2422e40e0ba6e095eb9f74ecd",
    "HasPassword": true,
    "HasConfiguredPassword": true,
    "HasConfiguredEasyPassword": false,
    "LastLoginDate": "2023-07-17T10:27:00.2017804Z",
    "LastActivityDate": "2023-07-17T10:28:18.1903118Z",
    "Configuration": {
        "AudioLanguagePreference": "fr",
        "PlayDefaultAudioTrack": true,
        "SubtitleLanguagePreference": "",
        "DisplayMissingEpisodes": false,
        "SubtitleMode": "Default",
        "EnableLocalPassword": false,
        "OrderedViews": [
            "d88a6daeb5967a89c550cbd84f90a092",
            "db4c1708cbb5dd1676284a40f2950aba",
            "d565273fd114d77bdf349a2896867069",
            "9d7ad6afe9afa2dab1a2f6e00ad28fa6",
            "23f368a8448168d1fd434a016eb66fb6",
            "4243b5a6131c8132dd863e2585f88056",
            "28b5d5b8bef4bd1f1914503b5c11ac91"
        ],
        "LatestItemsExcludes": [
            "28b5d5b8bef4bd1f1914503b5c11ac91"
        ],
        "MyMediaExcludes": [
            "9d7ad6afe9afa2dab1a2f6e00ad28fa6",
            "28b5d5b8bef4bd1f1914503b5c11ac91"
        ],
        "HidePlayedInLatest": false,
        "RememberAudioSelections": true,
        "RememberSubtitleSelections": true,
        "EnableNextEpisodeAutoPlay": true,
        "ResumeRewindSeconds": 0,
        "IntroSkipMode": "ShowButton"
    },
    "Policy": {
        "IsAdministrator": true,
        "IsHidden": true,
        "IsHiddenRemotely": true,
        "IsHiddenFromUnusedDevices": false,
        "IsDisabled": false,
        "LockedOutDate": 0,
        "AllowTagOrRating": false,
        "BlockedTags": [],
        "IsTagBlockingModeInclusive": false,
        "IncludeTags": [],
        "EnableUserPreferenceAccess": true,
        "AccessSchedules": [],
        "BlockUnratedItems": [],
        "EnableRemoteControlOfOtherUsers": true,
        "EnableSharedDeviceControl": true,
        "EnableRemoteAccess": true,
        "EnableLiveTvManagement": true,
        "EnableLiveTvAccess": true,
        "EnableMediaPlayback": true,
        "EnableAudioPlaybackTranscoding": true,
        "EnableVideoPlaybackTranscoding": true,
        "EnablePlaybackRemuxing": true,
        "EnableContentDeletion": true,
        "RestrictedFeatures": [],
        "EnableContentDeletionFromFolders": [],
        "EnableContentDownloading": true,
        "EnableSubtitleDownloading": true,
        "EnableSubtitleManagement": true,
        "EnableSyncTranscoding": true,
        "EnableMediaConversion": true,
        "EnabledChannels": [],
        "EnableAllChannels": true,
        "EnabledFolders": [
            "d88a6daeb5967a89c550cbd84f90a092"
        ],
        "EnableAllFolders": true,
        "InvalidLoginAttemptCount": 0,
        "EnablePublicSharing": false,
        "BlockedMediaFolders": [],
        "RemoteClientBitrateLimit": 0,
        "AuthenticationProviderId": "Emby.Server.Implementations.Library.DefaultAuthenticationProvider",
        "ExcludedSubFolders": [],
        "SimultaneousStreamLimit": 0,
        "EnabledDevices": [],
        "EnableAllDevices": true
    }
}

-----------------------------------------------------------
Get List Of Media For:
Floflobel - 4fd64ef2422e40e0ba6e095eb9f74ecd
-----------------------------------------------------------

Processing MOVIE Items For UserId: 4fd64ef2422e40e0ba6e095eb9f74ecd
IsPlayed IsCreated Filter Value: True
IsPlayed IsCreated Filter Value: True

movie_blacklist_media_items - url request:
https://streaming.domain:443/emby/Users/4fd64ef2422e40e0ba6e095eb9f74ecd/Items?ParentID=db4c1708cbb5dd1676284a40f2950aba&IncludeItemTypes=Movie&StartIndex=0&Limit=1&IsPlayed=True&Fields=Id,ParentId,Path,Tags,MediaSources,DateCreated,Genres,Studios&Recursive=True&SortBy=ParentIndexNumber,IndexNumber,Name&SortOrder=Ascending&EnableImages=False&CollapseBoxSetItems=False&EnableUserData=True&api_key=XXXXX
Response code: 200
Data Returned From The movie_blacklist_media_items Request:
{
    "Items": [
        {
            "Name": "#plaisir",
            "ServerId": "XXXXXX",
            "Id": "1186623",
            "DateCreated": "2022-08-29T07:34:27.0000000Z",
            "Container": "mkv",
            "MediaSources": [
                {
                    "Protocol": "File",
                    "Id": "c385b6d8e34fdcaca23593b47c6c2e3b",
                    "Path": "/media/storage9/films/#plaisir (2022) [imdbid-]/#plaisir (2022) [imdb-][WEBDL-1080p][FR+DE][AAC 2.0][x264].mkv",
                    "Type": "Default",
                    "Container": "mkv",
                    "Size": 959149109,
                    "Name": "#plaisir (2022) [imdb-][WEBDL-1080p][FR+DE][AAC 2.0][x264]",
                    "IsRemote": false,
                    "RunTimeTicks": 14858020000,
                    "SupportsTranscoding": true,
                    "SupportsDirectStream": true,
                    "SupportsDirectPlay": true,
                    "IsInfiniteStream": false,
                    "RequiresOpening": false,
                    "RequiresClosing": false,
                    "RequiresLooping": false,
                    "SupportsProbing": false,
                    "MediaStreams": [
                        {
                            "Codec": "h264",
                            "TimeBase": "1/1000",
                            "VideoRange": "SDR",
                            "DisplayTitle": "1080p H264",
                            "NalLengthSize": "4",
                            "IsInterlaced": false,
                            "BitRate": 5164344,
                            "BitDepth": 8,
                            "RefFrames": 1,
                            "IsDefault": true,
                            "IsForced": false,
                            "Height": 1080,
                            "Width": 1920,
                            "AverageFrameRate": 30,
                            "RealFrameRate": 30,
                            "Profile": "High",
                            "Type": "Video",
                            "AspectRatio": "16:9",
                            "Index": 0,
                            "IsExternal": false,
                            "IsTextSubtitleStream": false,
                            "SupportsExternalStream": false,
                            "Protocol": "File",
                            "PixelFormat": "yuv420p",
                            "Level": 42,
                            "IsAnamorphic": false,
                            "ExtendedVideoType": "None",
                            "ExtendedVideoSubtype": "None",
                            "AttachmentSize": 0
                        },
                        {
                            "Codec": "aac",
                            "Language": "fre",
                            "TimeBase": "1/1000",
                            "Title": "Fran\u00e7ais",
                            "DisplayTitle": "French AAC stereo (Default)",
                            "DisplayLanguage": "French",
                            "IsInterlaced": false,
                            "ChannelLayout": "stereo",
                            "BitRate": 192000,
                            "Channels": 2,
                            "SampleRate": 48000,
                            "IsDefault": true,
                            "IsForced": false,
                            "Profile": "LC",
                            "Type": "Audio",
                            "Index": 1,
                            "IsExternal": false,
                            "IsTextSubtitleStream": false,
                            "SupportsExternalStream": false,
                            "Protocol": "File",
                            "ExtendedVideoType": "None",
                            "ExtendedVideoSubtype": "None",
                            "AttachmentSize": 0
                        },
                        {
                            "Codec": "aac",
                            "Language": "ger",
                            "TimeBase": "1/1000",
                            "Title": "Deutsch",
                            "DisplayTitle": "German AAC stereo",
                            "DisplayLanguage": "German",
                            "IsInterlaced": false,
                            "ChannelLayout": "stereo",
                            "BitRate": 192000,
                            "Channels": 2,
                            "SampleRate": 48000,
                            "IsDefault": false,
                            "IsForced": false,
                            "Profile": "LC",
                            "Type": "Audio",
                            "Index": 2,
                            "IsExternal": false,
                            "IsTextSubtitleStream": false,
                            "SupportsExternalStream": false,
                            "Protocol": "File",
                            "ExtendedVideoType": "None",
                            "ExtendedVideoSubtype": "None",
                            "AttachmentSize": 0
                        },
                        {
                            "Codec": "subrip",
                            "Language": "fre",
                            "TimeBase": "1/1000",
                            "Title": "Fran\u00e7ais",
                            "DisplayTitle": "French (SUBRIP)",
                            "DisplayLanguage": "French",
                            "IsInterlaced": false,
                            "IsDefault": false,
                            "IsForced": false,
                            "Type": "Subtitle",
                            "Index": 3,
                            "IsExternal": false,
                            "IsTextSubtitleStream": true,
                            "SupportsExternalStream": true,
                            "Protocol": "File",
                            "ExtendedVideoType": "None",
                            "ExtendedVideoSubtype": "None",
                            "AttachmentSize": 0,
                            "SubtitleLocationType": "InternalStream"
                        }
                    ],
                    "Formats": [],
                    "Bitrate": 5164344,
                    "RequiredHttpHeaders": {},
                    "ReadAtNativeFramerate": false,
                    "DefaultAudioStreamIndex": 1,
                    "DefaultSubtitleStreamIndex": -1
                }
            ],
            "Path": "/media/storage9/films/#plaisir (2022) [imdbid-]/#plaisir (2022) [imdb-][WEBDL-1080p][FR+DE][AAC 2.0][x264].mkv",
            "Genres": [
                "Documentaire"
            ],
            "RunTimeTicks": 14858020000,
            "Size": 959149109,
            "Bitrate": 5164344,
            "IsFolder": false,
            "ParentId": "1186619",
            "Type": "Movie",
            "Studios": [
                {
                    "Name": "BrutX",
                    "Id": 1048519
                }
            ],
            "GenreItems": [
                {
                    "Name": "Documentaire",
                    "Id": 8010
                }
            ],
            "TagItems": [],
            "UserData": {
                "PlaybackPositionTicks": 0,
                "PlayCount": 0,
                "IsFavorite": false,
                "Played": true
            },
            "MediaType": "Video"
        }
    ],
    "TotalRecordCount": 514
}

API Query Control Data For The NEXT LOOP: movie_blacklist_media_items
Starting at record index: 1
Asking for 25 records
Total records for this query is: 514
Are there records remaining: True

movie_whitelist_media_items - url request:
https://streaming.domain:443/emby/Users/4fd64ef2422e40e0ba6e095eb9f74ecd/Items?ParentID=4243b5a6131c8132dd863e2585f88056&IncludeItemTypes=Movie&StartIndex=0&Limit=1&IsPlayed=True&Fields=Id,ParentId,Path,Tags,MediaSources,DateCreated,Genres,Studios&Recursive=True&SortBy=ParentIndexNumber,IndexNumber,Name&SortOrder=Ascending&EnableImages=False&CollapseBoxSetItems=False&EnableUserData=True&api_key=XXXXX
Response code: 200
Data Returned From The movie_whitelist_media_items Request:
{
    "Items": [],
    "TotalRecordCount": 0
}

API Query Control Data For The NEXT LOOP: movie_whitelist_media_items
Starting at record index: 1
Asking for -1 records
Total records for this query is: 0
Are there records remaining: False

movie_Favorited_From_Blacklist_media_items - url request:
https://streaming.domain:443/emby/Users/4fd64ef2422e40e0ba6e095eb9f74ecd/Items?ParentID=db4c1708cbb5dd1676284a40f2950aba&IncludeItemTypes=Movie,BoxSet,CollectionFolder&StartIndex=0&Limit=1&Fields=Id,ParentId,Path,Tags,MediaSources,DateCreated,Genres,Studios&Recursive=True&SortBy=ParentIndexNumber,IndexNumber,Name&SortOrder=Ascending&EnableImages=False&CollapseBoxSetItems=False&IsFavorite=True&EnableUserData=True&api_key=XXXXX
Response code: 200
Data Returned From The movie_Favorited_From_Blacklist_media_items Request:
{
    "Items": [],
    "TotalRecordCount": 0
}

API Query Control Data For The NEXT LOOP: movie_Favorited_From_Blacklist_media_items
Starting at record index: 1
Asking for -1 records
Total records for this query is: 0
Are there records remaining: False

movie_Favorited_From_Whitelist_media_items - url request:
https://streaming.domain:443/emby/Users/4fd64ef2422e40e0ba6e095eb9f74ecd/Items?ParentID=4243b5a6131c8132dd863e2585f88056&IncludeItemTypes=Movie,BoxSet,CollectionFolder&StartIndex=0&Limit=1&Fields=Id,ParentId,Path,Tags,MediaSources,DateCreated,Genres,Studios&Recursive=True&SortBy=ParentIndexNumber,IndexNumber,Name&SortOrder=Ascending&EnableImages=False&CollapseBoxSetItems=False&IsFavorite=True&EnableUserData=True&api_key=XXXXX
Response code: 200
Data Returned From The movie_Favorited_From_Whitelist_media_items Request:
{
    "Items": [],
    "TotalRecordCount": 0
}

API Query Control Data For The NEXT LOOP: movie_Favorited_From_Whitelist_media_items
Starting at record index: 1
Asking for -1 records
Total records for this query is: 0
Are there records remaining: False

No blacktagged media items are blacklisted

No blacktagged media items are whitelisted

No whitetagged media items are blacklisted

No whitetagged media items are whitelisted

Inspecting Media Item: 1186623
Media Item Is Monitored: True
Processing Movie Item: 1186623

Preparing Movie 1186623 For Output
0 exist in [{'Name': 'BrutX', 'Id': 1048519}]
item['UserData']['LastPlayedDate'] Was Missing
Finished Preparing Movie 1186623 For Output
terrelsa13 commented 1 year ago

@Floflobel Ahh I see. The feature to account for incomplete UserData from Trakt imports was setting the item['UserData']['LastPlayedDate'] to 'Unplayed' then trying to parse the string as a date-time. Try MUMC-Latest v4.1.21 and let me know if the issue is fixed.

Floflobel commented 1 year ago

Thank you for your quick fix!

The error has been resolved but it seems that all my media is at "Play Count: 0". I'll check on my side if I don't see anything and send you the logs if necessary.

Floflobel commented 1 year ago

It seems that there's a problem with Emby's API, rather than a problem with the code. From what I can see in the logs, you're going to batch retrieve the items and that's when it returns a PlayCount of 0:

https://streaming.domain/emby/Users/4fd64ef2422e40e0ba6e095eb9f74ecd/Items?ParentID=db4c1708cbb5dd1676284a40f2950aba&IncludeItemTypes=Movie&StartIndex=151&Limit=25&IsPlayed=True&Fields=Id,ParentId,Path,Tags,MediaSources,DateCreated,Genres,Studios&Recursive=True&SortBy=ParentIndexNumber,IndexNumber,Name&SortOrder=Ascending&EnableImages=False&CollapseBoxSetItems=False&EnableUserData=True&api_key=XXXXX
{
    Name: "Fast & Furious X",
...
    UserData: {
        PlaybackPositionTicks: 0,
        PlayCount: 0,
        IsFavorite: true,
        Played: true
    },
...
},

Whereas when I look in my developer console and retrieve the JSON by going to a movie, this is what I get:

https://streaming.domain/emby/Users/4fd64ef2422e40e0ba6e095eb9f74ecd/Items/1229467?Fields=ShareLevel&X-Emby-Client=Emby%20Web&X-Emby-Device-Name=Chromium%20Linux&X-Emby-Device-Id=ada2d6bb-a1d7-49e4-83a5-d38cb737451e&X-Emby-Client-Version=4.8.0.39&X-Emby-Token=XXXXXX&X-Emby-Language=fr
{
    Name: "Fast & Furious X",
...
    UserData: {
        PlaybackPositionTicks: 0,
        PlayCount: 1,
        IsFavorite: true,
        LastPlayedDate: "2023-07-18T20:51:25.0000000Z",
        Played: true
    },
...
}

I'll keep looking at the API to see if I can find anything.

Floflobel commented 1 year ago

According to the Emby team, you just need to add this to the request. I'll test it by modifying the script.

Fields=UserDataPlayCount,UserDataLastPlayedDate
terrelsa13 commented 1 year ago

Awesome! Thanks for looking into this. I will test it out on my end this weekend.

Floflobel commented 1 year ago

I've modified the code and everything seems to be working fine as far as UserDataPlayCount is concerned, I still need to fix UserDataLastPlayedDate as all my media are in "Unplayed" status.

I can try to do a PR but I don't think I've done everything right.


However, I'd need your help with the settings because I'm trying to do a fairly basic setup but I can't manage it. I've turned everything upside down. Don't hesitate to let me know if you'd like another issue.

I'd like to delete only media that have 0 play count and were created more than 365 days ago. But taking into account the fact that if a user has seen this movie it shouldn't delete it.

From what I understand, I'll have to play with this parameter:

blacklisted_behavior_movie=['delete', 'any', 'all', 3]

I've tried setting the Played Conditional to all but it always deletes my media when someone doesn't meet the criterion.

Floflobel - 
...
:*[DELETE] - Movie - Strange Days - 20th Century Fox - Unplayed - Play Count: 0 - Created 870 days ago - Favorite: False - WhiteTag: False - BlackTag: False - Whitelisted: False - Blacklisted: True - MovieID: 1188601
...
-----------------------------------------------------------
User2 - 
...
:[KEEPING] - Movie - Strange Days - 20th Century Fox - Unplayed - Play Count: 2 - Created 870 days ago - Favorite: False - WhiteTag: False - BlackTag: False - Whitelisted: False - Blacklisted: True - MovieID: 1188601
...
-----------------------------------------------------------
...
[DELETED]     Movie - Strange Days - 1188601
...

Log: mumc_config.py.txt

terrelsa13 commented 1 year ago

Np. I made the changes to add UserDataPlayCount and UserDataLastPlayedDate to the Fields= API calls. Should now see it in the latest with v4.1.24.


If you are looking to delete episodes regardless of them being favorited, whitetagged, blacktagged, blacklisted, or whitelisted. Then change created_filter_movie=[360, '==', 0, True] to created_filter_movie=[360, '==', 0, False]. The False should tell the script to ignore if the episode is favorited, whitetagged, blacktagged, blacklisted, or whitelisted and delete it anyway.

If you are looking for something more specific that involves deleting unwatched episodes after 360 days and if it does or does not meet the favorited, whitetagged, blacktagged, blacklisted, or whitelisted behaviors; you will have to explain to me exactly what you want to do.

Floflobel commented 1 year ago

It seems to work for "UserDataPlayCount" but not for "UserDataLastPlayedDate". All my media with at least 1 playback are in "Unplayed" status.

I'll have a look when I have time.


What I want to do is quite simple: I'd like to delete media with 0 views that were created more than 360 days ago. But I'd like it to take into account the views of all users.

For example, the movie "Strange Days" was created more than 360 days ago and has been viewed at least once by User2, in which case I don't want to delete it. If, on the other hand, nobody had seen it, then I want to delete it. I don't use whitetags and blacktags.

Floflobel - 
...
:*[DELETE] - Movie - Strange Days - 20th Century Fox - Unplayed - Play Count: 0 - Created 870 days ago - Favorite: False - WhiteTag: False - BlackTag: False - Whitelisted: False - Blacklisted: True - MovieID: 1188601
...
-----------------------------------------------------------
User2 - 
...
:[KEEPING] - Movie - Strange Days - 20th Century Fox - Unplayed - Play Count: 2 - Created 870 days ago - Favorite: False - WhiteTag: False - BlackTag: False - Whitelisted: False - Blacklisted: True - MovieID: 1188601
...
-----------------------------------------------------------
...
[DELETED]     Movie - Strange Days - 1188601
...

I also tried setting the option you gave me to "False" but it wasn't really what I wanted and it doesn't change my logic.

I hope my explanation is a little more clear.

Floflobel commented 1 year ago

I'm sorry to do this again, but I've tried to figure it out again and I can't see how to do it. Could you please have some time to help me with the settings?

terrelsa13 commented 11 months ago

@Floflobel my apologies. Life and work have been busy. Any time I am able to find to work on this script; I spend on v5 of the script. I unfortunately do not have the bandwidth at this time to support both v4 and v5.

In general to delete media based on its creation date you will want to disable the played condition days and instead only use the created condition days. Then if you set the created count inequality and created count to the desired value; the script should only delete media based off of the creation date and the created played inequality + count specified.

Floflobel commented 11 months ago

No problem for your absence, it's perfectly understandable :). If you wish I can open a new issue rather than discuss this problem in this one?


I've just tested with V5 because I didn't quite understand which was the "main" version.

I only set a "created_filter_movie" and it works fine. However, when I put blacklisted_behavior_movie=['delete', 'all', 'all', 3]. I expect it to take all my users into account when deleting or not deleting media, but that's not the case.

Floflobel - 

...

:*[DELETE] - Movie - Strange Days - 20th Century Fox - Unplayed - Play Count: 0 - Created 870 days ago - Favorite: False - WhiteTag: False - BlackTag: False - Whitelisted: False - Blacklisted: True - MovieID: 1188601

...

-----------------------------------------------------------

User2 - 

...

:[KEEPING] - Movie - Strange Days - 20th Century Fox - Unplayed - Play Count: 2 - Created 870 days ago - Favorite: False - WhiteTag: False - BlackTag: False - Whitelisted: False - Blacklisted: True - MovieID: 1188601

...

-----------------------------------------------------------

...

MOVIE POST PROCESSING STARTED...

...

[DELETED] Movie - Strange Days - 1188601

...

DELETE + KEEP = KEEP

For me when I set all to Played Conditional (Y): Specify how monitored users must meet played_filter_*. It should keep my media.

terrelsa13 commented 11 months ago

v4 is under the MUMC-Latest branch. v5 is under the MUMC-Beta branch.

Looks like you may have grabbed the latest version of v4.


I really need to see your whole config to make sense of this. There could be other options set causing this movie to be kept instead of deleted.


I am not sure v4 can do what you want. But try these settings.

played_filter_movie=[-1, '>=', 1]
created_filter_movie=[300, '>=', 1, True]
favorited_behavior_movie=['keep', 'any', 'ignore', 0]
whitetagged_behavior_movie=['keep', 'all', 'ignore', 0]
blacktagged_behavior_movie=['delete', 'all', 'any', 0]
whitelisted_behavior_movie=['keep', 'any', 'ignore', 0]
blacklisted_behavior_movie=['delete', 'any', 'any', 5]

There is a known gap in played conditional of v4 where the script was not taking into account all variations of the played count/equality and created count/equality for behavioral statements. Below are the options available for v5.

v4 only had all,any, and ignore. And the all/any in v4 were the same as the all_played/any_played below for v5.

#all - Every monitored user(s) must meet the Played Count and Played Count Inequality of both the played_filter_* and created_filter_*
#any - One or more monitored user(s) must meet the Played Count and Played Count Inequality of either the played_filter_* or created_filter_*
#all_any - Every monitored user(s) must meet the Played Count and Played Count Inequality of either the played_filter_* or created_filter_*
#any_all - One or more monitored user(s) must meet the Played Count and Played Count Inequality of both the played_filter_* and created_filter_*
#all_played - Every monitored user(s) must meet the Played Count and Played Count Inequality of the played_filter_*
#any_played - One or more monitored user(s) must meet the Played Count and Played Count Inequality of the played_filter_*
#all_created - Every monitored user(s) must meet the Played Count and Played Count Inequality of the created_filter_*
#any_created - One or more monitored user(s) must meet the Played Count and Played Count Inequality of the created_filter_*
#ignore - Ignore if monitored user(s) meet the Played Count and Played Count Inequality of both the played_filter_* and created_filter_*
Floflobel commented 11 months ago

Thank you for your detailed feedback. I've just reinstall all my set-up to V5 and I'm trying to set-up MUMC but every time I get an error:

  1. One of my libraries (Top Picks) does not have a "CollectionType". To solve the problem, I deleted this library, but I think I should add a check to verify that the variable is defined here: https://github.com/terrelsa13/MUMC/blob/93b282d6049f597a0fd16631c487df181f133c8f/mumc_modules/mumc_userlib_builder.py#L796
    
    Traceback (most recent call last):
    File "/opt/MUMC_v5/mumc_modules/mumc_config_import.py", line 86, 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 "/opt/MUMC_v5/mumc.py", line 113, in main() File "/opt/MUMC_v5/mumc.py", line 31, in main cfg,init_dict=importConfig(init_dict,cmdopt_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/MUMC_v5/mumc_modules/mumc_config_import.py", line 102, in importConfig importHasException(init_dict,cmdopt_dict) File "/opt/MUMC_v5/mumc_modules/mumc_config_import.py", line 22, in importHasException build_configuration_file(init_dict) File "/opt/MUMC_v5/mumc_modules/mumc_config_builder.py", line 115, in build_configuration_file the_dict['admin_settings']['users']=get_users_and_libraries(the_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/MUMC_v5/mumc_modules/mumc_userlib_builder.py", line 796, in get_users_and_libraries if (not (folder['CollectionType'] == 'boxsets')):


```

2. When I try to initialize the script to generate the configuration file, I have a problem with a "Version" key
```
Monitoring multiple users is possible.                                                                                                                                                                               
When multiple users are selected; the user with the oldest last played time will determine if media can be deleted.                                                                                                  
Select one user at a time.                                                                                                                                                                                           
Enter number of the next user to monitor; leave blank when finished:                                                                                                                                                 

----------------------------------------------------------------------------------------                                                                                                                             
----------------------------------------------------------------------------------------                                                                                                                             
Traceback (most recent call last):                                                                                                                                                                                   
  File "/opt/MUMC_v5/mumc_modules/mumc_config_import.py", line 86, 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 "/opt/MUMC_v5/mumc.py", line 113, in <module>                                                                                                                                                                 
    main()                                                                                                                                                                                                           
  File "/opt/MUMC_v5/mumc.py", line 31, in main                                                                                                                                                                      
    cfg,init_dict=importConfig(init_dict,cmdopt_dict)                                                                                                                                                                
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                
  File "/opt/MUMC_v5/mumc_modules/mumc_config_import.py", line 102, in importConfig                                                                                                                                  
    importHasException(init_dict,cmdopt_dict)                                                                                                                                                                        
  File "/opt/MUMC_v5/mumc_modules/mumc_config_import.py", line 22, in importHasException                                                                                                                             
    build_configuration_file(init_dict)                                                                                                                                                                              
  File "/opt/MUMC_v5/mumc_modules/mumc_config_builder.py", line 156, in build_configuration_file                                                                                                                     
    yaml_configurationBuilder(the_dict)                                                                                                                                                                              
  File "/opt/MUMC_v5/mumc_modules/mumc_configuration_yaml.py", line 79, in yaml_configurationBuilder                                                                                                                 
    config_data={thekey:the_dict_copy[thekey] for thekey in the_dict_keys}                                                                                                                                           
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                           
  File "/opt/MUMC_v5/mumc_modules/mumc_configuration_yaml.py", line 79, in <dictcomp>                                                                                                                                
    config_data={thekey:the_dict_copy[thekey] for thekey in the_dict_keys}                                                                                                                                           
                        ~~~~~~~~~~~~~^^^^^^^^
KeyError: 'version'
```

I tried to figure out where it was coming from but couldn't. So I tried to remove the "version" key by replacing this line:
https://github.com/terrelsa13/MUMC/blob/93b282d6049f597a0fd16631c487df181f133c8f/mumc_modules/mumc_configuration_yaml.py#L78

with this:
```
    the_dict_keys=[,'basic_settings','advanced_settings','admin_settings','DEBUG']
```

But I think it's stuck somewhere. The configuration file is created, but every time I run the script again, it throws back the initial set-up to configure the server. I've checked that the parameter is set to False: `UPDATE_CONFIG: false`.
terrelsa13 commented 11 months ago

To not confuse anyone reading this in the future. I opened a new issue to keep v4 and v5 issues separate.

terrelsa13 commented 10 months ago

Closing. v4 is sun-setting. Do not have the bandwidth to fix v4 and develop v5.