From 3c8a6258cf2997b289c31eadcdad46bea2cf5614 Mon Sep 17 00:00:00 2001 From: cxfksword <718792+cxfksword@users.noreply.github.com> Date: Fri, 19 Jun 2026 15:11:16 +0800 Subject: [PATCH] fix: fix youku comment parse --- Jellyfin.Plugin.Danmu/Scrapers/Youku/Youku.cs | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Jellyfin.Plugin.Danmu/Scrapers/Youku/Youku.cs b/Jellyfin.Plugin.Danmu/Scrapers/Youku/Youku.cs index 6067a80..7e806a8 100644 --- a/Jellyfin.Plugin.Danmu/Scrapers/Youku/Youku.cs +++ b/Jellyfin.Plugin.Danmu/Scrapers/Youku/Youku.cs @@ -8,6 +8,7 @@ using Jellyfin.Plugin.Danmu.Scrapers.Entity; using System.Collections.Generic; using Jellyfin.Plugin.Danmu.Core.Extensions; using System.Text.Json; +using System.Text.Json.Serialization; using Jellyfin.Plugin.Danmu.Scrapers.Youku.Entity; namespace Jellyfin.Plugin.Danmu.Scrapers.Youku; @@ -241,17 +242,17 @@ public class Youku : AbstractScraper foreach (var comment in comments) { + var danmakuText = new ScraperDanmakuText + { + Progress = (int)comment.Playat, + Mode = 1, + MidHash = $"[youku]{comment.Uid}", + Id = comment.ID, + Content = comment.Content + }; + try { - var danmakuText = new ScraperDanmakuText - { - Progress = (int)comment.Playat, - Mode = 1, - MidHash = $"[youku]{comment.Uid}", - Id = comment.ID, - Content = comment.Content - }; - var property = JsonSerializer.Deserialize(comment.Propertis); if (property != null) { @@ -262,7 +263,8 @@ public class Youku : AbstractScraper } catch (Exception ex) { - log.LogWarning(ex, "Failed to parse comment: {CommentId}", comment.ID); + log.LogDebug(ex, "Failed to parse comment: {CommentId}", comment.ID); + danmaku.Items.Add(danmakuText); } }