Fix patch again
All checks were successful
Build Prowlarr Container / build (push) Successful in 5m54s
All checks were successful
Build Prowlarr Container / build (push) Successful in 5m54s
This commit is contained in:
@@ -1,23 +1,19 @@
|
||||
From b70dc59db54218124b4b4ef27c6f2b3f363f98c2 Mon Sep 17 00:00:00 2001
|
||||
From 4996a7c70c74f24e5a89c21cd1459bd3cef5ac5c Mon Sep 17 00:00:00 2001
|
||||
From: Romain Lecat <romain@lecat.pro>
|
||||
Date: Mon, 16 Feb 2026 10:49:13 +0100
|
||||
Subject: [PATCH] Fork for AvistaZ family language filter
|
||||
|
||||
---
|
||||
.../Indexers/Definitions/AvistaZ.cs | 26 +-
|
||||
.../Indexers/Definitions/AvistaZ.cs | 20 +-
|
||||
.../Definitions/Avistaz/AvistazBase.cs | 3 +-
|
||||
.../Definitions/Avistaz/AvistazSettings.cs | 359 ++++++++++++++++++
|
||||
.../Definitions/Avistaz/CinemaZSettings.cs | 21 +
|
||||
.../Definitions/Avistaz/PrivateHDSettings.cs | 21 +
|
||||
.../Indexers/Definitions/CinemaZ.cs | 42 +-
|
||||
.../Definitions/Avistaz/AvistazSettings.cs | 352 ++++++++++++++++++
|
||||
.../Indexers/Definitions/CinemaZ.cs | 36 +-
|
||||
.../Indexers/Definitions/ExoticaZ.cs | 2 +-
|
||||
.../Indexers/Definitions/PrivateHD.cs | 42 +-
|
||||
8 files changed, 511 insertions(+), 5 deletions(-)
|
||||
create mode 100644 src/NzbDrone.Core/Indexers/Definitions/Avistaz/CinemaZSettings.cs
|
||||
create mode 100644 src/NzbDrone.Core/Indexers/Definitions/Avistaz/PrivateHDSettings.cs
|
||||
.../Indexers/Definitions/PrivateHD.cs | 36 +-
|
||||
6 files changed, 444 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/NzbDrone.Core/Indexers/Definitions/AvistaZ.cs b/src/NzbDrone.Core/Indexers/Definitions/AvistaZ.cs
|
||||
index cc1be98b5..fccbdde80 100644
|
||||
index cc1be98b5..e16bf1fff 100644
|
||||
--- a/src/NzbDrone.Core/Indexers/Definitions/AvistaZ.cs
|
||||
+++ b/src/NzbDrone.Core/Indexers/Definitions/AvistaZ.cs
|
||||
@@ -1,4 +1,5 @@
|
||||
@@ -31,20 +27,14 @@ index cc1be98b5..fccbdde80 100644
|
||||
namespace NzbDrone.Core.Indexers.Definitions
|
||||
{
|
||||
- public class AvistaZ : AvistazBase
|
||||
+ public class AvistaZ : AvistazBase<AvistaZSettings>
|
||||
+ public class AvistaZ : AvistazBase<AvistazSettings>
|
||||
{
|
||||
public override string Name => "AvistaZ";
|
||||
public override string[] IndexerUrls => new[] { "https://avistaz.to/" };
|
||||
@@ -68,6 +69,29 @@ protected override IndexerCapabilities SetCapabilities()
|
||||
@@ -68,6 +69,23 @@ protected override IndexerCapabilities SetCapabilities()
|
||||
|
||||
public class AvistaZRequestGenerator : AvistazRequestGenerator
|
||||
{
|
||||
+ public new AvistaZSettings Settings
|
||||
+ {
|
||||
+ get => (AvistaZSettings)base.Settings;
|
||||
+ set => base.Settings = value;
|
||||
+ }
|
||||
+
|
||||
+ protected override List<KeyValuePair<string, string>> GetBasicSearchParameters(SearchCriteriaBase searchCriteria, string genre = null)
|
||||
+ {
|
||||
+ var parameters = base.GetBasicSearchParameters(searchCriteria, genre);
|
||||
@@ -80,7 +70,7 @@ index b14bac702..1aabd470f 100644
|
||||
public override bool SupportsRss => true;
|
||||
public override bool SupportsSearch => true;
|
||||
diff --git a/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazSettings.cs b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazSettings.cs
|
||||
index bb431c47b..3a535df21 100644
|
||||
index bb431c47b..47f69dd27 100644
|
||||
--- a/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazSettings.cs
|
||||
+++ b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazSettings.cs
|
||||
@@ -1,3 +1,5 @@
|
||||
@@ -89,25 +79,30 @@ index bb431c47b..3a535df21 100644
|
||||
using FluentValidation;
|
||||
using NzbDrone.Core.Annotations;
|
||||
using NzbDrone.Core.Indexers.Settings;
|
||||
@@ -44,4 +46,361 @@ public override NzbDroneValidationResult Validate()
|
||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public class AvistaZSettings : AvistazSettings
|
||||
+ {
|
||||
+ public AvistaZSettings()
|
||||
+ {
|
||||
@@ -23,6 +25,8 @@ public AvistazSettings()
|
||||
{
|
||||
Token = "";
|
||||
FreeleechOnly = false;
|
||||
+ SearchAudioLanguages = Array.Empty<int>();
|
||||
+ SearchSubtitleLanguages = Array.Empty<int>();
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
public string Token { get; set; }
|
||||
@@ -39,9 +43,357 @@ public AvistazSettings()
|
||||
[FieldDefinition(5, Label = "IndexerSettingsFreeleechOnly", Type = FieldType.Checkbox, HelpText = "IndexerAvistazSettingsFreeleechOnlyHelpText")]
|
||||
public bool FreeleechOnly { get; set; }
|
||||
|
||||
+ [FieldDefinition(6, Label = "Search Audio Languages", Type = FieldType.Select, SelectOptions = typeof(AvistaZAudioLanguage), HelpText = "Filter by audio language. The language settings are AND searches, e.g. selecting English audio with Basque and Catalan subtitles will only return results with all three of these.", Advanced = true)]
|
||||
+ public IEnumerable<int> SearchAudioLanguages { get; set; }
|
||||
+
|
||||
+ [FieldDefinition(7, Label = "Search Subtitle Languages", Type = FieldType.Select, SelectOptions = typeof(AvistaZSubtitleLanguage), HelpText = "Filter by subtitle language. The language settings are AND searches, e.g. selecting English audio with Basque and Catalan subtitles will only return results with all three of these.", Advanced = true)]
|
||||
+ public IEnumerable<int> SearchSubtitleLanguages { get; set; }
|
||||
+ }
|
||||
+
|
||||
public override NzbDroneValidationResult Validate()
|
||||
{
|
||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public enum AvistaZAudioLanguage
|
||||
+ {
|
||||
@@ -451,62 +446,8 @@ index bb431c47b..3a535df21 100644
|
||||
+ Wolof = 181,
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/NzbDrone.Core/Indexers/Definitions/Avistaz/CinemaZSettings.cs b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/CinemaZSettings.cs
|
||||
new file mode 100644
|
||||
index 000000000..fa133a0ed
|
||||
--- /dev/null
|
||||
+++ b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/CinemaZSettings.cs
|
||||
@@ -0,0 +1,21 @@
|
||||
+using System;
|
||||
+using System.Collections.Generic;
|
||||
+using NzbDrone.Core.Annotations;
|
||||
+
|
||||
+namespace NzbDrone.Core.Indexers.Definitions.Avistaz
|
||||
+{
|
||||
+ public class CinemaZSettings : AvistazSettings
|
||||
+ {
|
||||
+ public CinemaZSettings()
|
||||
+ {
|
||||
+ SearchAudioLanguages = Array.Empty<int>();
|
||||
+ SearchSubtitleLanguages = Array.Empty<int>();
|
||||
+ }
|
||||
+
|
||||
+ [FieldDefinition(6, Label = "Search Audio Languages", Type = FieldType.Select, SelectOptions = typeof(AvistaZAudioLanguage), HelpText = "Filter by audio language. The language settings are AND searches, e.g. selecting English audio with Basque and Catalan subtitles will only return results with all three of these.", Advanced = true)]
|
||||
+ public IEnumerable<int> SearchAudioLanguages { get; set; }
|
||||
+
|
||||
+ [FieldDefinition(7, Label = "Search Subtitle Languages", Type = FieldType.Select, SelectOptions = typeof(AvistaZSubtitleLanguage), HelpText = "Filter by subtitle language. The language settings are AND searches, e.g. selecting English audio with Basque and Catalan subtitles will only return results with all three of these.", Advanced = true)]
|
||||
+ public IEnumerable<int> SearchSubtitleLanguages { get; set; }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/NzbDrone.Core/Indexers/Definitions/Avistaz/PrivateHDSettings.cs b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/PrivateHDSettings.cs
|
||||
new file mode 100644
|
||||
index 000000000..31967b586
|
||||
--- /dev/null
|
||||
+++ b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/PrivateHDSettings.cs
|
||||
@@ -0,0 +1,21 @@
|
||||
+using System;
|
||||
+using System.Collections.Generic;
|
||||
+using NzbDrone.Core.Annotations;
|
||||
+
|
||||
+namespace NzbDrone.Core.Indexers.Definitions.Avistaz
|
||||
+{
|
||||
+ public class PrivateHDSettings : AvistazSettings
|
||||
+ {
|
||||
+ public PrivateHDSettings()
|
||||
+ {
|
||||
+ SearchAudioLanguages = Array.Empty<int>();
|
||||
+ SearchSubtitleLanguages = Array.Empty<int>();
|
||||
+ }
|
||||
+
|
||||
+ [FieldDefinition(6, Label = "Search Audio Languages", Type = FieldType.Select, SelectOptions = typeof(AvistaZAudioLanguage), HelpText = "Filter by audio language. The language settings are AND searches, e.g. selecting English audio with Basque and Catalan subtitles will only return results with all three of these.", Advanced = true)]
|
||||
+ public IEnumerable<int> SearchAudioLanguages { get; set; }
|
||||
+
|
||||
+ [FieldDefinition(7, Label = "Search Subtitle Languages", Type = FieldType.Select, SelectOptions = typeof(AvistaZSubtitleLanguage), HelpText = "Filter by subtitle language. The language settings are AND searches, e.g. selecting English audio with Basque and Catalan subtitles will only return results with all three of these.", Advanced = true)]
|
||||
+ public IEnumerable<int> SearchSubtitleLanguages { get; set; }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/NzbDrone.Core/Indexers/Definitions/CinemaZ.cs b/src/NzbDrone.Core/Indexers/Definitions/CinemaZ.cs
|
||||
index 3f0fdd913..cec7e1bfc 100644
|
||||
index 3f0fdd913..0d630d3d8 100644
|
||||
--- a/src/NzbDrone.Core/Indexers/Definitions/CinemaZ.cs
|
||||
+++ b/src/NzbDrone.Core/Indexers/Definitions/CinemaZ.cs
|
||||
@@ -1,12 +1,14 @@
|
||||
@@ -521,7 +462,7 @@ index 3f0fdd913..cec7e1bfc 100644
|
||||
namespace NzbDrone.Core.Indexers.Definitions
|
||||
{
|
||||
- public class CinemaZ : AvistazBase
|
||||
+ public class CinemaZ : AvistazBase<CinemaZSettings>
|
||||
+ public class CinemaZ : AvistazBase<AvistazSettings>
|
||||
{
|
||||
public override string Name => "CinemaZ";
|
||||
public override string[] IndexerUrls => new[] { "https://cinemaz.to/" };
|
||||
@@ -544,19 +485,13 @@ index 3f0fdd913..cec7e1bfc 100644
|
||||
protected override IndexerCapabilities SetCapabilities()
|
||||
{
|
||||
var caps = new IndexerCapabilities
|
||||
@@ -51,4 +65,30 @@ protected override IndexerCapabilities SetCapabilities()
|
||||
@@ -51,4 +65,24 @@ protected override IndexerCapabilities SetCapabilities()
|
||||
return caps;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public class CinemaZRequestGenerator : AvistazRequestGenerator
|
||||
+ {
|
||||
+ public new CinemaZSettings Settings
|
||||
+ {
|
||||
+ get => (CinemaZSettings)base.Settings;
|
||||
+ set => base.Settings = value;
|
||||
+ }
|
||||
+
|
||||
+ protected override List<KeyValuePair<string, string>> GetBasicSearchParameters(SearchCriteriaBase searchCriteria, string genre = null)
|
||||
+ {
|
||||
+ var parameters = base.GetBasicSearchParameters(searchCriteria, genre);
|
||||
@@ -589,7 +524,7 @@ index 954d2442c..41202ab21 100644
|
||||
public override string Name => "ExoticaZ";
|
||||
public override string[] IndexerUrls => new[] { "https://exoticaz.to/" };
|
||||
diff --git a/src/NzbDrone.Core/Indexers/Definitions/PrivateHD.cs b/src/NzbDrone.Core/Indexers/Definitions/PrivateHD.cs
|
||||
index 21fc76ede..096347b38 100644
|
||||
index 21fc76ede..0e8f651f0 100644
|
||||
--- a/src/NzbDrone.Core/Indexers/Definitions/PrivateHD.cs
|
||||
+++ b/src/NzbDrone.Core/Indexers/Definitions/PrivateHD.cs
|
||||
@@ -1,12 +1,14 @@
|
||||
@@ -604,7 +539,7 @@ index 21fc76ede..096347b38 100644
|
||||
namespace NzbDrone.Core.Indexers.Definitions
|
||||
{
|
||||
- public class PrivateHD : AvistazBase
|
||||
+ public class PrivateHD : AvistazBase<PrivateHDSettings>
|
||||
+ public class PrivateHD : AvistazBase<AvistazSettings>
|
||||
{
|
||||
public override string Name => "PrivateHD";
|
||||
public override string[] IndexerUrls => new[] { "https://privatehd.to/" };
|
||||
@@ -627,19 +562,13 @@ index 21fc76ede..096347b38 100644
|
||||
protected override IndexerCapabilities SetCapabilities()
|
||||
{
|
||||
var caps = new IndexerCapabilities
|
||||
@@ -51,4 +65,30 @@ protected override IndexerCapabilities SetCapabilities()
|
||||
@@ -51,4 +65,24 @@ protected override IndexerCapabilities SetCapabilities()
|
||||
return caps;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ public class PrivateHDRequestGenerator : AvistazRequestGenerator
|
||||
+ {
|
||||
+ public new PrivateHDSettings Settings
|
||||
+ {
|
||||
+ get => (PrivateHDSettings)base.Settings;
|
||||
+ set => base.Settings = value;
|
||||
+ }
|
||||
+
|
||||
+ protected override List<KeyValuePair<string, string>> GetBasicSearchParameters(SearchCriteriaBase searchCriteria, string genre = null)
|
||||
+ {
|
||||
+ var parameters = base.GetBasicSearchParameters(searchCriteria, genre);
|
||||
|
||||
Reference in New Issue
Block a user