[videos] Fix broken install with cinemagoer
Some checks failed
build & deploy / test (push) Failing after 1m39s
build & deploy / deploy (push) Has been skipped

This commit is contained in:
2026-04-28 17:25:29 -04:00
parent 9780e39825
commit 9642aebfc0
2 changed files with 0 additions and 36 deletions

View File

@ -2,8 +2,6 @@ import logging
from enum import Enum
from typing import Optional
from cinemagoerng import web as imdb
logger = logging.getLogger(__name__)
YOUTUBE_VIDEO_URL = "https://www.youtube.com/watch?v="
@ -78,39 +76,6 @@ class VideoMetadata:
self.twitch_id = twitch_id
self.base_run_time_seconds = base_run_time_seconds
def enrich_from_imdb(self):
self.imdb_result: dict = {}
self.imdb_result = imdb.get_title(self.imdb_id)
logger.debug(f"Found result from IMDB: {self.imdb_result.title}")
if not self.imdb_result:
logger.info(
f"[enrich] no video found on imdb",
extra={"name_or_id": name_or_id},
)
return None
self.base_run_time_seconds = self.imdb_result.runtime * 60
self.imdb_id = self.imdb_id
self.title = self.imdb_result.title
self.year = self.imdb_result.year
self.plot = self.imdb_result.plot.get("en-US", "")
self.imdb_rating = self.imdb_result.rating
self.genres = self.imdb_result.genres
self.cover_url = self.imdb_result.primary_image
self.video_type = VideoType.MOVIE.value
if self.imdb_result.type_id == "tvEpisode":
self.video_type = VideoType.TV_EPISODE.value
series = self.imdb_result.series
self.tv_series_imdb_id = series.imdb_id
self.tv_series_title = series.title
self.episode_number = self.imdb_result.episode
self.season_number = self.imdb_result.season
self.next_imdb_id = self.imdb_result.next_episode_id
def as_dict_with_cover_and_genres(self) -> tuple:
video_dict = vars(self)
series_id = ""

View File

@ -20,7 +20,6 @@ from scrobbles.mixins import (
)
from taggit.managers import TaggableManager
from videos.metadata import VideoMetadata
from videos.sources.imdb import lookup_video_from_imdb
from videos.sources.tmdb import lookup_video_from_tmdb
from videos.sources.youtube import lookup_video_from_youtube