mirror of https://github.com/Jackett/Jackett
GPW: add option to use torrent filename as title. resolves #13646
add doubanid to results
This commit is contained in:
parent
f5a39988cc
commit
292986b170
|
@ -3,12 +3,14 @@ using System.Diagnostics.CodeAnalysis;
|
|||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Jackett.Common.Indexers.Abstract;
|
||||
using Jackett.Common.Models;
|
||||
using Jackett.Common.Services.Interfaces;
|
||||
using Jackett.Common.Utils;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NLog;
|
||||
using static Jackett.Common.Models.IndexerConfig.ConfigurationData;
|
||||
using WebClient = Jackett.Common.Utils.Clients.WebClient;
|
||||
|
||||
namespace Jackett.Common.Indexers
|
||||
|
@ -46,6 +48,8 @@ namespace Jackett.Common.Indexers
|
|||
Type = "private";
|
||||
|
||||
AddCategoryMapping(1, TorznabCatType.Movies, "Movies 电影");
|
||||
|
||||
configData.AddDynamic("showFilename", new BoolConfigurationItem("Use the first torrent filename as the title") { Value = false });
|
||||
}
|
||||
|
||||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query)
|
||||
|
@ -101,6 +105,13 @@ namespace Jackett.Common.Indexers
|
|||
title.Append(" " + string.Join(" / ", flags));
|
||||
|
||||
release.Title = title.ToString();
|
||||
|
||||
// option to overwrite the title with the first torrent filename #13646
|
||||
if (((BoolConfigurationItem)configData.GetDynamic("showFilename")).Value)
|
||||
release.Title = WebUtility.HtmlDecode((string)torrent["fileName"]);
|
||||
|
||||
release.DoubanId = ParseUtil.GetLongFromString((string)result["doubanId"]);
|
||||
|
||||
switch ((string)torrent["freeType"])
|
||||
{
|
||||
case "11":
|
||||
|
|
Loading…
Reference in New Issue