diff --git a/Jellyfin.Plugin.Danmu/Controllers/DanmuController.cs b/Jellyfin.Plugin.Danmu/Controllers/DanmuController.cs index c8c486a..fc1c9b0 100644 --- a/Jellyfin.Plugin.Danmu/Controllers/DanmuController.cs +++ b/Jellyfin.Plugin.Danmu/Controllers/DanmuController.cs @@ -17,6 +17,7 @@ using System.Runtime.InteropServices; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Entities.Movies; +using MediaBrowser.Controller.Dto; namespace Jellyfin.Plugin.Danmu.Controllers { @@ -123,9 +124,20 @@ public async Task Refresh(string id) throw new ResourceNotFoundException(); } - if (item is Movie || item is Series || item is Season || item is Episode) + if (item is Movie || item is Season) { _libraryManagerEventsHelper.QueueItem(item, Model.EventType.Add); + _libraryManagerEventsHelper.QueueItem(item, Model.EventType.Update); + } + + if (item is Series) + { + var seasons = ((Series)item).GetSeasons(null, new DtoOptions(false)); + foreach (var season in seasons) + { + _libraryManagerEventsHelper.QueueItem(season, Model.EventType.Add); + _libraryManagerEventsHelper.QueueItem(season, Model.EventType.Update); + } } return "ok"; diff --git a/README.md b/README.md index a640d65..1420b5d 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![Danmu](https://img.shields.io/badge/jellyfin-10.8.x-lightgrey?logo=jellyfin)](https://github.com/cxfksword/jellyfin-plugin-danmu/releases) [![Danmu](https://img.shields.io/github/license/cxfksword/jellyfin-plugin-danmu)](https://github.com/cxfksword/jellyfin-plugin-danmu/main/LICENSE) -jellyfin的弹幕自动下载插件,已支持的弹幕来源:b站,弹弹play,优酷。 +jellyfin弹幕自动下载插件,已支持的弹幕来源:b站,弹弹play,优酷。 支持功能: @@ -13,7 +13,7 @@ jellyfin的弹幕自动下载插件,已支持的弹幕来源:b站,弹弹pl * 定时更新 * 支持api访问弹幕 -![preview](doc/logo.png) +![logo](doc/logo.png) ## 安装插件