mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
@@ -0,0 +1,14 @@
|
|||||||
|
using FluentMigrator;
|
||||||
|
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||||
|
|
||||||
|
namespace NzbDrone.Core.Datastore.Migration
|
||||||
|
{
|
||||||
|
[Migration(13)]
|
||||||
|
public class desi_gazelle_to_unit3d : NzbDroneMigrationBase
|
||||||
|
{
|
||||||
|
protected override void MainDbUpgrade()
|
||||||
|
{
|
||||||
|
Update.Table("Indexers").Set(new { ConfigContract = "Unit3dSettings", Enable = 0 }).Where(new { Implementation = "DesiTorrents" });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@@ -1,16 +1,18 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NzbDrone.Core.Configuration;
|
using NzbDrone.Core.Configuration;
|
||||||
using NzbDrone.Core.Indexers.Gazelle;
|
using NzbDrone.Core.Indexers.Definitions.UNIT3D;
|
||||||
using NzbDrone.Core.Messaging.Events;
|
using NzbDrone.Core.Messaging.Events;
|
||||||
using NzbDrone.Core.Parser.Model;
|
using NzbDrone.Core.Parser.Model;
|
||||||
|
|
||||||
namespace NzbDrone.Core.Indexers.Definitions
|
namespace NzbDrone.Core.Indexers.Definitions
|
||||||
{
|
{
|
||||||
public class DesiTorrents : Gazelle.Gazelle
|
public class DesiTorrents : Unit3dBase
|
||||||
{
|
{
|
||||||
public override string Name => "DesiTorrents";
|
public override string Name => "DesiTorrents";
|
||||||
public override string[] IndexerUrls => new string[] { "https://desitorrents.tv/" };
|
public override string Language => "en-US";
|
||||||
|
public override string[] IndexerUrls => new[] { "https://desitorrents.tv/" };
|
||||||
public override string Description => "Desitorrents is a Private Torrent Tracker for BOLLYWOOD / TOLLYWOOD / GENERAL";
|
public override string Description => "Desitorrents is a Private Torrent Tracker for BOLLYWOOD / TOLLYWOOD / GENERAL";
|
||||||
public override IndexerPrivacy Privacy => IndexerPrivacy.Private;
|
public override IndexerPrivacy Privacy => IndexerPrivacy.Private;
|
||||||
|
|
||||||
@@ -21,7 +23,7 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
|
|
||||||
public override IParseIndexerResponse GetParser()
|
public override IParseIndexerResponse GetParser()
|
||||||
{
|
{
|
||||||
return new DesiTorrentsParser(Settings, Capabilities);
|
return new DesiTorrentsParser(Settings, Capabilities.Categories);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override IndexerCapabilities SetCapabilities()
|
protected override IndexerCapabilities SetCapabilities()
|
||||||
@@ -47,7 +49,7 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
};
|
};
|
||||||
|
|
||||||
caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Movies, "Movies");
|
caps.Categories.AddCategoryMapping(1, NewznabStandardCategory.Movies, "Movies");
|
||||||
caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TV, "Tv shows");
|
caps.Categories.AddCategoryMapping(2, NewznabStandardCategory.TV, "TV");
|
||||||
caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.Audio, "Music");
|
caps.Categories.AddCategoryMapping(3, NewznabStandardCategory.Audio, "Music");
|
||||||
caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.BooksEBook, "ebooks");
|
caps.Categories.AddCategoryMapping(4, NewznabStandardCategory.BooksEBook, "ebooks");
|
||||||
caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.TVSport, "Sports");
|
caps.Categories.AddCategoryMapping(5, NewznabStandardCategory.TVSport, "Sports");
|
||||||
@@ -57,10 +59,10 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DesiTorrentsParser : Gazelle.GazelleParser
|
public class DesiTorrentsParser : Unit3dParser
|
||||||
{
|
{
|
||||||
public DesiTorrentsParser(GazelleSettings settings, IndexerCapabilities capabilities)
|
public DesiTorrentsParser(Unit3dSettings settings, IndexerCapabilitiesCategories categories)
|
||||||
: base(settings, capabilities)
|
: base(settings, categories)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,7 +26,7 @@ namespace NzbDrone.Core.Indexers.Definitions.UNIT3D
|
|||||||
|
|
||||||
public Action<IDictionary<string, string>, DateTime?> CookiesUpdater { get; set; }
|
public Action<IDictionary<string, string>, DateTime?> CookiesUpdater { get; set; }
|
||||||
|
|
||||||
public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
public virtual IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
||||||
{
|
{
|
||||||
var torrentInfos = new List<TorrentInfo>();
|
var torrentInfos = new List<TorrentInfo>();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user