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

fix: don't update locked fields + unlock fields after update #208

Merged
merged 9 commits into from
Nov 18, 2023

Conversation

zdimension
Copy link
Collaborator

Description

Locked fields will not be updated by Themerr. Fields updated by Themerr will be marked as non-locked.

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 9, 2023

Codecov Report

Merging #208 (a89b952) into nightly (12c78b8) will decrease coverage by 1.29%.
The diff coverage is 16.27%.

Additional details and impacted files
@@             Coverage Diff             @@
##           nightly     #208      +/-   ##
===========================================
- Coverage    67.75%   66.47%   -1.29%     
===========================================
  Files           11       11              
  Lines          856      874      +18     
===========================================
+ Hits           580      581       +1     
- Misses         276      293      +17     
Flag Coverage Δ
Linux 66.47% <16.27%> (-1.29%) ⬇️
Windows 66.47% <16.27%> (-1.29%) ⬇️
macOS 66.47% <16.27%> (-1.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
Contents/Code/constants.py 85.71% <ø> (ø)
Contents/Code/plex_api_helper.py 45.94% <16.27%> (-2.62%) ⬇️

Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these are the final adjustments. Also need to add a test for is_field_locked, I can take care of that if you'd like.

Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Copy link
Member

@ReenigneArcher ReenigneArcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function is now a method for plex item objects in plexapi.

Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
Contents/Code/plex_api_helper.py Outdated Show resolved Hide resolved
ReenigneArcher
ReenigneArcher previously approved these changes Nov 15, 2023
@ReenigneArcher
Copy link
Member

Getting several timeout errors with the new api version. Also, it is often saying "Not overwriting locked theme for movie: ...".

https://github.com/LizardByte/Themerr-plex/actions/runs/6882298903/job/18721980967?pr=208#step:9:1169

Copy link
Collaborator Author

@zdimension zdimension left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea to use a retry loop; tested it on my local setup by introducing fake timeouts (just maxed out my IO usage so Plex would be slowed down, and the loop properly retried and failed gracefully at the first attempt instead of crashing the plugin

@ReenigneArcher ReenigneArcher merged commit 1a91752 into LizardByte:nightly Nov 18, 2023
@zdimension zdimension deleted the check-locked branch November 19, 2023 17:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants