Updates
This commit is contained in:
parent
bbb643b2c8
commit
68d33dc132
@ -20,7 +20,8 @@ class metadata():
|
||||
summary = result.get("desc", None),
|
||||
type = 'movie' if result.get('airing_format', '').lower() == 'movie' else 'serie',
|
||||
genres = result.get('genres', []),
|
||||
source="anii"
|
||||
source="anii",
|
||||
usedTitle=self.name
|
||||
)
|
||||
if (meta.title is None) or (meta.type is None):
|
||||
return DataResult("IGNORE", None, None)
|
||||
|
||||
@ -22,7 +22,8 @@ class metadata():
|
||||
summary = result.get("plot outline", None),
|
||||
type = 'movie' if result.get('kind', '').lower() == 'movie' else 'serie',
|
||||
genres = result.get('genres', []),
|
||||
source="imdb"
|
||||
source="imdb",
|
||||
usedTitle=self.name
|
||||
)
|
||||
if (meta.title is None) or (meta.type is None):
|
||||
return DataResult("IGNORE", None, None)
|
||||
|
||||
@ -20,7 +20,8 @@ class metadata():
|
||||
summary = anime.synopsis,
|
||||
type = 'movie' if anime.type.lower() == 'movie' else 'serie',
|
||||
genres = anime.genres,
|
||||
source="mal"
|
||||
source="mal",
|
||||
usedTitle=self.name
|
||||
)
|
||||
if (meta.title is None) or (meta.type is None):
|
||||
return DataResult("IGNORE", None, None)
|
||||
|
||||
@ -10,6 +10,7 @@ class Metadata:
|
||||
summary: str
|
||||
genres: List[str]
|
||||
source: str
|
||||
usedTitle: str
|
||||
|
||||
def to_dict(self):
|
||||
return asdict(self)
|
||||
|
||||
@ -28,8 +28,8 @@ class UseSource():
|
||||
mal = MalMetadata(title).lookup()
|
||||
|
||||
result: List[WeightedData] = []
|
||||
# if (anii is not None) and (anii.statusType == "SUCCESS"):
|
||||
# result.append(WeightedData(anii, 4))
|
||||
if (anii is not None) and (anii.statusType == "SUCCESS"):
|
||||
result.append(WeightedData(anii, 4))
|
||||
if (imdb is not None) and (imdb.statusType == "SUCCESS"):
|
||||
result.append(WeightedData(imdb, 1))
|
||||
if (mal is not None) and (mal.statusType == "SUCCESS"):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user