|
46 | 46 | import settings as settings_file
|
47 | 47 |
|
48 | 48 | # Version of the script
|
49 |
| -script_version = (2, 5, 14) |
| 49 | +script_version = (2, 5, 15) |
50 | 50 | script_version_text = "v{}.{}.{}".format(*script_version)
|
51 | 51 |
|
52 | 52 | # Paths = existing library
|
@@ -696,7 +696,6 @@ def send_message(
|
696 | 696 |
|
697 | 697 |
|
698 | 698 | # Determines the files library type
|
699 |
| -# must apply to all files |
700 | 699 | def get_library_type(files, required_match_percentage=90):
|
701 | 700 | results = []
|
702 | 701 | result = None
|
@@ -5763,11 +5762,6 @@ def get_identifiers(zip_comment):
|
5763 | 5762 |
|
5764 | 5763 | # remove any whitespace
|
5765 | 5764 | identifiers = [x.strip() for x in identifiers]
|
5766 |
| - |
5767 |
| - # remove any that are "NONE" - used to be the default vale for the identifier |
5768 |
| - # in my isbn script for other reasons |
5769 |
| - if identifiers: |
5770 |
| - metadata = [x for x in identifiers if "none" not in x.lower()] |
5771 | 5765 | return metadata
|
5772 | 5766 |
|
5773 | 5767 |
|
@@ -7245,6 +7239,9 @@ def remove_patterns(items, patterns):
|
7245 | 7239 | # Remove specified patterns from the results
|
7246 | 7240 | results = remove_patterns(results, patterns)
|
7247 | 7241 |
|
| 7242 | + # Remove any possible dupcliates |
| 7243 | + results = list(dict.fromkeys(results)) |
| 7244 | + |
7248 | 7245 | # Generate file extension modifiers for keywords
|
7249 | 7246 | modifiers = {
|
7250 | 7247 | ext: (
|
@@ -10756,9 +10753,9 @@ def extract_all_numbers(string, subtitle=None):
|
10756 | 10753 |
|
10757 | 10754 | # Remove the subtitle if present
|
10758 | 10755 | if subtitle:
|
10759 |
| - string = re.sub( |
10760 |
| - rf"(-|:)\s*{re.escape(subtitle)}$", "", string, re.IGNORECASE |
10761 |
| - ).strip() |
| 10756 | + string = remove_dual_space( |
| 10757 | + re.sub(rf"(-|:)\s*{re.escape(subtitle)}", "", string, re.IGNORECASE).strip() |
| 10758 | + ) |
10762 | 10759 |
|
10763 | 10760 | numbers = re.findall(
|
10764 | 10761 | r"\b(?:%s)(\d+(?:[-_.]\d+|)+(?:x\d+)?(?:#\d+(?:[-_.]\d+|)+)?)"
|
|
0 commit comments