INNER CODE UNIT · Python
prep_field_check
Casvt/Plex-scripts · library_management/recent_episode_maintainer.py:186
def prep_field_check(
field: str,
value: str
) -> Callable[[TMedia], bool]:
def field_check(media: TMedia) -> bool:
if field not in media:
return False
tags = {f["tag"] for f in media[field]}
return value in tags
return field_check
@dataclass
class MediaFilter:
match_all: bool
exclude: List[str]