diff --git a/Contents/Code/default_prefs.py b/Contents/Code/default_prefs.py index 7d344da8..360079df 100644 --- a/Contents/Code/default_prefs.py +++ b/Contents/Code/default_prefs.py @@ -23,4 +23,5 @@ bool_webapp_log_werkzeug_messages='False', bool_migrate_locked_themes='False', bool_migrate_locked_collection_fields='False', + bool_ignore_locked_fields='False', ) diff --git a/Contents/Code/plex_api_helper.py b/Contents/Code/plex_api_helper.py index 770e25b6..08460b0b 100644 --- a/Contents/Code/plex_api_helper.py +++ b/Contents/Code/plex_api_helper.py @@ -166,7 +166,7 @@ def update_plex_item(rating_key): else: add_media(item=item, media_type='art', media_url_id=data['backdrop_path'], media_url=url) # update summary - if item.isLocked(field='summary'): + if item.isLocked(field='summary') and not Prefs['bool_ignore_locked_fields']: Log.Debug('Not overwriting locked summary for collection: {}'.format(item.title)) else: try: @@ -181,7 +181,7 @@ def update_plex_item(rating_key): except Exception as e: Log.Error('{}: Error updating summary: {}'.format(item.ratingKey, e)) - if item.isLocked(field='theme'): + if item.isLocked(field='theme') and not Prefs['bool_ignore_locked_fields']: Log.Debug('Not overwriting locked theme for {}: {}'.format(item.type, item.title)) else: # get youtube_url @@ -250,7 +250,7 @@ def add_media(item, media_type, media_url_id, media_file=None, media_url=None): settings_hash = general_helper.get_themerr_settings_hash() themerr_data = general_helper.get_themerr_json_data(item=item) - if item.isLocked(field=media_type_dict[media_type]['plex_field']): + if item.isLocked(field=media_type_dict[media_type]['plex_field']) and not Prefs['bool_ignore_locked_fields']: Log.Info('Not overwriting locked "{}" for {}: {}'.format( media_type_dict[media_type]['name'], item.type, item.title )) diff --git a/Contents/DefaultPrefs.json b/Contents/DefaultPrefs.json index 868b9995..9ccf787c 100644 --- a/Contents/DefaultPrefs.json +++ b/Contents/DefaultPrefs.json @@ -161,5 +161,12 @@ "label": "Migrate collection metadata from < v0.3.0 (If you used Themerr before v0.3.0, set this to True)", "default": "False", "secure": "false" + }, + { + "id": "bool_ignore_locked_fields", + "type": "bool", + "label": "Ignore locked fields (Always upload media, even if fields are locked)", + "default": "False", + "secure": "false" } ] diff --git a/docs/source/about/usage.rst b/docs/source/about/usage.rst index f0c08923..e0426a4c 100644 --- a/docs/source/about/usage.rst +++ b/docs/source/about/usage.rst @@ -319,3 +319,12 @@ Description Default ``False`` + +Ignore locked fields +^^^^^^^^^^^^^^^^^^^^ + +Description + When enabled, Themerr-plex will ignore locked fields when updating themes and collection metadata. + +Default + ``False``