mirror of
https://github.com/Viren070/MediaFusion.git
synced 2025-12-01 23:21:11 +01:00
Replaced get_imdb_movie_data with get_imdb_title for better naming consistency and added get_imdb_title_data to streamline IMDb metadata processing. Updated related code to accommodate these changes and ensure proper functionality of IMDb interactions.
This commit is contained in:
@@ -51,7 +51,7 @@ class SportVideoParserPipeline:
|
||||
"created_at": date_obj.strftime("%Y-%m-%d"),
|
||||
"year": date_obj.year,
|
||||
"languages": [re.sub(r"[ .]", "", item["language"])],
|
||||
"is_imdb": False,
|
||||
"is_search_imdb_title": False,
|
||||
"resolution": resolution,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -46,7 +46,7 @@ class BaseParserPipeline:
|
||||
item.update(
|
||||
dict(
|
||||
type="movie",
|
||||
is_imdb=False,
|
||||
is_search_imdb_title=False,
|
||||
genres=[self.event_name.upper()],
|
||||
is_add_title_to_poster=True,
|
||||
)
|
||||
@@ -212,10 +212,10 @@ class UFCParserPipeline(BaseParserPipeline):
|
||||
def __init__(self):
|
||||
super().__init__("ufc")
|
||||
|
||||
def update_imdb_data(self, torrent_data: dict):
|
||||
async def update_imdb_data(self, torrent_data: dict):
|
||||
year = torrent_data.get("date").year
|
||||
title = torrent_data.get("event")
|
||||
tmdb_data = search_tmdb(title, year)
|
||||
tmdb_data = await search_tmdb(title, year)
|
||||
if not tmdb_data:
|
||||
if not torrent_data["poster"]:
|
||||
torrent_data["poster"] = random.choice(
|
||||
|
||||
Reference in New Issue
Block a user