From 76a8b02fe5518a7bd793b8f1a452e94985e5b1e9 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Tue, 30 Apr 2024 11:17:03 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=B1=86=E7=93=A3=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E8=AF=8D=E6=9D=A1=E7=B1=BB=E5=9E=8B=E9=94=99=E8=AF=AF=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/context.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/core/context.py b/app/core/context.py index f7fab2d5..32e1c6da 100644 --- a/app/core/context.py +++ b/app/core/context.py @@ -456,10 +456,14 @@ class MediaInfo: self.type = info.get('media_type') elif info.get("subtype"): self.type = MediaType.MOVIE if info.get("subtype") == "movie" else MediaType.TV - elif info.get("type"): - self.type = MediaType.MOVIE if info.get("type") == "movie" else MediaType.TV + elif info.get("target_type"): + self.type = MediaType.MOVIE if info.get("target_type") == "movie" else MediaType.TV elif info.get("type_name"): self.type = MediaType(info.get("type_name")) + elif info.get("uri"): + self.type = MediaType.MOVIE if "/movie/" in info.get("uri") else MediaType.TV + elif info.get("type") and info.get("type") in ["movie", "tv"]: + self.type = MediaType.MOVIE if info.get("type") == "movie" else MediaType.TV # 标题 if not self.title: self.title = info.get("title")