Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cxfksword committed Feb 2, 2023
1 parent db3cb61 commit a6d84d3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
14 changes: 13 additions & 1 deletion Jellyfin.Plugin.Danmu/Controllers/DanmuController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -123,9 +124,20 @@ public async Task<String> 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";
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,优酷。

支持功能:

Expand All @@ -13,7 +13,7 @@ jellyfin的弹幕自动下载插件,已支持的弹幕来源:b站,弹弹pl
* 定时更新
* 支持api访问弹幕

![preview](doc/logo.png)
![logo](doc/logo.png)

## 安装插件

Expand Down

0 comments on commit a6d84d3

Please sign in to comment.