mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Fixed: (Cardigann) Indexer privacy tweaks, Semi-Public fixes
Fixes #744
This commit is contained in:
@@ -56,6 +56,21 @@ const protocols = [
|
||||
}
|
||||
];
|
||||
|
||||
const privacyLevels = [
|
||||
{
|
||||
key: 'private',
|
||||
value: translate('Private')
|
||||
},
|
||||
{
|
||||
key: 'semiPublic',
|
||||
value: translate('SemiPublic')
|
||||
},
|
||||
{
|
||||
key: 'public',
|
||||
value: translate('Public')
|
||||
}
|
||||
];
|
||||
|
||||
class AddIndexerModalContent extends Component {
|
||||
|
||||
//
|
||||
@@ -99,10 +114,6 @@ class AddIndexerModalContent extends Component {
|
||||
.sort((a, b) => a.localeCompare(b))
|
||||
.map((language) => ({ key: language, value: language }));
|
||||
|
||||
const privacyLevels = Array.from(new Set(indexers.map(({ privacy }) => privacy)))
|
||||
.sort((a, b) => a.localeCompare(b))
|
||||
.map((privacy) => ({ key: privacy, value: privacy }));
|
||||
|
||||
const filteredIndexers = indexers.filter((indexer) => {
|
||||
const { filter, filterProtocols, filterLanguages, filterPrivacyLevels } = this.state;
|
||||
|
||||
|
@@ -3,6 +3,8 @@ import React, { Component } from 'react';
|
||||
import TableRowCell from 'Components/Table/Cells/TableRowCell';
|
||||
import TableRowButton from 'Components/Table/TableRowButton';
|
||||
import ProtocolLabel from 'Indexer/Index/Table/ProtocolLabel';
|
||||
import firstCharToUpper from 'Utilities/String/firstCharToUpper';
|
||||
import translate from 'Utilities/String/translate';
|
||||
import styles from './SelectIndexerRow.css';
|
||||
|
||||
class SelectIndexerRow extends Component {
|
||||
@@ -47,7 +49,7 @@ class SelectIndexerRow extends Component {
|
||||
</TableRowCell>
|
||||
|
||||
<TableRowCell>
|
||||
{privacy}
|
||||
{translate(firstCharToUpper(privacy))}
|
||||
</TableRowCell>
|
||||
</TableRowButton>
|
||||
);
|
||||
|
@@ -128,7 +128,12 @@ namespace NzbDrone.Core.Indexers.Cardigann
|
||||
IndexerUrls = definition.Links.ToArray(),
|
||||
Settings = new CardigannSettings { DefinitionFile = definition.File },
|
||||
Protocol = DownloadProtocol.Torrent,
|
||||
Privacy = definition.Type == "private" ? IndexerPrivacy.Private : IndexerPrivacy.Public,
|
||||
Privacy = definition.Type switch
|
||||
{
|
||||
"private" => IndexerPrivacy.Private,
|
||||
"public" => IndexerPrivacy.Public,
|
||||
_ => IndexerPrivacy.SemiPublic
|
||||
},
|
||||
SupportsRss = SupportsRss,
|
||||
SupportsSearch = SupportsSearch,
|
||||
SupportsRedirect = SupportsRedirect,
|
||||
|
@@ -94,7 +94,12 @@ namespace NzbDrone.Core.Indexers
|
||||
definition.Description = defFile.Description;
|
||||
definition.Language = defFile.Language;
|
||||
definition.Encoding = Encoding.GetEncoding(defFile.Encoding);
|
||||
definition.Privacy = defFile.Type == "private" ? IndexerPrivacy.Private : IndexerPrivacy.Public;
|
||||
definition.Privacy = defFile.Type switch
|
||||
{
|
||||
"private" => IndexerPrivacy.Private,
|
||||
"public" => IndexerPrivacy.Public,
|
||||
_ => IndexerPrivacy.SemiPublic
|
||||
};
|
||||
definition.Capabilities = new IndexerCapabilities();
|
||||
definition.Capabilities.ParseCardigannSearchModes(defFile.Caps.Modes);
|
||||
definition.Capabilities.SupportsRawSearch = defFile.Caps.Allowrawsearch;
|
||||
|
@@ -286,6 +286,7 @@
|
||||
"PriorityHelpText": "Prioritize multiple Download Clients. Round-Robin is used for clients with the same priority.",
|
||||
"PrioritySettings": "Priority",
|
||||
"Privacy": "Privacy",
|
||||
"Private": "Private",
|
||||
"Protocol": "Protocol",
|
||||
"ProwlarrSupportsAnyDownloadClient": "Prowlarr supports any of the download clients listed below.",
|
||||
"ProwlarrSupportsAnyIndexer": "Prowlarr supports many indexers in addition to any indexer that uses the Newznab/Torznab standard using 'Generic Newznab' (for usenet) or 'Generic Torznab' (for torrents). Search & Select your indexer from below.",
|
||||
@@ -298,6 +299,7 @@
|
||||
"ProxyType": "Proxy Type",
|
||||
"ProxyUsernameHelpText": "You only need to enter a username and password if one is required. Leave them blank otherwise.",
|
||||
"PtpOldSettingsCheckMessage": "The following PassThePopcorn indexers have deprecated settings and should be updated: {0}",
|
||||
"Public": "Public",
|
||||
"QualityDefinitions": "Quality Definitions",
|
||||
"QualitySettings": "Quality Settings",
|
||||
"Query": "Query",
|
||||
@@ -340,6 +342,7 @@
|
||||
"Security": "Security",
|
||||
"Seeders": "Seeders",
|
||||
"SelectAll": "Select All",
|
||||
"SemiPublic": "Semi-Public",
|
||||
"SendAnonymousUsageData": "Send Anonymous Usage Data",
|
||||
"SetTags": "Set Tags",
|
||||
"Settings": "Settings",
|
||||
|
Reference in New Issue
Block a user