Plex-Meta-Manager icon indicating copy to clipboard operation
Plex-Meta-Manager copied to clipboard

rework logic around collection deletion

Open chazlarson opened this issue 7 months ago • 2 comments

Description

The existing code was deleting collections that didn't match all three criteria. I made it a little wordier with some trace logging and track each criteria separately.

Example logging while debugging this:

| 🎆 Independence Day Movies is smaller than None, DELETE                                             |
| 🎆 Independence Day Movies - managed: False - collection_is_managed: True, NO DELETE                |
| 🎆 Independence Day Movies - configured: False - collection_is_configured: False, DELETE            |
| 🎆 Independence Day Movies would NOT have been deleted by new code                                  |
| 🎆 Independence Day Movies would be deleted by old code                                             |

Trace logging produced by PR'ed code:

| 🎆 Independence Day Movies - less: None vs collection size: 4, DELETE: False                        |
| 🎆 Independence Day Movies - managed: False vs collection managed: True, DELETE: False              |
| 🎆 Independence Day Movies - configured: False vs collection configured: False, DELETE: True        |

Type of Change

Please delete options that are not relevant.

  • [X] Bug fix (non-breaking change which fixes an issue)

chazlarson avatar Jun 27 '24 21:06 chazlarson