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):
|
||||
tag_value = [tag_value]
|
||||
|
||||
# iterate each list, validate accordingly if it is a string tag or attribute tag
|
||||
for tag_value_i in tag_value:
|
||||
if isinstance(tag_value_i, str):
|
||||
self._string_tags[key].extend(
|
||||
self._validate_key(
|
||||
key=key,
|
||||
validator=self._tags_validator,
|
||||
).list
|
||||
)
|
||||
elif isinstance(tag_value_i, dict):
|
||||
self._attribute_tags[key].extend(
|
||||
self._validate_key(
|
||||
key=key, validator=self._tags_with_attributes_validator
|
||||
).list
|
||||
)
|
||||
else:
|
||||
raise self._validation_exception(
|
||||
"must either be a single or list of string/attribute object"
|
||||
)
|
||||
if isinstance(tag_value[0], str):
|
||||
self._string_tags[key].extend(
|
||||
self._validate_key(
|
||||
key=key,
|
||||
validator=self._tags_validator,
|
||||
).list
|
||||
)
|
||||
elif isinstance(tag_value[0], dict):
|
||||
self._attribute_tags[key].extend(
|
||||
self._validate_key(
|
||||
key=key, validator=self._tags_with_attributes_validator
|
||||
).list
|
||||
)
|
||||
else:
|
||||
raise self._validation_exception(
|
||||
"must either be a single or list of string/attribute object"
|
||||
)
|
||||
|
||||
@property
|
||||
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 □:
|
||||
- value 1 □
|
||||
- value 2 □
|
||||
- value 1 □
|
||||
- value 2 □
|
||||
kodi_safe_multi_title_with_attrs:
|
||||
- attributes:
|
||||
□?: 'value
|
||||
|
|
@ -24,16 +22,6 @@ Rick Beato - Can you hear the difference? 🎸🔥 #shorts.nfo
|
|||
|
||||
newlines □'
|
||||
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_with_attrs:
|
||||
attributes:
|
||||
|
|
@ -49,8 +37,6 @@ test.nfo
|
|||
kodi_safe_multi_title □:
|
||||
- value 1 □
|
||||
- value 2 □
|
||||
- value 1 □
|
||||
- value 2 □
|
||||
kodi_safe_multi_title_with_attrs:
|
||||
- attributes:
|
||||
□?: 'value
|
||||
|
|
@ -62,16 +48,6 @@ test.nfo
|
|||
|
||||
newlines □'
|
||||
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_with_attrs:
|
||||
attributes:
|
||||
|
|
|
|||
Loading…
Reference in a new issue