Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.

Commit

Permalink
fix theme upload conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Jan 27, 2024
1 parent 3503bfd commit 3bde25b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions Contents/Code/general_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ def get_theme_provider(item):
-------
str
The theme provider.
Examples
--------
>>> get_theme_provider(item=...)
...
"""
provider_map = {
'local': 'user',
Expand Down
6 changes: 3 additions & 3 deletions Contents/Code/plex_api_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,10 +193,10 @@ def update_plex_item(rating_key):
except Exception as e:
Log.Error('{}: Error updating summary: {}'.format(item.ratingKey, e))

if item.isLocked(field='theme') and not (
if item.isLocked(field='theme') and (item.type != 'show' or (
item.type == 'show' and
Prefs['bool_overwrite_plex_provided_themes'] and
general_helper.get_theme_provider(item=item) == 'plex'
not Prefs['bool_overwrite_plex_provided_themes'] and
general_helper.get_theme_provider(item=item) == 'plex')
):
Log.Debug('Not overwriting locked theme for {}: {}'.format(item.type, item.title))
else:
Expand Down

0 comments on commit 3bde25b

Please sign in to comment.