This commit is contained in:
Brage 2023-08-01 23:48:04 +02:00
parent bbb643b2c8
commit 68d33dc132
5 changed files with 9 additions and 5 deletions

View File

@ -20,7 +20,8 @@ class metadata():
summary = result.get("desc", None), summary = result.get("desc", None),
type = 'movie' if result.get('airing_format', '').lower() == 'movie' else 'serie', type = 'movie' if result.get('airing_format', '').lower() == 'movie' else 'serie',
genres = result.get('genres', []), genres = result.get('genres', []),
source="anii" source="anii",
usedTitle=self.name
) )
if (meta.title is None) or (meta.type is None): if (meta.title is None) or (meta.type is None):
return DataResult("IGNORE", None, None) return DataResult("IGNORE", None, None)

View File

@ -22,7 +22,8 @@ class metadata():
summary = result.get("plot outline", None), summary = result.get("plot outline", None),
type = 'movie' if result.get('kind', '').lower() == 'movie' else 'serie', type = 'movie' if result.get('kind', '').lower() == 'movie' else 'serie',
genres = result.get('genres', []), genres = result.get('genres', []),
source="imdb" source="imdb",
usedTitle=self.name
) )
if (meta.title is None) or (meta.type is None): if (meta.title is None) or (meta.type is None):
return DataResult("IGNORE", None, None) return DataResult("IGNORE", None, None)

View File

@ -20,7 +20,8 @@ class metadata():
summary = anime.synopsis, summary = anime.synopsis,
type = 'movie' if anime.type.lower() == 'movie' else 'serie', type = 'movie' if anime.type.lower() == 'movie' else 'serie',
genres = anime.genres, genres = anime.genres,
source="mal" source="mal",
usedTitle=self.name
) )
if (meta.title is None) or (meta.type is None): if (meta.title is None) or (meta.type is None):
return DataResult("IGNORE", None, None) return DataResult("IGNORE", None, None)

View File

@ -10,6 +10,7 @@ class Metadata:
summary: str summary: str
genres: List[str] genres: List[str]
source: str source: str
usedTitle: str
def to_dict(self): def to_dict(self):
return asdict(self) return asdict(self)

View File

@ -28,8 +28,8 @@ class UseSource():
mal = MalMetadata(title).lookup() mal = MalMetadata(title).lookup()
result: List[WeightedData] = [] result: List[WeightedData] = []
# if (anii is not None) and (anii.statusType == "SUCCESS"): if (anii is not None) and (anii.statusType == "SUCCESS"):
# result.append(WeightedData(anii, 4)) result.append(WeightedData(anii, 4))
if (imdb is not None) and (imdb.statusType == "SUCCESS"): if (imdb is not None) and (imdb.statusType == "SUCCESS"):
result.append(WeightedData(imdb, 1)) result.append(WeightedData(imdb, 1))
if (mal is not None) and (mal.statusType == "SUCCESS"): if (mal is not None) and (mal.statusType == "SUCCESS"):