浏览代码

[videos] Fix imdb lookups with new library

Colin Powell 16 小时之前
父节点
当前提交
050b2b9d77
共有 3 个文件被更改,包括 447 次插入393 次删除
  1. 437 382
      poetry.lock
  2. 6 6
      pyproject.toml
  3. 4 5
      vrobbler/apps/videos/sources/imdb.py

文件差异内容过多而无法显示
+ 437 - 382
poetry.lock


+ 6 - 6
pyproject.toml

@@ -5,7 +5,7 @@ description = ""
 authors = ["Colin Powell <colin@unbl.ink>"]
 
 [tool.poetry.dependencies]
-python = ">=3.9,<3.12"
+python = ">=3.11,<3.14"
 Django = "^4.0.3"
 django-extensions = "^3.1.5"
 python-dateutil = "^2.8.2"
@@ -16,8 +16,8 @@ httpx = "<=0.27.2"
 djangorestframework = "^3.13.1"
 Markdown = "^3.3.6"
 django-filter = "^21.1"
-Pillow = "^9.0.1"
-psycopg2 = "^2.9.3"
+Pillow = "^10.0.0"
+psycopg2 = "2.9.10"
 dj-database-url = "^0.5.0"
 django-mathfilters = "^1.0.0"
 django-allauth = "^0.50.0"
@@ -28,7 +28,7 @@ django-markdownify = "^0.9.1"
 gunicorn = "^20.1.0"
 django-simple-history = "^3.1.1"
 musicbrainzngs = "^0.7.1"
-cinemagoer = "^2022.12.27"
+cinemagoerng = {git = "https://github.com/cinemagoer/cinemagoerng"}
 pysportsdb = "^0.1.0"
 pytz = "^2022.7.1"
 django-redis = "^5.2.0"
@@ -41,11 +41,11 @@ beautifulsoup4 = "^4.11.2"
 django-storages = "^1.13.2"
 stream-sqlite = "^0.0.41"
 ipython = "^8.14.0"
-pendulum = "^2.1.2"
+pendulum = "^3"
 trafilatura = "^1.6.3"
 django-imagekit = "^5.0.0"
 thefuzz = "^0.22.1"
-dataclass-wizard = "0.22.0"
+dataclass-wizard = "^0.35.0"
 webdavclient3 = "^3.14.6"
 boto3 = "^1.35.37"
 urllib3 = "<2"

+ 4 - 5
vrobbler/apps/videos/sources/imdb.py

@@ -1,10 +1,8 @@
 import logging
 
-from imdb import Cinemagoer, helpers
+from cinemagoerng import web as imdb
 from videos.metadata import VideoMetadata, VideoType
 
-imdb_client = Cinemagoer()
-
 logger = logging.getLogger(__name__)
 
 
@@ -27,11 +25,12 @@ def lookup_video_from_imdb(
     video_metadata = VideoMetadata(imdb_id=imdb_id)
     imdb_result: dict = {}
 
-    imdb_result = imdb_client.get_movie(name_or_id)
+    imdb_result = imdb.get_title(name_or_id)
+    logger.debug(f"Found result from IMDB: {imdb_result.title}")
 
     if not imdb_result:
         imdb_result = {}
-        imdb_results: list = imdb_client.search_movie(name_or_id)
+        imdb_results: list = imdb.search_movie(name_or_id)
         if len(imdb_results) > 1:
             for result in imdb_results:
                 if result["kind"] == kind:

部分文件因为文件数量过多而无法显示