Meta
This commit is contained in:
parent
d08bac2c41
commit
4e54445170
@ -100,6 +100,7 @@ class EventsPullerThread(threading.Thread):
|
||||
while not self.shutdown.is_set():
|
||||
producedMessage: bool = False
|
||||
|
||||
try:
|
||||
connection = mysql.connector.connect(
|
||||
host=events_server_address,
|
||||
port=events_server_port,
|
||||
@ -107,6 +108,9 @@ class EventsPullerThread(threading.Thread):
|
||||
user=events_server_username,
|
||||
password=events_server_password
|
||||
)
|
||||
except:
|
||||
logging.error(f"Unable to connect to {events_server_address}:{events_server_port}. Either the server or database: {events_server_database_name} is not present yet!")
|
||||
|
||||
try:
|
||||
rows = self.getEventsAvailable(connection=connection)
|
||||
for row in rows:
|
||||
|
||||
@ -48,11 +48,14 @@ class Imdb(SourceBase):
|
||||
async def __getMetadata(self, id: str) -> Optional[Metadata]:
|
||||
try:
|
||||
result = await asyncio.to_thread(Cinemagoer().get_movie, id)
|
||||
cover = result.get_fullsizeURL()
|
||||
if cover is None or len(cover) == 0:
|
||||
cover = result.get("cover url", None)
|
||||
summary = result.get("plot outline", None)
|
||||
return Metadata(
|
||||
title=result.get("title", None),
|
||||
altTitle=[result.get("localized title", [])],
|
||||
cover=result.get("cover url", None),
|
||||
cover=cover,
|
||||
banner=None,
|
||||
summary=[] if summary is None else [
|
||||
Summary(
|
||||
|
||||
@ -73,7 +73,7 @@ class SourceBase(ABC):
|
||||
|
||||
for title in titles:
|
||||
for id, stored_title in filtered_idToTitle.items():
|
||||
ratio = fuzz.ratio(title, stored_title)
|
||||
ratio = fuzz.ratio(title, stored_title[0])
|
||||
if ratio > best_ratio:
|
||||
best_ratio = ratio
|
||||
best_match_id = id
|
||||
|
||||
Loading…
Reference in New Issue
Block a user