Skip to content

Commit

Permalink
Fix wrong filtering positivity order
Browse files Browse the repository at this point in the history
  • Loading branch information
trickerer01 committed Jun 4, 2024
1 parent 964c76b commit 14a0d29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def is_filtered_out_by_extra_tags(ai: AlbumInfo, tags_raw: List[str], extra_tags
):
if conf and td:
for tmatch in match_text(extag, td, 'and'):
tmatch_s = tmatch[:50]
tmatch_s = tmatch[:100]
Log.trace(f'{sname} has {cn} NEG match: \'{tmatch_s}\'')
if tmatch_s not in neg_matches:
neg_matches.append(f'{tmatch_s}...')
Expand All @@ -321,13 +321,13 @@ def is_filtered_out_by_extra_tags(ai: AlbumInfo, tags_raw: List[str], extra_tags
for conf, cn, np, td in zip(
(Config.check_title_pos, Config.check_title_neg, Config.check_description_pos, Config.check_description_neg),
('TITL', 'TITL', 'DESC', 'DESC'),
('NEG', 'POS', 'NEG', 'POS'),
('POS', 'NEG', 'POS', 'NEG'),
(ai.title, ai.title, ai.description, ai.description)
):
if conf and td and ((np == 'NEG') == negative) and not mtag:
mtag = match_text(my_extag, td)
if mtag:
mtag = f'{mtag[:50]}...'
mtag = f'{mtag[:100]}...'
if negative is False:
Log.trace(f'{sname} has {cn} {np} match: \'{mtag}\'')
if mtag is not None and negative:
Expand Down

0 comments on commit 14a0d29

Please sign in to comment.