fix dupes
This commit is contained in:
parent
68f2e768e7
commit
19c44cce5c
2 changed files with 17 additions and 43 deletions
|
|
@ -112,25 +112,23 @@ class SharedNfoTagsValidator(
|
||||||
if not isinstance(tag_value, list):
|
if not isinstance(tag_value, list):
|
||||||
tag_value = [tag_value]
|
tag_value = [tag_value]
|
||||||
|
|
||||||
# iterate each list, validate accordingly if it is a string tag or attribute tag
|
if isinstance(tag_value[0], str):
|
||||||
for tag_value_i in tag_value:
|
self._string_tags[key].extend(
|
||||||
if isinstance(tag_value_i, str):
|
self._validate_key(
|
||||||
self._string_tags[key].extend(
|
key=key,
|
||||||
self._validate_key(
|
validator=self._tags_validator,
|
||||||
key=key,
|
).list
|
||||||
validator=self._tags_validator,
|
)
|
||||||
).list
|
elif isinstance(tag_value[0], dict):
|
||||||
)
|
self._attribute_tags[key].extend(
|
||||||
elif isinstance(tag_value_i, dict):
|
self._validate_key(
|
||||||
self._attribute_tags[key].extend(
|
key=key, validator=self._tags_with_attributes_validator
|
||||||
self._validate_key(
|
).list
|
||||||
key=key, validator=self._tags_with_attributes_validator
|
)
|
||||||
).list
|
else:
|
||||||
)
|
raise self._validation_exception(
|
||||||
else:
|
"must either be a single or list of string/attribute object"
|
||||||
raise self._validation_exception(
|
)
|
||||||
"must either be a single or list of string/attribute object"
|
|
||||||
)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def string_tags(self) -> Dict[str, List[TStringFormatterValidator]]:
|
def string_tags(self) -> Dict[str, List[TStringFormatterValidator]]:
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,6 @@ Rick Beato - Can you hear the difference? 🎸🔥 #shorts.nfo
|
||||||
kodi_safe_multi_title □:
|
kodi_safe_multi_title □:
|
||||||
- value 1 □
|
- value 1 □
|
||||||
- value 2 □
|
- value 2 □
|
||||||
- value 1 □
|
|
||||||
- value 2 □
|
|
||||||
kodi_safe_multi_title_with_attrs:
|
kodi_safe_multi_title_with_attrs:
|
||||||
- attributes:
|
- attributes:
|
||||||
□?: 'value
|
□?: 'value
|
||||||
|
|
@ -24,16 +22,6 @@ Rick Beato - Can you hear the difference? 🎸🔥 #shorts.nfo
|
||||||
|
|
||||||
newlines □'
|
newlines □'
|
||||||
tag: "the \n tag 2 □□"
|
tag: "the \n tag 2 □□"
|
||||||
- attributes:
|
|
||||||
□?: 'value
|
|
||||||
|
|
||||||
newlines □'
|
|
||||||
tag: "the \n tag 1 □□"
|
|
||||||
- attributes:
|
|
||||||
□?: 'value
|
|
||||||
|
|
||||||
newlines □'
|
|
||||||
tag: "the \n tag 2 □□"
|
|
||||||
kodi_safe_title □: kodi_safe_value □
|
kodi_safe_title □: kodi_safe_value □
|
||||||
kodi_safe_title_with_attrs:
|
kodi_safe_title_with_attrs:
|
||||||
attributes:
|
attributes:
|
||||||
|
|
@ -49,8 +37,6 @@ test.nfo
|
||||||
kodi_safe_multi_title □:
|
kodi_safe_multi_title □:
|
||||||
- value 1 □
|
- value 1 □
|
||||||
- value 2 □
|
- value 2 □
|
||||||
- value 1 □
|
|
||||||
- value 2 □
|
|
||||||
kodi_safe_multi_title_with_attrs:
|
kodi_safe_multi_title_with_attrs:
|
||||||
- attributes:
|
- attributes:
|
||||||
□?: 'value
|
□?: 'value
|
||||||
|
|
@ -62,16 +48,6 @@ test.nfo
|
||||||
|
|
||||||
newlines □'
|
newlines □'
|
||||||
tag: "the \n tag 2 □□"
|
tag: "the \n tag 2 □□"
|
||||||
- attributes:
|
|
||||||
□?: 'value
|
|
||||||
|
|
||||||
newlines □'
|
|
||||||
tag: "the \n tag 1 □□"
|
|
||||||
- attributes:
|
|
||||||
□?: 'value
|
|
||||||
|
|
||||||
newlines □'
|
|
||||||
tag: "the \n tag 2 □□"
|
|
||||||
kodi_safe_title □: kodi_safe_value □
|
kodi_safe_title □: kodi_safe_value □
|
||||||
kodi_safe_title_with_attrs:
|
kodi_safe_title_with_attrs:
|
||||||
attributes:
|
attributes:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue