chore: dandan is deprecated.

This commit is contained in:
cxfksword
2025-10-02 18:17:21 +08:00
parent 4586fb8fef
commit c63f36bf85
7 changed files with 43 additions and 5 deletions

View File

@@ -46,7 +46,7 @@
</div>
</fieldset>
<fieldset class="verticalSection verticalSection-extrabottompadding">
<fieldset id="dandanSection" class="verticalSection verticalSection-extrabottompadding" style="display: none;">
<legend>
<h3>弹弹play配置</h3>
</legend>
@@ -166,6 +166,7 @@
$('#Scrapers').empty().append(html);
setButtons();
setDandan(config);
Dashboard.hideLoadingMsg();
});
@@ -224,6 +225,18 @@
});
}
function setDandan(config) {
if (config.Scrapers) {
for (var i = 0; i < config.Scrapers.length; i++) {
if (config.Scrapers[i].Name === "弹弹play") {
$('#dandanSection').show();
return;
}
}
}
$('#dandanSection').hide();
}
$(document).ready(function () {
setButtons();
$(document).on('click', '.btnViewItemDown', function (e) {

View File

@@ -27,7 +27,7 @@ public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
: base(applicationPaths, xmlSerializer)
{
Instance = this;
Scrapers = applicationHost.GetExports<AbstractScraper>(false).Where(o => o != null).OrderBy(x => x.DefaultOrder).ToList().AsReadOnly();
Scrapers = applicationHost.GetExports<AbstractScraper>(false).Where(o => o != null && !o.IsDeprecated).OrderBy(x => x.DefaultOrder).ToList().AsReadOnly();
scraperManager.Register(Scrapers);
}

View File

@@ -4,6 +4,7 @@ using System.Net.Http;
using System.Text.Json;
using System.Threading;
using Jellyfin.Extensions.Json;
using Jellyfin.Plugin.Danmu.Configuration;
using Jellyfin.Plugin.Danmu.Core.Extensions;
using Jellyfin.Plugin.Danmu.Core.Http;
using Microsoft.Extensions.Caching.Memory;
@@ -20,6 +21,13 @@ public abstract class AbstractApi : IDisposable
protected CookieContainer _cookieContainer;
protected IMemoryCache _memoryCache;
public PluginConfiguration Config
{
get
{
return Plugin.Instance?.Configuration ?? new Configuration.PluginConfiguration();
}
}
public AbstractApi(ILogger log)
{

View File

@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Jellyfin.Plugin.Danmu.Configuration;
using Jellyfin.Plugin.Danmu.Scrapers.Entity;
using MediaBrowser.Controller.Entities;
using Microsoft.Extensions.Logging;
@@ -27,6 +28,20 @@ public abstract class AbstractScraper
/// </summary>
public abstract string ProviderId { get; }
/// <summary>
/// 是否已废弃
/// </summary>
/// <returns>是否已废弃</returns>
public virtual bool IsDeprecated => false;
public PluginConfiguration Config
{
get
{
return Plugin.Instance?.Configuration ?? new Configuration.PluginConfiguration();
}
}
public AbstractScraper(ILogger log)
{

View File

@@ -33,6 +33,8 @@ public class Dandan : AbstractScraper
public override string ProviderId => ScraperProviderId;
public override bool IsDeprecated => string.IsNullOrEmpty(this._api.ApiID) || string.IsNullOrEmpty(this._api.ApiSecret);
public override async Task<List<ScraperSearchInfo>> Search(BaseItem item)
{
var list = new List<ScraperSearchInfo>();

View File

@@ -33,7 +33,7 @@ public class DandanApi : AbstractApi
}
}
protected string ApiID
public string ApiID
{
get
{
@@ -47,7 +47,7 @@ public class DandanApi : AbstractApi
}
}
protected string ApiSecret
public string ApiSecret
{
get
{

View File

@@ -4,7 +4,7 @@
[![jellyfin](https://img.shields.io/badge/jellyfin-10.9.x|10.10.x-lightgrey?logo=jellyfin)](https://github.com/cxfksword/jellyfin-plugin-danmu/releases)
[![LICENSE](https://img.shields.io/github/license/cxfksword/jellyfin-plugin-danmu)](https://github.com/cxfksword/jellyfin-plugin-danmu/main/LICENSE)
jellyfin弹幕自动下载插件已支持的弹幕来源b站弹弹play优酷爱奇艺腾讯视频芒果TV。
jellyfin弹幕自动下载插件已支持的弹幕来源b站~~弹弹play~~优酷爱奇艺腾讯视频芒果TV。
支持功能: