[60] update regex for 3.11

This commit is contained in:
meisnate12 2022-12-14 16:25:14 -05:00
parent b57c564175
commit 0df9f677f3
4 changed files with 14 additions and 5 deletions

View file

@ -1 +1 @@
1.18.0-develop59
1.18.0-develop60

View file

@ -133,7 +133,7 @@ templates:
- filepath.regex:
- <<regex1>>
- <<regex2>>
- 'edition-(?i)\b(4k )?<<search>>(s|ed)?\b' # New TRaSH naming
- '(?i)edition-\b(4k )?<<search>>(s|ed)?\b' # New TRaSH naming
- '(?<=[0-9]{4}[)}>\]]\s)\b(4k )?<<search>>(s|ed)?\b' # Original TRaSH naming
resolution:

View file

@ -2,6 +2,7 @@ import os, re
from datetime import datetime
from modules import plex, util
from modules.util import Failed, LimitReached, YAML
from plexapi.exceptions import BadRequest, NotFound
logger = util.logger
@ -454,8 +455,12 @@ class Operations:
pass
if len(batch_display) > 0:
item.saveEdits()
logger.info(f"Batch Edits{batch_display}")
try:
item.saveEdits()
logger.info(f"Batch Edits{batch_display}")
except (NotFound, BadRequest):
logger.stacktrace()
logger.error("Batch Edits Failed")
if self.library.mass_poster_update or self.library.mass_background_update:
try:

View file

@ -761,7 +761,11 @@ class Plex(Library):
self._query(key, put=True)
def smart_label_check(self, label):
return label in [la.title for la in self.get_tags("label")]
labels = [la.title for la in self.get_tags("label")]
if label in labels:
return True
logger.trace(f"Label not found in Plex. Options: {labels}")
return False
def test_smart_filter(self, uri_args):
logger.debug(f"Smart Collection Test: {uri_args}")