From 4c52856999fa3873260d9087733bfb01e3772f65 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 23 Feb 2023 08:11:12 +0200 Subject: [PATCH] New: Add DICMusic --- .../Indexers/Definitions/DICMusic.cs | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/NzbDrone.Core/Indexers/Definitions/DICMusic.cs diff --git a/src/NzbDrone.Core/Indexers/Definitions/DICMusic.cs b/src/NzbDrone.Core/Indexers/Definitions/DICMusic.cs new file mode 100644 index 000000000..d42195890 --- /dev/null +++ b/src/NzbDrone.Core/Indexers/Definitions/DICMusic.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; +using NLog; +using NzbDrone.Core.Configuration; +using NzbDrone.Core.Indexers.Definitions.Gazelle; +using NzbDrone.Core.Messaging.Events; + +namespace NzbDrone.Core.Indexers.Definitions; + +public class DICMusic : GazelleBase +{ + public override string Name => "DICMusic"; + public override string[] IndexerUrls => new[] { "https://dicmusic.club/" }; + public override string Description => "DICMusic is a CHINESE Private Torrent Tracker for MUSIC"; + public override string Language => "zh-CN"; + public override IndexerPrivacy Privacy => IndexerPrivacy.Private; + + public DICMusic(IIndexerHttpClient httpClient, + IEventAggregator eventAggregator, + IIndexerStatusService indexerStatusService, + IConfigService configService, + Logger logger) + : base(httpClient, eventAggregator, indexerStatusService, configService, logger) + { + } + + protected override IndexerCapabilities SetCapabilities() + { + var caps = new IndexerCapabilities + { + MusicSearchParams = new List + { + MusicSearchParam.Q, MusicSearchParam.Album, MusicSearchParam.Artist, MusicSearchParam.Label, MusicSearchParam.Year + } + }; + + caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Audio, "Music"); + caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.PC, "Applications"); + + return caps; + } +} + +public class DICMusicSettings : GazelleUserPassOrCookieSettings +{ +}