mirror of
https://github.com/Sonarr/Sonarr.git
synced 2026-03-06 13:30:00 -05:00
Compare commits
12 Commits
release-gr
...
auth-succe
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98c737a146 | ||
|
|
f0798550af | ||
|
|
d9c7838329 | ||
|
|
b00229e53c | ||
|
|
880628fb68 | ||
|
|
b09c6f0811 | ||
|
|
b376b63c9e | ||
|
|
99feaa34d2 | ||
|
|
d7f82a72c2 | ||
|
|
bd20ebfad7 | ||
|
|
71553ad67b | ||
|
|
41c39f1f28 |
@@ -7,6 +7,7 @@
|
||||
### Version V1.0.2 2024-01-03 - markus101 - Get user input from /dev/tty
|
||||
### Version V1.0.3 2024-01-06 - StevieTV - exit script when it is ran from install directory
|
||||
### Version V1.0.4 2025-04-05 - kaecyra - Allow user/group to be supplied via CLI, add unattended mode
|
||||
### Version V1.0.5 2025-07-08 - bparkin1283 - use systemctl instead of service for stopping app
|
||||
|
||||
### Boilerplate Warning
|
||||
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
@@ -167,11 +168,10 @@ if ! getent group "$app_guid" | grep -qw "$app_uid"; then
|
||||
echo "Added User [$app_uid] to Group [$app_guid]"
|
||||
fi
|
||||
|
||||
# Stop the App if running
|
||||
if service --status-all | grep -Fq "$app"; then
|
||||
systemctl stop "$app"
|
||||
systemctl disable "$app".service
|
||||
echo "Stopped existing $app"
|
||||
# Stop and disable the App if running
|
||||
if [ $(systemctl is-active "$app") = "active" ]; then
|
||||
systemctl disable --now -q "$app"
|
||||
echo "Stopped and disabled existing $app"
|
||||
fi
|
||||
|
||||
# Create Appdata Directory
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import classNames from 'classnames';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import React, { SyntheticEvent, useCallback, useState } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { useSelect } from 'App/SelectContext';
|
||||
import { REFRESH_SERIES, SERIES_SEARCH } from 'Commands/commandNames';
|
||||
import Label from 'Components/Label';
|
||||
import IconButton from 'Components/Link/IconButton';
|
||||
@@ -122,8 +123,31 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) {
|
||||
setIsDeleteSeriesModalOpen(false);
|
||||
}, [setIsDeleteSeriesModalOpen]);
|
||||
|
||||
const [selectState, selectDispatch] = useSelect();
|
||||
|
||||
const onSelectPress = useCallback(
|
||||
(event: SyntheticEvent<HTMLElement, MouseEvent>) => {
|
||||
if (event.nativeEvent.ctrlKey || event.nativeEvent.metaKey) {
|
||||
window.open(`/series/${titleSlug}`, '_blank');
|
||||
return;
|
||||
}
|
||||
|
||||
const shiftKey = event.nativeEvent.shiftKey;
|
||||
|
||||
selectDispatch({
|
||||
type: 'toggleSelected',
|
||||
id: seriesId,
|
||||
isSelected: !selectState.selectedState[seriesId],
|
||||
shiftKey,
|
||||
});
|
||||
},
|
||||
[seriesId, selectState.selectedState, selectDispatch, titleSlug]
|
||||
);
|
||||
|
||||
const link = `/series/${titleSlug}`;
|
||||
|
||||
const linkProps = isSelectMode ? { onPress: onSelectPress } : { to: link };
|
||||
|
||||
const elementStyle = {
|
||||
width: `${posterWidth}px`,
|
||||
height: `${posterHeight}px`,
|
||||
@@ -175,7 +199,7 @@ function SeriesIndexPoster(props: SeriesIndexPosterProps) {
|
||||
/>
|
||||
) : null}
|
||||
|
||||
<Link className={styles.link} style={elementStyle} to={link}>
|
||||
<Link className={styles.link} style={elementStyle} {...linkProps}>
|
||||
<SeriesPoster
|
||||
style={elementStyle}
|
||||
images={images}
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentAssertions;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NUnit.Framework;
|
||||
using NzbDrone.Common.Serializer;
|
||||
using NzbDrone.Core.Datastore.Migration;
|
||||
using NzbDrone.Core.Test.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Test.Datastore.Migration
|
||||
{
|
||||
[TestFixture]
|
||||
public class nzb_su_url_to_nzb_lifeFixture : MigrationTest<nzb_su_url_to_nzb_life>
|
||||
{
|
||||
[TestCase("Newznab", "https://api.nzb.su")]
|
||||
[TestCase("Newznab", "http://api.nzb.su")]
|
||||
public void should_replace_old_url(string impl, string baseUrl)
|
||||
{
|
||||
var db = WithMigrationTestDb(c =>
|
||||
{
|
||||
c.Insert.IntoTable("Indexers").Row(new
|
||||
{
|
||||
Name = "Nzb.su",
|
||||
Implementation = impl,
|
||||
Settings = new NewznabSettings219
|
||||
{
|
||||
BaseUrl = baseUrl,
|
||||
ApiPath = "/api"
|
||||
}.ToJson(),
|
||||
ConfigContract = impl + "Settings",
|
||||
EnableInteractiveSearch = false
|
||||
});
|
||||
});
|
||||
|
||||
var items = db.Query<IndexerDefinition219>("SELECT * FROM \"Indexers\"");
|
||||
|
||||
items.Should().HaveCount(1);
|
||||
items.First().Settings.ToObject<NewznabSettings219>().BaseUrl.Should().Be(baseUrl.Replace("su", "life"));
|
||||
}
|
||||
|
||||
[TestCase("Newznab", "https://api.indexer.com")]
|
||||
public void should_not_replace_different_url(string impl, string baseUrl)
|
||||
{
|
||||
var db = WithMigrationTestDb(c =>
|
||||
{
|
||||
c.Insert.IntoTable("Indexers").Row(new
|
||||
{
|
||||
Name = "Indexer.com",
|
||||
Implementation = impl,
|
||||
Settings = new NewznabSettings219
|
||||
{
|
||||
BaseUrl = baseUrl,
|
||||
ApiPath = "/api"
|
||||
}.ToJson(),
|
||||
ConfigContract = impl + "Settings",
|
||||
EnableInteractiveSearch = false
|
||||
});
|
||||
});
|
||||
|
||||
var items = db.Query<IndexerDefinition219>("SELECT * FROM \"Indexers\"");
|
||||
|
||||
items.Should().HaveCount(1);
|
||||
items.First().Settings.ToObject<NewznabSettings219>().BaseUrl.Should().Be(baseUrl);
|
||||
}
|
||||
}
|
||||
|
||||
internal class IndexerDefinition219
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public JObject Settings { get; set; }
|
||||
public int Priority { get; set; }
|
||||
public string Implementation { get; set; }
|
||||
public string ConfigContract { get; set; }
|
||||
public bool EnableRss { get; set; }
|
||||
public bool EnableAutomaticSearch { get; set; }
|
||||
public bool EnableInteractiveSearch { get; set; }
|
||||
public HashSet<int> Tags { get; set; }
|
||||
public int DownloadClientId { get; set; }
|
||||
public int SeasonSearchMaximumSingleEpisodeAge { get; set; }
|
||||
}
|
||||
|
||||
internal class NewznabSettings219
|
||||
{
|
||||
public string BaseUrl { get; set; }
|
||||
public string ApiPath { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -59,6 +59,7 @@ namespace NzbDrone.Core.Test.IndexerTests
|
||||
public void should_return_season_time_for_season_packs()
|
||||
{
|
||||
var settings = new TorznabSettings();
|
||||
settings.SeedCriteria.SeasonPackSeedGoal = (int)SeasonPackSeedGoal.UseSeasonPackSeedGoal;
|
||||
settings.SeedCriteria.SeasonPackSeedTime = 10;
|
||||
|
||||
Mocker.GetMock<ICachedIndexerSettingsProvider>()
|
||||
@@ -85,5 +86,71 @@ namespace NzbDrone.Core.Test.IndexerTests
|
||||
result.Should().NotBeNull();
|
||||
result.SeedTime.Should().Be(TimeSpan.FromMinutes(10));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_season_ratio_for_season_packs_when_set()
|
||||
{
|
||||
var settings = new TorznabSettings();
|
||||
settings.SeedCriteria.SeasonPackSeedGoal = (int)SeasonPackSeedGoal.UseSeasonPackSeedGoal;
|
||||
settings.SeedCriteria.SeedRatio = 1.0;
|
||||
settings.SeedCriteria.SeasonPackSeedRatio = 10.0;
|
||||
|
||||
Mocker.GetMock<ICachedIndexerSettingsProvider>()
|
||||
.Setup(v => v.GetSettings(It.IsAny<int>()))
|
||||
.Returns(new CachedIndexerSettings
|
||||
{
|
||||
FailDownloads = new HashSet<FailDownloads> { FailDownloads.Executables },
|
||||
SeedCriteriaSettings = settings.SeedCriteria
|
||||
});
|
||||
|
||||
var result = Subject.GetSeedConfiguration(new RemoteEpisode
|
||||
{
|
||||
Release = new ReleaseInfo
|
||||
{
|
||||
DownloadProtocol = DownloadProtocol.Torrent,
|
||||
IndexerId = 1
|
||||
},
|
||||
ParsedEpisodeInfo = new ParsedEpisodeInfo
|
||||
{
|
||||
FullSeason = true
|
||||
}
|
||||
});
|
||||
|
||||
result.Should().NotBeNull();
|
||||
result.Ratio.Should().Be(10.0);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_standard_ratio_for_season_packs_when_not_set()
|
||||
{
|
||||
var settings = new TorznabSettings();
|
||||
settings.SeedCriteria.SeasonPackSeedGoal = (int)SeasonPackSeedGoal.UseStandardSeedGoal;
|
||||
settings.SeedCriteria.SeedRatio = 1.0;
|
||||
settings.SeedCriteria.SeasonPackSeedRatio = 10.0;
|
||||
|
||||
Mocker.GetMock<ICachedIndexerSettingsProvider>()
|
||||
.Setup(v => v.GetSettings(It.IsAny<int>()))
|
||||
.Returns(new CachedIndexerSettings
|
||||
{
|
||||
FailDownloads = new HashSet<FailDownloads> { FailDownloads.Executables },
|
||||
SeedCriteriaSettings = settings.SeedCriteria
|
||||
});
|
||||
|
||||
var result = Subject.GetSeedConfiguration(new RemoteEpisode
|
||||
{
|
||||
Release = new ReleaseInfo
|
||||
{
|
||||
DownloadProtocol = DownloadProtocol.Torrent,
|
||||
IndexerId = 1
|
||||
},
|
||||
ParsedEpisodeInfo = new ParsedEpisodeInfo
|
||||
{
|
||||
FullSeason = true
|
||||
}
|
||||
});
|
||||
|
||||
result.Should().NotBeNull();
|
||||
result.Ratio.Should().Be(1.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ namespace NzbDrone.Core.Test.ParserTests
|
||||
}
|
||||
|
||||
[TestCase("Title.the.Series.2009.S01E14.Japanese.HDTV.XviD-LOL")]
|
||||
[TestCase("[Erai-raws] To Be Series - 14 (JA) [1080p CR WEB-DL AVC AAC][MultiSub]")]
|
||||
public void should_parse_language_japanese(string postTitle)
|
||||
{
|
||||
var result = LanguageParser.ParseLanguages(postTitle);
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(219)]
|
||||
public class nzb_su_url_to_nzb_life : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Execute.Sql("UPDATE \"Indexers\" SET \"Settings\" = replace(\"Settings\", '//api.nzb.su', '//api.nzb.life')" +
|
||||
"WHERE \"Implementation\" = 'Newznab'" +
|
||||
"AND \"Settings\" LIKE '%//api.nzb.su%'");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using Dapper;
|
||||
using FluentMigrator;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NzbDrone.Common.Serializer;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(229)]
|
||||
public class enable_season_pack_seeding_goal : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Execute.WithConnection(SetSeasonPackSeedingGoal);
|
||||
}
|
||||
|
||||
private void SetSeasonPackSeedingGoal(IDbConnection conn, IDbTransaction tran)
|
||||
{
|
||||
var updatedIndexers = new List<object>();
|
||||
|
||||
using var selectCommand = conn.CreateCommand();
|
||||
|
||||
selectCommand.Transaction = tran;
|
||||
selectCommand.CommandText = "SELECT * FROM \"Indexers\"";
|
||||
|
||||
using var reader = selectCommand.ExecuteReader();
|
||||
|
||||
while (reader.Read())
|
||||
{
|
||||
var idIndex = reader.GetOrdinal("Id");
|
||||
var settingsIndex = reader.GetOrdinal("Settings");
|
||||
|
||||
var id = reader.GetInt32(idIndex);
|
||||
var settings = Json.Deserialize<Dictionary<string, object>>(reader.GetString(settingsIndex));
|
||||
|
||||
if (settings.TryGetValue("seedCriteria", out var seedCriteriaToken) && seedCriteriaToken is JObject seedCriteria)
|
||||
{
|
||||
if (seedCriteria?["seasonPackSeedTime"] != null)
|
||||
{
|
||||
seedCriteria["seasonPackSeedGoal"] = 1;
|
||||
|
||||
if (seedCriteria["seedRatio"] != null)
|
||||
{
|
||||
seedCriteria["seasonPackSeedRatio"] = seedCriteria["seedRatio"];
|
||||
}
|
||||
|
||||
updatedIndexers.Add(new
|
||||
{
|
||||
Settings = settings.ToJson(),
|
||||
Id = id,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (updatedIndexers.Any())
|
||||
{
|
||||
var updateSql = "UPDATE \"Indexers\" SET \"Settings\" = @Settings WHERE \"Id\" = @Id";
|
||||
conn.Execute(updateSql, updatedIndexers, transaction: tran);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace NzbDrone.Core.Download.Clients.Tribler
|
||||
{
|
||||
public enum DownloadStatus
|
||||
{
|
||||
[EnumMember(Value = @"WAITING4HASHCHECK")]
|
||||
Waiting4HashCheck = 0,
|
||||
|
||||
[EnumMember(Value = @"HASHCHECKING")]
|
||||
Hashchecking = 1,
|
||||
|
||||
[EnumMember(Value = @"METADATA")]
|
||||
Metadata = 2,
|
||||
|
||||
[EnumMember(Value = @"DOWNLOADING")]
|
||||
Downloading = 3,
|
||||
|
||||
[EnumMember(Value = @"SEEDING")]
|
||||
Seeding = 4,
|
||||
|
||||
[EnumMember(Value = @"STOPPED")]
|
||||
Stopped = 5,
|
||||
|
||||
[EnumMember(Value = @"ALLOCATING_DISKSPACE")]
|
||||
AllocatingDiskspace = 6,
|
||||
|
||||
[EnumMember(Value = @"EXIT_NODES")]
|
||||
Exitnodes = 7,
|
||||
|
||||
[EnumMember(Value = @"CIRCUITS")]
|
||||
Circuits = 8,
|
||||
|
||||
[EnumMember(Value = @"STOPPED_ON_ERROR")]
|
||||
StoppedOnError = 9,
|
||||
|
||||
[EnumMember(Value = @"LOADING")]
|
||||
Loading = 10,
|
||||
}
|
||||
|
||||
public class Trackers
|
||||
{
|
||||
public string Url { get; set; }
|
||||
[JsonProperty("peers")]
|
||||
public object Peers { get; set; }
|
||||
[JsonProperty("status")]
|
||||
public string Status { get; set; }
|
||||
}
|
||||
|
||||
public class Download
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public float? Progress { get; set; }
|
||||
public string Infohash { get; set; }
|
||||
public bool? AnonDownload { get; set; }
|
||||
public float? Availability { get; set; }
|
||||
public double? Eta { get; set; }
|
||||
public long? TotalPieces { get; set; }
|
||||
public long? NumSeeds { get; set; }
|
||||
public long? AllTimeUpload { get; set; }
|
||||
public long? AllTimeDownload { get; set; }
|
||||
|
||||
[JsonProperty("status")]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public DownloadStatus? Status { get; set; }
|
||||
|
||||
public int? StatusCode { get; set; }
|
||||
public float? AllTimeRatio { get; set; }
|
||||
public long? TimeAdded { get; set; }
|
||||
public long? MaxUploadSpeed { get; set; }
|
||||
public long? MaxDownloadSpeed { get; set; }
|
||||
public long? Hops { get; set; }
|
||||
public bool? SafeSeeding { get; set; }
|
||||
public string Error { get; set; }
|
||||
public long? TotalDown { get; set; }
|
||||
public long? Size { get; set; }
|
||||
public string Destination { get; set; }
|
||||
public float? SpeedDown { get; set; }
|
||||
public float? SpeedUp { get; set; }
|
||||
public long? NumPeers { get; set; }
|
||||
public List<Trackers> Trackers { get; set; }
|
||||
}
|
||||
|
||||
public class DownloadsResponse
|
||||
{
|
||||
public List<Download> Downloads { get; set; }
|
||||
}
|
||||
|
||||
public class AddDownloadRequest
|
||||
{
|
||||
[JsonProperty("anon_hops")]
|
||||
public long? AnonymityHops { get; set; }
|
||||
|
||||
[JsonProperty("safe_seeding")]
|
||||
public bool? SafeSeeding { get; set; }
|
||||
public string Destination { get; set; }
|
||||
|
||||
[JsonProperty("uri", Required = Newtonsoft.Json.Required.Always)]
|
||||
[Required(AllowEmptyStrings = true)]
|
||||
public string Uri { get; set; }
|
||||
}
|
||||
|
||||
public class AddDownloadResponse
|
||||
{
|
||||
public string Infohash { get; set; }
|
||||
public bool? Started { get; set; }
|
||||
}
|
||||
|
||||
public class RemoveDownloadRequest
|
||||
{
|
||||
[JsonProperty("remove_data")]
|
||||
public bool? RemoveData { get; set; }
|
||||
}
|
||||
|
||||
public class DeleteDownloadResponse
|
||||
{
|
||||
public bool? Removed { get; set; }
|
||||
public string Infohash { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateDownloadRequest
|
||||
{
|
||||
[JsonProperty("anon_hops")]
|
||||
public long? AnonHops { get; set; }
|
||||
|
||||
[JsonProperty("selected_files")]
|
||||
public List<int> Selected_files { get; set; }
|
||||
|
||||
public string State { get; set; }
|
||||
}
|
||||
|
||||
public class UpdateDownloadResponse
|
||||
{
|
||||
public bool? Modified { get; set; }
|
||||
public string Infohash { get; set; }
|
||||
}
|
||||
|
||||
public class File
|
||||
{
|
||||
public long? Size { get; set; }
|
||||
public long? Index { get; set; }
|
||||
public string Name { get; set; }
|
||||
public float? Progress { get; set; }
|
||||
public bool? Included { get; set; }
|
||||
}
|
||||
|
||||
public class GetFilesResponse
|
||||
{
|
||||
public List<File> Files { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace NzbDrone.Core.Indexers.Tribler
|
||||
{
|
||||
public class TriblerSettingsResponse
|
||||
{
|
||||
public Settings Settings { get; set; }
|
||||
}
|
||||
|
||||
public class Settings
|
||||
{
|
||||
public Api Api { get; set; }
|
||||
public bool Statistics { get; set; }
|
||||
|
||||
[JsonProperty("content_discovery_community")]
|
||||
public ContentDiscoveryCommunity ContentDiscoveryCommunity { get; set; }
|
||||
public Database Database { get; set; }
|
||||
|
||||
[JsonProperty("dht_discovery")]
|
||||
public DHTDiscovery DHTDiscovery { get; set; }
|
||||
|
||||
[JsonProperty("knowledge_community")]
|
||||
public KnowledgeCommunity KnowledgeCommunity { get; set; }
|
||||
public LibTorrent LibTorrent { get; set; }
|
||||
public Recommender Recommender { get; set; }
|
||||
public Rendezvous RecoRendezvousmmender { get; set; }
|
||||
|
||||
[JsonProperty("torrent_checker")]
|
||||
public TorrentChecker TorrentChecker { get; set; }
|
||||
|
||||
[JsonProperty("tunnel_community")]
|
||||
public TunnelCommunity TunnelCommunity { get; set; }
|
||||
|
||||
public Versioning Versioning { get; set; }
|
||||
|
||||
[JsonProperty("watch_folder")]
|
||||
public WatchFolder WatchFolder { get; set; }
|
||||
|
||||
[JsonProperty("state_dir")]
|
||||
public string StateDir { get; set; }
|
||||
|
||||
[JsonProperty("memory_db")]
|
||||
public bool? MemoryDB { get; set; }
|
||||
}
|
||||
|
||||
public class Api
|
||||
{
|
||||
[JsonProperty("http_enabled")]
|
||||
public bool HttpEnabled { get; set; }
|
||||
|
||||
[JsonProperty("http_port")]
|
||||
public int HttpPort { get; set; }
|
||||
|
||||
[JsonProperty("http_host")]
|
||||
public string HttpHost { get; set; }
|
||||
|
||||
[JsonProperty("https_enabled")]
|
||||
public bool HttpsEnabled { get; set; }
|
||||
|
||||
[JsonProperty("https_port")]
|
||||
public int HttpsPort { get; set; }
|
||||
|
||||
[JsonProperty("https_host")]
|
||||
public string HttpsHost { get; set; }
|
||||
|
||||
[JsonProperty("https_certfile")]
|
||||
public string HttpsCertFile { get; set; }
|
||||
|
||||
[JsonProperty("http_port_running")]
|
||||
public int HttpPortRunning { get; set; }
|
||||
|
||||
[JsonProperty("https_port_running")]
|
||||
public int HttpsPortRunning { get; set; }
|
||||
}
|
||||
|
||||
public class ContentDiscoveryCommunity
|
||||
{
|
||||
public bool? Enabled { get; set; }
|
||||
}
|
||||
|
||||
public class Database
|
||||
{
|
||||
public bool? Enabled { get; set; }
|
||||
}
|
||||
|
||||
public class DHTDiscovery
|
||||
{
|
||||
public bool? Enabled { get; set; }
|
||||
}
|
||||
|
||||
public class KnowledgeCommunity
|
||||
{
|
||||
public bool? Enabled { get; set; }
|
||||
}
|
||||
|
||||
public class LibTorrent
|
||||
{
|
||||
[JsonProperty("download_defaults")]
|
||||
public LibTorrentDownloadDefaults DownloadDefaults { get; set; }
|
||||
|
||||
// contains a lot more data, but it's not needed currently
|
||||
}
|
||||
|
||||
public class Recommender
|
||||
{
|
||||
public bool? Enabled { get; set; }
|
||||
}
|
||||
|
||||
public class Rendezvous
|
||||
{
|
||||
public bool? Enabled { get; set; }
|
||||
}
|
||||
|
||||
public class TorrentChecker
|
||||
{
|
||||
[JsonProperty("enabled")]
|
||||
public bool? Enabled { get; set; }
|
||||
}
|
||||
|
||||
public class TunnelCommunity
|
||||
{
|
||||
[JsonProperty("enabled")]
|
||||
public bool? Enabled { get; set; }
|
||||
|
||||
[JsonProperty("min_circuits")]
|
||||
public int? MinCircuits { get; set; }
|
||||
|
||||
[JsonProperty("max_circuits")]
|
||||
public int? MaxCircuits { get; set; }
|
||||
}
|
||||
|
||||
public class Versioning
|
||||
{
|
||||
[JsonProperty("enabled")]
|
||||
public bool? Enabled { get; set; }
|
||||
}
|
||||
|
||||
public class WatchFolder
|
||||
{
|
||||
[JsonProperty("enabled")]
|
||||
public bool? Enabled { get; set; }
|
||||
[JsonProperty("directory")]
|
||||
public string Directory { get; set; }
|
||||
[JsonProperty("check_interval")]
|
||||
public int? CheckInterval { get; set; }
|
||||
}
|
||||
|
||||
public class LibTorrentDownloadDefaults
|
||||
{
|
||||
[JsonProperty("anonymity_enabled")]
|
||||
public bool? AnonymityEnabled { get; set; }
|
||||
|
||||
[JsonProperty("number_hops")]
|
||||
public int? NumberHops { get; set; }
|
||||
|
||||
[JsonProperty("safeseeding_enabled")]
|
||||
public bool? SafeSeedingEnabled { get; set; }
|
||||
|
||||
[JsonProperty("saveas")]
|
||||
public string SaveAS { get; set; }
|
||||
|
||||
[JsonProperty("seeding_mode")]
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public DownloadDefaultsSeedingMode? SeedingMode { get; set; }
|
||||
|
||||
[JsonProperty("seeding_ratio")]
|
||||
public double? SeedingRatio { get; set; }
|
||||
|
||||
[JsonProperty("seeding_time")]
|
||||
public double? SeedingTime { get; set; }
|
||||
}
|
||||
|
||||
public enum DownloadDefaultsSeedingMode
|
||||
{
|
||||
[EnumMember(Value = @"ratio")]
|
||||
Ratio = 0,
|
||||
|
||||
[EnumMember(Value = @"forever")]
|
||||
Forever = 1,
|
||||
|
||||
[EnumMember(Value = @"time")]
|
||||
Time = 2,
|
||||
|
||||
[EnumMember(Value = @"never")]
|
||||
Never = 3,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,298 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using FluentValidation.Results;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Disk;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Common.Http;
|
||||
|
||||
using NzbDrone.Core.Blocklisting;
|
||||
using NzbDrone.Core.Configuration;
|
||||
using NzbDrone.Core.Indexers.Tribler;
|
||||
using NzbDrone.Core.Localization;
|
||||
using NzbDrone.Core.MediaFiles.TorrentInfo;
|
||||
using NzbDrone.Core.Parser.Model;
|
||||
using NzbDrone.Core.RemotePathMappings;
|
||||
using NzbDrone.Core.ThingiProvider;
|
||||
using NzbDrone.Core.Validation;
|
||||
|
||||
namespace NzbDrone.Core.Download.Clients.Tribler
|
||||
{
|
||||
public class TriblerDownloadClient : TorrentClientBase<TriblerDownloadSettings>
|
||||
{
|
||||
private readonly ITriblerDownloadClientProxy _proxy;
|
||||
|
||||
public TriblerDownloadClient(
|
||||
ITriblerDownloadClientProxy triblerDownloadClientProxy,
|
||||
ITorrentFileInfoReader torrentFileInfoReader,
|
||||
IHttpClient httpClient,
|
||||
IConfigService configService,
|
||||
IDiskProvider diskProvider,
|
||||
IRemotePathMappingService remotePathMappingService,
|
||||
ILocalizationService localizationService,
|
||||
IBlocklistService blocklistService,
|
||||
Logger logger)
|
||||
: base(torrentFileInfoReader, httpClient, configService, diskProvider, remotePathMappingService, localizationService, blocklistService, logger)
|
||||
{
|
||||
_proxy = triblerDownloadClientProxy;
|
||||
}
|
||||
|
||||
public override string Name => "Tribler";
|
||||
|
||||
public override ProviderMessage Message => new ProviderMessage(_localizationService.GetLocalizedString("DownloadClientTriblerProviderMessage", new Dictionary<string, object> { { "clientName", Name }, { "clientVersionRange", "8.0.7" } }), ProviderMessageType.Warning);
|
||||
|
||||
public override bool PreferTorrentFile => false;
|
||||
|
||||
public override IEnumerable<DownloadClientItem> GetItems()
|
||||
{
|
||||
var configAsync = _proxy.GetConfig(Settings);
|
||||
|
||||
var items = new List<DownloadClientItem>();
|
||||
|
||||
var downloads = _proxy.GetDownloads(Settings);
|
||||
|
||||
foreach (var download in downloads)
|
||||
{
|
||||
// If totalsize == 0 the torrent is a magnet downloading metadata
|
||||
if (download.Size == null || download.Size == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var item = new DownloadClientItem
|
||||
{
|
||||
DownloadId = download.Infohash,
|
||||
Title = download.Name,
|
||||
|
||||
DownloadClientInfo = DownloadClientItemClientInfo.FromDownloadClient(this, false)
|
||||
};
|
||||
|
||||
// some concurrency could make this faster.
|
||||
var files = _proxy.GetDownloadFiles(Settings, download);
|
||||
|
||||
item.OutputPath = new OsPath(download.Destination);
|
||||
|
||||
if (files.Count == 1)
|
||||
{
|
||||
item.OutputPath += files.First().Name;
|
||||
}
|
||||
else
|
||||
{
|
||||
item.OutputPath += item.Title;
|
||||
}
|
||||
|
||||
item.TotalSize = (long)download.Size;
|
||||
item.RemainingSize = (long)(download.Size * (1 - download.Progress));
|
||||
item.SeedRatio = download.AllTimeRatio;
|
||||
|
||||
if (download.Eta.HasValue)
|
||||
{
|
||||
if (download.Eta.Value >= TimeSpan.FromDays(365).TotalSeconds)
|
||||
{
|
||||
item.RemainingTime = TimeSpan.FromDays(365);
|
||||
}
|
||||
else if (download.Eta.Value < 0)
|
||||
{
|
||||
item.RemainingTime = TimeSpan.FromSeconds(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.RemainingTime = TimeSpan.FromSeconds(download.Eta.Value);
|
||||
}
|
||||
}
|
||||
|
||||
item.Message = download.Error;
|
||||
|
||||
// tribler always saves files unencrypted to disk.
|
||||
item.IsEncrypted = false;
|
||||
|
||||
switch (download.Status)
|
||||
{
|
||||
case DownloadStatus.Hashchecking:
|
||||
case DownloadStatus.Waiting4HashCheck:
|
||||
case DownloadStatus.Circuits:
|
||||
case DownloadStatus.Exitnodes:
|
||||
case DownloadStatus.Downloading:
|
||||
item.Status = DownloadItemStatus.Downloading;
|
||||
break;
|
||||
case DownloadStatus.Metadata:
|
||||
case DownloadStatus.AllocatingDiskspace:
|
||||
item.Status = DownloadItemStatus.Queued;
|
||||
break;
|
||||
case DownloadStatus.Seeding:
|
||||
case DownloadStatus.Stopped:
|
||||
item.Status = DownloadItemStatus.Completed;
|
||||
break;
|
||||
case DownloadStatus.StoppedOnError:
|
||||
item.Status = DownloadItemStatus.Failed;
|
||||
break;
|
||||
case DownloadStatus.Loading:
|
||||
default: // new status in API? default to downloading
|
||||
item.Message = "Unknown download state: " + download.Status;
|
||||
_logger.Info(item.Message);
|
||||
item.Status = DownloadItemStatus.Downloading;
|
||||
break;
|
||||
}
|
||||
|
||||
// Override status if completed, but not finished downloading
|
||||
if (download.Status == DownloadStatus.Stopped && download.Progress < 1)
|
||||
{
|
||||
item.Status = DownloadItemStatus.Paused;
|
||||
}
|
||||
|
||||
if (download.Error != null && download.Error.Length > 0)
|
||||
{
|
||||
item.Status = DownloadItemStatus.Warning;
|
||||
item.Message = download.Error;
|
||||
}
|
||||
|
||||
item.CanBeRemoved = item.CanMoveFiles = HasReachedSeedLimit(download, configAsync);
|
||||
|
||||
items.Add(item);
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
public override void RemoveItem(DownloadClientItem item, bool deleteData)
|
||||
{
|
||||
_proxy.RemoveDownload(Settings, item, deleteData);
|
||||
}
|
||||
|
||||
public override DownloadClientInfo GetStatus()
|
||||
{
|
||||
var config = _proxy.GetConfig(Settings);
|
||||
var destDir = config.Settings.LibTorrent.DownloadDefaults.SaveAS;
|
||||
|
||||
if (Settings.TvCategory.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
destDir = string.Format("{0}/.{1}", destDir, Settings.TvCategory);
|
||||
}
|
||||
|
||||
return new DownloadClientInfo
|
||||
{
|
||||
IsLocalhost = Settings.Host == "127.0.0.1" || Settings.Host == "localhost",
|
||||
OutputRootFolders = new List<OsPath> { _remotePathMappingService.RemapRemoteToLocal(Settings.Host, new OsPath(destDir)) }
|
||||
};
|
||||
}
|
||||
|
||||
protected static bool HasReachedSeedLimit(Download torrent, TriblerSettingsResponse config)
|
||||
{
|
||||
if (config == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(config));
|
||||
}
|
||||
|
||||
if (torrent == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(torrent));
|
||||
}
|
||||
|
||||
// if download is still running then it's not finished.
|
||||
if (torrent.Status != DownloadStatus.Stopped)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (config.Settings.LibTorrent.DownloadDefaults.SeedingMode)
|
||||
{
|
||||
case DownloadDefaultsSeedingMode.Ratio:
|
||||
|
||||
return torrent.AllTimeRatio.HasValue
|
||||
&& torrent.AllTimeRatio >= config.Settings.LibTorrent.DownloadDefaults.SeedingRatio;
|
||||
|
||||
case DownloadDefaultsSeedingMode.Time:
|
||||
var downloadStarted = DateTimeOffset.FromUnixTimeSeconds(torrent.TimeAdded.Value);
|
||||
var maxSeedingTime = TimeSpan.FromSeconds(config.Settings.LibTorrent.DownloadDefaults.SeedingTime ?? 0);
|
||||
|
||||
return torrent.TimeAdded.HasValue
|
||||
&& downloadStarted.Add(maxSeedingTime) < DateTimeOffset.Now;
|
||||
|
||||
case DownloadDefaultsSeedingMode.Never:
|
||||
return true;
|
||||
|
||||
case DownloadDefaultsSeedingMode.Forever:
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override string AddFromMagnetLink(RemoteEpisode remoteEpisode, string hash, string magnetLink)
|
||||
{
|
||||
var addDownloadRequestObject = new AddDownloadRequest
|
||||
{
|
||||
Destination = GetDownloadDirectory(),
|
||||
Uri = magnetLink,
|
||||
SafeSeeding = Settings.SafeSeeding,
|
||||
AnonymityHops = Settings.AnonymityLevel
|
||||
};
|
||||
|
||||
return _proxy.AddFromMagnetLink(Settings, addDownloadRequestObject);
|
||||
}
|
||||
|
||||
protected override string AddFromTorrentFile(RemoteEpisode remoteEpisode, string hash, string filename, byte[] fileContent)
|
||||
{
|
||||
// TODO: Tribler 8.x does support adding from a torrent file, but it's not a simple put command.
|
||||
throw new NotSupportedException("Tribler does not support torrent files, only magnet links");
|
||||
}
|
||||
|
||||
protected override void Test(List<ValidationFailure> failures)
|
||||
{
|
||||
failures.AddIfNotNull(TestConnection());
|
||||
|
||||
if (failures.HasErrors())
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
protected string GetDownloadDirectory()
|
||||
{
|
||||
if (Settings.TvDirectory.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
return Settings.TvDirectory;
|
||||
}
|
||||
|
||||
if (!Settings.TvCategory.IsNotNullOrWhiteSpace())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var config = _proxy.GetConfig(Settings);
|
||||
var destDir = config.Settings.LibTorrent.DownloadDefaults.SaveAS;
|
||||
|
||||
return $"{destDir.TrimEnd('/')}/{Settings.TvCategory}";
|
||||
}
|
||||
|
||||
protected ValidationFailure TestConnection()
|
||||
{
|
||||
try
|
||||
{
|
||||
var downloads = GetItems();
|
||||
return null;
|
||||
}
|
||||
catch (DownloadClientAuthenticationException ex)
|
||||
{
|
||||
_logger.Error(ex, ex.Message);
|
||||
|
||||
return new ValidationFailure("ApiKey", _localizationService.GetLocalizedString("DownloadClientValidationApiKeyIncorrect"));
|
||||
}
|
||||
catch (DownloadClientUnavailableException ex)
|
||||
{
|
||||
_logger.Error(ex, ex.Message);
|
||||
|
||||
return new NzbDroneValidationFailure("Host", _localizationService.GetLocalizedString("DownloadClientValidationUnableToConnect", new Dictionary<string, object> { { "clientName", Name } }))
|
||||
{
|
||||
DetailedDescription = ex.Message
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex, "Failed to test");
|
||||
|
||||
return new NzbDroneValidationFailure(string.Empty, _localizationService.GetLocalizedString("DownloadClientValidationUnknownException", new Dictionary<string, object> { { "exception", ex.Message } }));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using NLog;
|
||||
using NzbDrone.Common.Http;
|
||||
using NzbDrone.Common.Serializer;
|
||||
using NzbDrone.Core.Indexers.Tribler;
|
||||
|
||||
namespace NzbDrone.Core.Download.Clients.Tribler
|
||||
{
|
||||
public interface ITriblerDownloadClientProxy
|
||||
{
|
||||
List<Download> GetDownloads(TriblerDownloadSettings settings);
|
||||
List<File> GetDownloadFiles(TriblerDownloadSettings settings, Download downloadItem);
|
||||
TriblerSettingsResponse GetConfig(TriblerDownloadSettings settings);
|
||||
void RemoveDownload(TriblerDownloadSettings settings, DownloadClientItem item, bool deleteData);
|
||||
string AddFromMagnetLink(TriblerDownloadSettings settings, AddDownloadRequest downloadRequest);
|
||||
}
|
||||
|
||||
public class TriblerDownloadClientProxy : ITriblerDownloadClientProxy
|
||||
{
|
||||
protected readonly IHttpClient _httpClient;
|
||||
private readonly Logger _logger;
|
||||
|
||||
public TriblerDownloadClientProxy(IHttpClient httpClient, Logger logger)
|
||||
{
|
||||
_httpClient = httpClient;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
private HttpRequestBuilder GetRequestBuilder(TriblerDownloadSettings settings, string relativePath = null)
|
||||
{
|
||||
var baseUrl = HttpRequestBuilder.BuildBaseUrl(settings.UseSsl, settings.Host, settings.Port, settings.UrlBase);
|
||||
baseUrl = HttpUri.CombinePath(baseUrl, relativePath);
|
||||
|
||||
var requestBuilder = new HttpRequestBuilder(baseUrl)
|
||||
.Accept(HttpAccept.Json);
|
||||
|
||||
requestBuilder.Headers.Add("X-Api-Key", settings.ApiKey);
|
||||
requestBuilder.LogResponseContent = true;
|
||||
|
||||
return requestBuilder;
|
||||
}
|
||||
|
||||
private T ProcessRequest<T>(HttpRequestBuilder requestBuilder)
|
||||
where T : new()
|
||||
{
|
||||
return ProcessRequest<T>(requestBuilder.Build());
|
||||
}
|
||||
|
||||
private T ProcessRequest<T>(HttpRequest requestBuilder)
|
||||
where T : new()
|
||||
{
|
||||
var httpRequest = requestBuilder;
|
||||
|
||||
_logger.Debug("Url: {0}", httpRequest.Url);
|
||||
|
||||
try
|
||||
{
|
||||
var response = _httpClient.Execute(httpRequest);
|
||||
return Json.Deserialize<T>(response.Content);
|
||||
}
|
||||
catch (HttpException ex)
|
||||
{
|
||||
if (ex.Response.StatusCode == System.Net.HttpStatusCode.Unauthorized)
|
||||
{
|
||||
throw new DownloadClientAuthenticationException("Unauthorized - AuthToken is invalid", ex);
|
||||
}
|
||||
|
||||
throw new DownloadClientUnavailableException("Unable to connect to Tribler. Status Code: {0}", ex.Response.StatusCode, ex);
|
||||
}
|
||||
}
|
||||
|
||||
public TriblerSettingsResponse GetConfig(TriblerDownloadSettings settings)
|
||||
{
|
||||
var configRequest = GetRequestBuilder(settings, "api/settings");
|
||||
return ProcessRequest<TriblerSettingsResponse>(configRequest);
|
||||
}
|
||||
|
||||
public List<File> GetDownloadFiles(TriblerDownloadSettings settings, Download downloadItem)
|
||||
{
|
||||
var filesRequest = GetRequestBuilder(settings, "api/downloads/" + downloadItem.Infohash + "/files");
|
||||
return ProcessRequest<GetFilesResponse>(filesRequest).Files;
|
||||
}
|
||||
|
||||
public List<Download> GetDownloads(TriblerDownloadSettings settings)
|
||||
{
|
||||
var downloadRequest = GetRequestBuilder(settings, "api/downloads");
|
||||
var downloads = ProcessRequest<DownloadsResponse>(downloadRequest);
|
||||
return downloads.Downloads;
|
||||
}
|
||||
|
||||
public void RemoveDownload(TriblerDownloadSettings settings, DownloadClientItem item, bool deleteData)
|
||||
{
|
||||
var deleteDownloadRequestObject = new RemoveDownloadRequest
|
||||
{
|
||||
RemoveData = deleteData
|
||||
};
|
||||
|
||||
var deleteRequestBuilder = GetRequestBuilder(settings, "api/downloads/" + item.DownloadId.ToLower());
|
||||
deleteRequestBuilder.Method = HttpMethod.Delete;
|
||||
|
||||
var deleteRequest = deleteRequestBuilder.Build();
|
||||
deleteRequest.SetContent(Json.ToJson(deleteDownloadRequestObject));
|
||||
|
||||
ProcessRequest<DeleteDownloadResponse>(deleteRequest);
|
||||
}
|
||||
|
||||
public string AddFromMagnetLink(TriblerDownloadSettings settings, AddDownloadRequest downloadRequest)
|
||||
{
|
||||
var addDownloadRequestBuilder = GetRequestBuilder(settings, "api/downloads");
|
||||
addDownloadRequestBuilder.Method = HttpMethod.Put;
|
||||
|
||||
var addDownloadRequest = addDownloadRequestBuilder.Build();
|
||||
addDownloadRequest.SetContent(Json.ToJson(downloadRequest));
|
||||
|
||||
return ProcessRequest<AddDownloadResponse>(addDownloadRequest).Infohash;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System.Text.RegularExpressions;
|
||||
using FluentValidation;
|
||||
using NzbDrone.Common.Extensions;
|
||||
using NzbDrone.Core.Annotations;
|
||||
using NzbDrone.Core.ThingiProvider;
|
||||
using NzbDrone.Core.Validation;
|
||||
|
||||
namespace NzbDrone.Core.Download.Clients.Tribler
|
||||
{
|
||||
public class TriblerSettingsValidator : AbstractValidator<TriblerDownloadSettings>
|
||||
{
|
||||
public TriblerSettingsValidator()
|
||||
{
|
||||
RuleFor(c => c.Host).ValidHost();
|
||||
RuleFor(c => c.Port).InclusiveBetween(1, 65535);
|
||||
RuleFor(c => c.UrlBase).ValidUrlBase();
|
||||
RuleFor(c => c.ApiKey).NotEmpty();
|
||||
RuleFor(c => c.TvCategory).Matches(@"^\.?[-a-z]*$", RegexOptions.IgnoreCase).WithMessage("Allowed characters a-z and -");
|
||||
RuleFor(c => c.TvCategory).Empty()
|
||||
.When(c => c.TvDirectory.IsNotNullOrWhiteSpace())
|
||||
.WithMessage("Cannot use Category and Directory");
|
||||
RuleFor(c => c.AnonymityLevel).GreaterThanOrEqualTo(0);
|
||||
}
|
||||
}
|
||||
|
||||
public class TriblerDownloadSettings : IProviderConfig
|
||||
{
|
||||
private static readonly TriblerSettingsValidator Validator = new TriblerSettingsValidator();
|
||||
|
||||
public TriblerDownloadSettings()
|
||||
{
|
||||
Host = "localhost";
|
||||
Port = 20100;
|
||||
UrlBase = "";
|
||||
AnonymityLevel = 1;
|
||||
SafeSeeding = true;
|
||||
}
|
||||
|
||||
[FieldDefinition(1, Label = "Host", Type = FieldType.Textbox)]
|
||||
public string Host { get; set; }
|
||||
|
||||
[FieldDefinition(2, Label = "Port", Type = FieldType.Textbox)]
|
||||
public int Port { get; set; }
|
||||
|
||||
[FieldDefinition(3, Label = "UseSsl", Type = FieldType.Checkbox, HelpText = "DownloadClientSettingsUseSslHelpText")]
|
||||
public bool UseSsl { get; set; }
|
||||
|
||||
[FieldDefinition(4, Label = "UrlBase", Type = FieldType.Textbox, Advanced = true, HelpText = "DownloadClientSettingsUrlBaseHelpText")]
|
||||
[FieldToken(TokenField.HelpText, "UrlBase", "clientName", "Tribler")]
|
||||
[FieldToken(TokenField.HelpText, "UrlBase", "url", "http://[host]:[port]/[urlBase]")]
|
||||
public string UrlBase { get; set; }
|
||||
|
||||
[FieldDefinition(5, Label = "ApiKey", Type = FieldType.Textbox, Privacy = PrivacyLevel.ApiKey, HelpText = "DownloadClientTriblerSettingsApiKeyHelpText")]
|
||||
public string ApiKey { get; set; }
|
||||
|
||||
[FieldDefinition(6, Label = "Category", Type = FieldType.Textbox, HelpText = "DownloadClientSettingsCategoryHelpText")]
|
||||
public string TvCategory { get; set; }
|
||||
|
||||
[FieldDefinition(7, Label = "Directory", Type = FieldType.Textbox, Advanced = true, HelpText = "DownloadClientTriblerSettingsDirectoryHelpText")]
|
||||
public string TvDirectory { get; set; }
|
||||
|
||||
[FieldDefinition(8, Label = "DownloadClientTriblerSettingsAnonymityLevel", Type = FieldType.Number, HelpText = "DownloadClientTriblerSettingsAnonymityLevelHelpText")]
|
||||
[FieldToken(TokenField.HelpText, "DownloadClientTriblerSettingsAnonymityLevel", "url", "https://www.tribler.org/anonymity.html")]
|
||||
public int AnonymityLevel { get; set; }
|
||||
|
||||
[FieldDefinition(9, Label = "DownloadClientTriblerSettingsSafeSeeding", Type = FieldType.Checkbox, HelpText = "DownloadClientTriblerSettingsSafeSeedingHelpText")]
|
||||
public bool SafeSeeding { get; set; }
|
||||
|
||||
public NzbDroneValidationResult Validate()
|
||||
{
|
||||
return new NzbDroneValidationResult(Validator.Validate(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ namespace NzbDrone.Core.Indexers.Newznab
|
||||
{
|
||||
yield return GetDefinition("DOGnzb", GetSettings("https://api.dognzb.cr"));
|
||||
yield return GetDefinition("DrunkenSlug", GetSettings("https://drunkenslug.com"));
|
||||
yield return GetDefinition("Nzb.su", GetSettings("https://api.nzb.su"));
|
||||
yield return GetDefinition("Nzb.life", GetSettings("https://api.nzb.life"));
|
||||
yield return GetDefinition("NZBCat", GetSettings("https://nzb.cat"));
|
||||
yield return GetDefinition("NZBFinder.ws", GetSettings("https://nzbfinder.ws", categories: new[] { 5030, 5040, 5045 }));
|
||||
yield return GetDefinition("NZBgeek", GetSettings("https://api.nzbgeek.info"));
|
||||
|
||||
@@ -13,10 +13,10 @@ namespace NzbDrone.Core.Indexers.Newznab
|
||||
{
|
||||
public class NewznabSettingsValidator : AbstractValidator<NewznabSettings>
|
||||
{
|
||||
private static readonly string[] ApiKeyWhiteList =
|
||||
private static readonly string[] ApiKeyAllowList =
|
||||
{
|
||||
"nzbs.org",
|
||||
"nzb.su",
|
||||
"nzb.life",
|
||||
"dognzb.cr",
|
||||
"nzbplanet.net",
|
||||
"nzbid.org",
|
||||
@@ -26,7 +26,7 @@ namespace NzbDrone.Core.Indexers.Newznab
|
||||
|
||||
private static bool ShouldHaveApiKey(NewznabSettings settings)
|
||||
{
|
||||
return settings.BaseUrl != null && ApiKeyWhiteList.Any(c => settings.BaseUrl.ToLowerInvariant().Contains(c));
|
||||
return settings.BaseUrl != null && ApiKeyAllowList.Any(c => settings.BaseUrl.ToLowerInvariant().Contains(c));
|
||||
}
|
||||
|
||||
private static readonly Regex AdditionalParametersRegex = new(@"(&.+?\=.+?)+", RegexOptions.Compiled);
|
||||
|
||||
11
src/NzbDrone.Core/Indexers/SeasonPackSeedGoal.cs
Normal file
11
src/NzbDrone.Core/Indexers/SeasonPackSeedGoal.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using NzbDrone.Core.Annotations;
|
||||
|
||||
namespace NzbDrone.Core.Indexers;
|
||||
|
||||
public enum SeasonPackSeedGoal
|
||||
{
|
||||
[FieldOption(Label = "IndexerSettingsSeasonPackSeedGoalUseStandardGoals")]
|
||||
UseStandardSeedGoal = 0,
|
||||
[FieldOption(Label = "IndexerSettingsSeasonPackSeedGoalUseSeasonPackGoals")]
|
||||
UseSeasonPackSeedGoal = 1
|
||||
}
|
||||
@@ -49,12 +49,16 @@ namespace NzbDrone.Core.Indexers
|
||||
return null;
|
||||
}
|
||||
|
||||
var useSeasonPackSeedGoal = (SeasonPackSeedGoal)seedCriteria.SeasonPackSeedGoal == SeasonPackSeedGoal.UseSeasonPackSeedGoal;
|
||||
|
||||
var seedConfig = new TorrentSeedConfiguration
|
||||
{
|
||||
Ratio = seedCriteria.SeedRatio
|
||||
Ratio = (fullSeason && useSeasonPackSeedGoal)
|
||||
? seedCriteria.SeasonPackSeedRatio
|
||||
: seedCriteria.SeedRatio
|
||||
};
|
||||
|
||||
var seedTime = fullSeason ? seedCriteria.SeasonPackSeedTime : seedCriteria.SeedTime;
|
||||
var seedTime = (fullSeason && useSeasonPackSeedGoal) ? seedCriteria.SeasonPackSeedTime : seedCriteria.SeedTime;
|
||||
if (seedTime.HasValue)
|
||||
{
|
||||
seedConfig.SeedTime = TimeSpan.FromMinutes(seedTime.Value);
|
||||
|
||||
@@ -17,6 +17,10 @@ namespace NzbDrone.Core.Indexers
|
||||
.When(c => c.SeedTime.HasValue)
|
||||
.AsWarning().WithMessage("Should be greater than zero");
|
||||
|
||||
RuleFor(c => c.SeasonPackSeedRatio).GreaterThan(0.0)
|
||||
.When(c => c.SeasonPackSeedRatio.HasValue)
|
||||
.AsWarning().WithMessage("Should be greater than zero");
|
||||
|
||||
RuleFor(c => c.SeasonPackSeedTime).GreaterThan(0)
|
||||
.When(c => c.SeasonPackSeedTime.HasValue)
|
||||
.AsWarning().WithMessage("Should be greater than zero");
|
||||
@@ -27,6 +31,11 @@ namespace NzbDrone.Core.Indexers
|
||||
.When(c => c.SeedRatio > 0.0)
|
||||
.AsWarning()
|
||||
.WithMessage($"Under {seedRatioMinimum} leads to H&R");
|
||||
|
||||
RuleFor(c => c.SeasonPackSeedRatio).GreaterThanOrEqualTo(seedRatioMinimum)
|
||||
.When(c => c.SeasonPackSeedRatio > 0.0)
|
||||
.AsWarning()
|
||||
.WithMessage($"Under {seedRatioMinimum} leads to H&R");
|
||||
}
|
||||
|
||||
if (seedTimeMinimum != 0)
|
||||
@@ -55,7 +64,13 @@ namespace NzbDrone.Core.Indexers
|
||||
[FieldDefinition(1, Type = FieldType.Number, Label = "IndexerSettingsSeedTime", Unit = "minutes", HelpText = "IndexerSettingsSeedTimeHelpText", Advanced = true)]
|
||||
public int? SeedTime { get; set; }
|
||||
|
||||
[FieldDefinition(2, Type = FieldType.Number, Label = "Season-Pack Seed Time", Unit = "minutes", HelpText = "IndexerSettingsSeasonPackSeedTimeHelpText", Advanced = true)]
|
||||
[FieldDefinition(2, Type = FieldType.Select, Label = "IndexerSettingsSeasonPackSeedGoal", SelectOptions = typeof(SeasonPackSeedGoal), HelpText = "IndexerSettingsSeasonPackSeedGoalHelpText", Advanced = true)]
|
||||
public int SeasonPackSeedGoal { get; set; }
|
||||
|
||||
[FieldDefinition(3, Type = FieldType.Number, Label = "IndexerSettingsSeasonPackSeedRatio", HelpText = "IndexerSettingsSeasonPackSeedRatioHelpText", Advanced = true)]
|
||||
public double? SeasonPackSeedRatio { get; set; }
|
||||
|
||||
[FieldDefinition(4, Type = FieldType.Number, Label = "IndexerSettingsSeasonPackSeedTime", Unit = "minutes", HelpText = "IndexerSettingsSeasonPackSeedTimeHelpText", Advanced = true)]
|
||||
public int? SeasonPackSeedTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,11 +12,11 @@ namespace NzbDrone.Core.Indexers.Torznab
|
||||
{
|
||||
public class TorznabSettingsValidator : AbstractValidator<TorznabSettings>
|
||||
{
|
||||
private static readonly string[] ApiKeyWhiteList = Array.Empty<string>();
|
||||
private static readonly string[] ApiKeyAllowList = Array.Empty<string>();
|
||||
|
||||
private static bool ShouldHaveApiKey(TorznabSettings settings)
|
||||
{
|
||||
return settings.BaseUrl != null && ApiKeyWhiteList.Any(c => settings.BaseUrl.ToLowerInvariant().Contains(c));
|
||||
return settings.BaseUrl != null && ApiKeyAllowList.Any(c => settings.BaseUrl.ToLowerInvariant().Contains(c));
|
||||
}
|
||||
|
||||
private static readonly Regex AdditionalParametersRegex = new(@"(&.+?\=.+?)+", RegexOptions.Compiled);
|
||||
|
||||
@@ -2166,5 +2166,10 @@
|
||||
"NotificationsAppriseSettingsIncludePosterHelpText": "Inclou el cartell al missatge",
|
||||
"MonitorEpisodesModalInfo": "Aquesta opció només ajustarà quins episodis o temporades són monitorats en les sèries. Seleccionar Cap deixarà de monitorar les sèries",
|
||||
"EpisodeMonitoring": "Monitoratge d'episodis",
|
||||
"NotificationsAppriseSettingsIncludePoster": "Inclou el cartell"
|
||||
"NotificationsAppriseSettingsIncludePoster": "Inclou el cartell",
|
||||
"UserRejectedExtensions": "Extensions addicionals d'arxiu rebutjades",
|
||||
"UserRejectedExtensionsHelpText": "Llista d'extensions d'arxiu a fallar separades per coma (Descàrregues fallides també necessita ser activat per indexador)",
|
||||
"UserRejectedExtensionsTextsExamples": "Exemples: '.ext, .xyz' o 'ext,xyz'",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTags": "Afegeix etiquetes de sèries",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTagsHelpText": "Afegeix etiquetes de sèries als nous torrents afegits al client de descàrrega (qBittorrent 4.1.0+)"
|
||||
}
|
||||
|
||||
@@ -549,7 +549,13 @@
|
||||
"DownloadClientStatusSingleClientHealthCheckMessage": "Download clients unavailable due to failures: {downloadClientNames}",
|
||||
"DownloadClientTransmissionSettingsDirectoryHelpText": "Optional location to put downloads in, leave blank to use the default Transmission location",
|
||||
"DownloadClientTransmissionSettingsUrlBaseHelpText": "Adds a prefix to the {clientName} rpc url, eg {url}, defaults to '{defaultUrl}'",
|
||||
"DownloadClientUTorrentProviderMessage": "uTorrent has a history of including cryptominers, malware and ads, we strongly encourage you to choose a different client.",
|
||||
"DownloadClientTriblerSettingsAnonymityLevel": "Anonymity level",
|
||||
"DownloadClientTriblerSettingsAnonymityLevelHelpText": "Number of proxies to use when downloading content. To disable set to 0. Proxies reduce download/upload speed. See {url}",
|
||||
"DownloadClientTriblerSettingsApiKeyHelpText": "[api].key from triblerd.conf",
|
||||
"DownloadClientTriblerSettingsDirectoryHelpText": "Optional location to put downloads in, leave blank to use the default Tribler location",
|
||||
"DownloadClientTriblerSettingsSafeSeeding": "Safe Seeding",
|
||||
"DownloadClientTriblerSettingsSafeSeedingHelpText": "When enabled, only seed through proxies.",
|
||||
"DownloadClientTriblerProviderMessage": "The tribler integration is highly experimental. Tested against {clientName} version {clientVersionRange}.",
|
||||
"DownloadClientUTorrentTorrentStateError": "uTorrent is reporting an error",
|
||||
"DownloadClientUnavailable": "Download Client Unavailable",
|
||||
"DownloadClientValidationApiKeyIncorrect": "API Key Incorrect",
|
||||
@@ -1019,8 +1025,14 @@
|
||||
"IndexerSettingsRejectBlocklistedTorrentHashesHelpText": "If a torrent is blocked by hash it may not properly be rejected during RSS/Search for some indexers, enabling this will allow it to be rejected after the torrent is grabbed, but before it is sent to the client.",
|
||||
"IndexerSettingsRssUrl": "RSS URL",
|
||||
"IndexerSettingsRssUrlHelpText": "Enter to URL to an {indexer} compatible RSS feed",
|
||||
"IndexerSettingsSeasonPackSeedTime": "Season-Pack Seed Time",
|
||||
"IndexerSettingsSeasonPackSeedTimeHelpText": "The time a season-pack torrent should be seeded before stopping, empty uses the download client's default",
|
||||
"IndexerSettingsSeasonPackSeedGoal": "Seeding Goal for Season Packs",
|
||||
"IndexerSettingsSeasonPackSeedGoalHelpText": "Choose whether to use different seeding goals for season packs",
|
||||
"IndexerSettingsSeasonPackSeedGoalUseStandardGoals": "Use Standard Goals",
|
||||
"IndexerSettingsSeasonPackSeedGoalUseSeasonPackGoals": "Use Season Pack Goals",
|
||||
"IndexerSettingsSeasonPackSeedRatio": "Season Pack Seed Ratio",
|
||||
"IndexerSettingsSeasonPackSeedRatioHelpText": "The ratio a season pack torrent should reach before stopping, empty uses the download client's default. Ratio should be at least 1.0 and follow the indexers rules",
|
||||
"IndexerSettingsSeasonPackSeedTime": "Season Pack Seed Time",
|
||||
"IndexerSettingsSeasonPackSeedTimeHelpText": "The time a season pack torrent should be seeded before stopping, empty uses the download client's default",
|
||||
"IndexerSettingsSeedRatio": "Seed Ratio",
|
||||
"IndexerSettingsSeedRatioHelpText": "The ratio a torrent should reach before stopping, empty uses the download client's default. Ratio should be at least 1.0 and follow the indexers rules",
|
||||
"IndexerSettingsSeedTime": "Seed Time",
|
||||
|
||||
@@ -2166,5 +2166,10 @@
|
||||
"NotificationsAppriseSettingsIncludePosterHelpText": "Incluir póster en el mensaje",
|
||||
"EpisodeMonitoring": "Monitorización de episodios",
|
||||
"MonitorEpisodes": "Monitorizar episodios",
|
||||
"MonitorEpisodesModalInfo": "Esta opción solo ajustará qué episodios o temporadas son monitorizados en las series. Seleccionar Ninguno dejará de monitorizar las series"
|
||||
"MonitorEpisodesModalInfo": "Esta opción solo ajustará qué episodios o temporadas son monitorizados en las series. Seleccionar Ninguno dejará de monitorizar las series",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTags": "Añadir etiquetas de series",
|
||||
"UserRejectedExtensions": "Extensiones adicionales de archivo rechazadas",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTagsHelpText": "Añade etiquetas de series a los nuevos torrents añadidos al cliente de descarga (qBittorrent 4.1.0+)",
|
||||
"UserRejectedExtensionsTextsExamples": "Ejemplos: '.ext, .xyz' o 'ext,xyz'",
|
||||
"UserRejectedExtensionsHelpText": "Lista de extensiones de archivo a fallar separadas por coma (Descargas fallidas también necesita ser activado por indexador)"
|
||||
}
|
||||
|
||||
@@ -816,7 +816,7 @@
|
||||
"CollapseMultipleEpisodesHelpText": "Tiivistä useat samana päivänä esitettävät jaksot.",
|
||||
"CalendarLegendSeriesFinaleTooltip": "Sarjan tai kauden päätösjakso",
|
||||
"CalendarLegendSeriesPremiereTooltip": "Sarjan tai kauden pilottijakso",
|
||||
"ClickToChangeSeries": "Muuta sarjaa klikkaamalla",
|
||||
"ClickToChangeSeries": "Vaihda sarja klikkaamalla",
|
||||
"CloneIndexer": "Monista hakupalvelu",
|
||||
"Close": "Sulje",
|
||||
"ClearBlocklist": "Tyhjennä estolista",
|
||||
@@ -1190,7 +1190,7 @@
|
||||
"AddedDate": "Lisätty: {date}",
|
||||
"Anime": "Anime",
|
||||
"Any": "Mikä tahansa",
|
||||
"ClickToChangeSeason": "Vaihda tuotantokautta painamalla tästä",
|
||||
"ClickToChangeSeason": "Vaihda tuotantokausi klikkaamalla",
|
||||
"CountSelectedFile": "{selectedCount} tiedosto on valittu",
|
||||
"SingleEpisodeInvalidFormat": "Yksittäinen jakso: virheellinen kaava",
|
||||
"Underscore": "Alaviiva",
|
||||
@@ -1242,7 +1242,7 @@
|
||||
"AuthenticationRequiredPasswordConfirmationHelpTextWarning": "Vahvista uusi salasana",
|
||||
"Category": "Kategoria",
|
||||
"ChownGroup": "chown-ryhmä",
|
||||
"ClickToChangeEpisode": "Vaihda jaksoa painamalla tästä",
|
||||
"ClickToChangeEpisode": "Vaihda jakso klikkaamalla",
|
||||
"CompletedDownloadHandling": "Valmistuneiden latausten käsittely",
|
||||
"Condition": "Ehto",
|
||||
"Continuing": "Jatkuu",
|
||||
@@ -1834,13 +1834,13 @@
|
||||
"ImportListsMyAnimeListSettingsListStatus": "Listan tila",
|
||||
"ImportListStatusAllUnavailableHealthCheckMessage": "Mitkään listat eivät ole virheiden vuoksi käytettävissä",
|
||||
"MetadataKometaDeprecatedSetting": "Poistunut",
|
||||
"NotificationsTelegramSettingsMetadataLinksHelpText": "Lisää lähetettäviin ilmoituksiin linkit sarjojen metatietoihin.",
|
||||
"NotificationsTelegramSettingsMetadataLinksHelpText": "Lisää lähetettäviin ilmoituksiin linkit median metatietoihin.",
|
||||
"OnFileImport": "Kun tiedosto tuodaan",
|
||||
"OnFileUpgrade": "Kun tiedosto päivitetään",
|
||||
"ReleaseProfile": "Julkaisuprofiili",
|
||||
"ShowTags": "Näytä tunnisteet",
|
||||
"TodayAt": "Tänään klo {time}",
|
||||
"ClickToChangeReleaseType": "Vaihda julkaisun tyyppiä painamalla tästä",
|
||||
"ClickToChangeReleaseType": "Vaihda julkaisun tyyppi klikkaamalla",
|
||||
"CustomFormatsSpecificationSource": "Lähde",
|
||||
"DownloadClientQbittorrentTorrentStateMissingFiles": "qBittorrent ilmoittaa puuttuvista tiedostoista",
|
||||
"DownloadClientSabnzbdValidationCheckBeforeDownload": "Poista SABnbzd:n \"Tarkista ennen lataamista\" -asetus käytöstä",
|
||||
@@ -1862,7 +1862,7 @@
|
||||
"ReleaseGroupFootNote": "Vaihtoehtoisesti voit hallita lyhennystä tavujen enimmäismäärän perusteella, ellipsi (...) mukaan lukien. Sekä lyhennystä lopusta (esim. \"{Julkaisuryhmä:30}\"), että alusta (esim. \"{Julkaisuryhmä:-30}\") tuetaan.",
|
||||
"InstallMajorVersionUpdateMessage": "Tämä päivitys asentaa uuden pääversion, joka ei välttämättä ole yhteensopiva laitteistosi kanssa. Haluatko varmasti asentaa päivityksen?",
|
||||
"MinimumCustomFormatScoreIncrementHelpText": "Pienin vaadittu olemassa olevien ja uusien julkaisujen välinen mukautetun muodon pisteytyksen korotus ennen kuin {appName} tulkitsee julkaisun päivitykseksi.",
|
||||
"NotificationsGotifySettingsMetadataLinksHelpText": "Lisää lähetettäviin ilmoituksiin linkit sarjojen metatietoihin.",
|
||||
"NotificationsGotifySettingsMetadataLinksHelpText": "Lisää lähetettäviin ilmoituksiin linkit median metatietoihin.",
|
||||
"NotificationsPlexSettingsServerHelpText": "Valitse tunnistautumisen jälkeen palvelin Plex.tv-tililtä.",
|
||||
"EpisodeTitleFootNote": "Vaihtoehtoisesti voit hallita lyhennystä tavujen enimmäismäärän perusteella, ellipsi (...) mukaan lukien. Sekä lyhennystä lopusta (esim. \"{jakson nimi:30}\"), että alusta (esim. \"{jakson nimi:-30}\") tuetaan. Tarvittaessa jaksojen nimet lyhennetään automaattisesti järjestelmän rajoitukseen.",
|
||||
"SeriesFootNote": "Vaihtoehtoisesti voit hallita lyhennystä tavujen enimmäismäärän perusteella, ellipsi (...) mukaan lukien. Sekä lyhennystä lopusta (esim. \"{Sarjan nimi:30}\"), että alusta (esim. \"{Sarjan nimi:-30}\") tuetaan.",
|
||||
@@ -2156,12 +2156,20 @@
|
||||
"NotificationsPushcutSettingsIncludePoster": "Sisällytä juliste",
|
||||
"NotificationsPushcutSettingsIncludePosterHelpText": "Näytä juliste ilmoituksessa.",
|
||||
"NotificationsPushcutSettingsMetadataLinks": "Metatietolinkit",
|
||||
"NotificationsPushcutSettingsMetadataLinksHelpText": "Lisää lähetettäviin ilmoituksiin linkit sarjojen metatietoihin.",
|
||||
"NotificationsPushcutSettingsMetadataLinksHelpText": "Lisää lähetettäviin ilmoituksiin linkit median metatietoihin.",
|
||||
"AutoTaggingSpecificationNetwork": "Verkot",
|
||||
"DownloadClientItemErrorMessage": "{clientName} ilmoittaa virheestä: {message}",
|
||||
"EpisodesInSeason": "Tuotantokaudessa on {episodeCount} jaksoa",
|
||||
"CloneImportList": "Monista tuontilista",
|
||||
"DefaultNameCopiedImportList": "{name} (kopio)",
|
||||
"EpisodeMonitoring": "Jakson Valvonta",
|
||||
"MonitorEpisodes": "Valvo Jaksoja"
|
||||
"EpisodeMonitoring": "Jaksojen valvonta",
|
||||
"MonitorEpisodes": "Valvo jaksoja",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTagsHelpText": "Merkitse uudet latauspalveluun lisätyt torrentit sarjatunnisteilla (aBittorrent 4.1.0+).",
|
||||
"MonitorEpisodesModalInfo": "Tämä määrittää vain mitä jaksoja tai kausia sarjasta valvotaan. Valinta \"Ei mitään\" lopettaa sarjan valvonnan.",
|
||||
"NotificationsAppriseSettingsIncludePoster": "Sisällytä juliste",
|
||||
"NotificationsAppriseSettingsIncludePosterHelpText": "Sisällytä julisteet viesteihin.",
|
||||
"UserRejectedExtensions": "Lisää estettyjä tiedostopäätteitä",
|
||||
"UserRejectedExtensionsHelpText": "Pilkuin eroteltu listaus hylättävistä tiedostopäätteistä. Lisäksi \"Hylättävät lautaukset\"-asetuksen tulee olla käytössä hakupalvelukohtaisesti.",
|
||||
"UserRejectedExtensionsTextsExamples": "Esimerkiksi: \".ext, .xyz\" tai \"ext,xyz\".",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTags": "Lisää sarjan tunnisteet"
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@
|
||||
"NoSeriesFoundImportOrAdd": "Aucune série trouvée. Pour commencer, vous souhaiterez importer votre série existante ou ajouter une nouvelle série.",
|
||||
"ICalFeedHelpText": "Copiez cette URL dans votre/vos client(s) ou cliquez pour abonner si votre navigateur est compatible avec webcal",
|
||||
"SeasonFolderFormat": "Format du dossier de saison",
|
||||
"QualitiesHelpText": "Les qualités plus élevées dans la liste sont plus préférées. Les qualités au sein d’un même groupe sont égales. Seules les qualités vérifiées sont recherchées",
|
||||
"QualitiesHelpText": "Les qualités placées en haut de la liste sont privilégiées même si elles ne sont pas cochées. Les qualités d'un même groupe sont égales. Seules les qualités cochées sont recherchées",
|
||||
"PrioritySettings": "Priorité : {priority}",
|
||||
"ImportExistingSeries": "Importer une série existante",
|
||||
"RootFolderSelectFreeSpace": "{freeSpace} Libre",
|
||||
@@ -2017,7 +2017,7 @@
|
||||
"ImportListsTraktSettingsPopularListTypeTrendingShows": "Spectacles en vogue",
|
||||
"ImportListsTraktSettingsPopularName": "Liste populaire de Trakt",
|
||||
"ImportListsTraktSettingsRating": "Evaluation",
|
||||
"ImportListsTraktSettingsRatingSeriesHelpText": "Série de filtres par plage de valeurs nominales (0-100)",
|
||||
"ImportListsTraktSettingsRatingSeriesHelpText": "Filtrer les séries par plage de classement (0-100)",
|
||||
"ImportListsTraktSettingsWatchedListFilterSeriesHelpText": "Si le type de liste est surveillé, sélectionnez le type de série que vous souhaitez importer",
|
||||
"ImportListsTraktSettingsWatchListSorting": "Tri de la liste de surveillance",
|
||||
"ImportListsTraktSettingsWatchListSortingHelpText": "Si le type de liste est surveillé, sélectionnez l'ordre de tri de la liste",
|
||||
@@ -2123,5 +2123,45 @@
|
||||
"LastSearched": "Dernière recherche",
|
||||
"FolderNameTokens": "Jetons de nom de dossier",
|
||||
"ManageCustomFormats": "Gérer les formats personnalisés",
|
||||
"Menu": "Menu"
|
||||
"Menu": "Menu",
|
||||
"Fallback": "Alternative",
|
||||
"MetadataKometaDeprecatedSetting": "Obsolète",
|
||||
"AutoTaggingSpecificationNetwork": "Réseau(x)",
|
||||
"DefaultNameCopiedImportList": "{name} - Copie",
|
||||
"DownloadClientItemErrorMessage": "{clientName} a rapporté une erreur : {message}",
|
||||
"EditSizes": "Modifier les dimensions",
|
||||
"NotificationsGotifySettingsPreferredMetadataLink": "Lien de métadonnées préféré",
|
||||
"NotificationsPushcutSettingsMetadataLinksHelpText": "Ajouter un lien vers les métadonnées de la série lors de l'envoie d'une notification",
|
||||
"NotificationsTelegramSettingsLinkPreviewHelpText": "Détermine quel lien sera aperçu dans la notification Telegram. Choisir 'Aucun' pour désactiver",
|
||||
"DoneEditingSizes": "Terminer la modification des dimensions",
|
||||
"EpisodeMonitoring": "Suivi des épisodes",
|
||||
"ManageFormats": "Gérer les formats",
|
||||
"MinuteShorthand": "m",
|
||||
"MonitorEpisodes": "Surveiller les épisodes",
|
||||
"NotificationsGotifySettingsPreferredMetadataLinkHelpText": "Lien de métadonnées pour les clients qui ne peuvent avoir qu'un seul lien",
|
||||
"NotificationsSettingsWebhookHeaders": "En-têtes",
|
||||
"NotificationsTelegramSettingsIncludeInstanceNameHelpText": "Inclure le nom de l'instance dans la notification de façon facultative",
|
||||
"EpisodesInSeason": "{episodeCount} épisodes dans la saison",
|
||||
"FileSize": "Taille de fichier",
|
||||
"Maximum": "Maximum",
|
||||
"Minimum": "Minimum",
|
||||
"MinimumCustomFormatScoreIncrement": "Incrément minimal du score du format personnalisé",
|
||||
"Minute": "minute",
|
||||
"NotificationsPushcutSettingsIncludePoster": "Inclure l'affiche",
|
||||
"NotificationsPushcutSettingsIncludePosterHelpText": "Inclure l'affiche avec les notifications",
|
||||
"NotificationsTelegramSettingsLinkPreview": "Aperçu du lien",
|
||||
"FavoriteFolderAdd": "Ajouter un dossier favori",
|
||||
"FavoriteFolderRemove": "Supprimer le dossier favori",
|
||||
"DownloadClientUTorrentProviderMessage": "uTorrent a l'habitude d'inclure des cryptomineurs, des logiciels malveillants et des publicités, nous vous encourageons fortement à choisir un client différent.",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTags": "Ajouter des tags de séries",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTagsHelpText": "Ajouter des tags de séries aux nouveaux torrents ajoutés au client de téléchargement (qBittorrent 4.1.0+)",
|
||||
"FavoriteFolders": "Dossier favori",
|
||||
"MinimumCustomFormatScoreIncrementHelpText": "Amélioration minimale requise du score de format personnalisé entre les versions existantes et nouvelles avant que {appName} ne le considère comme une mise à niveau",
|
||||
"MonitorEpisodesModalInfo": "Ce paramètre n'ajustera que les épisodes ou saisons qui seront surveillés dans une série. Sélectionner Aucun retirera la surveillance de la série",
|
||||
"NotificationsTelegramSettingsIncludeInstanceName": "Inclure le nom de l'instance dans le titre",
|
||||
"NotificationsPushcutSettingsMetadataLinks": "Lien de métadonnées",
|
||||
"UserRejectedExtensions": "Extensions de fichiers rejetées supplémentaires",
|
||||
"UserRejectedExtensionsHelpText": "Liste séparée par des virgules des extensions de fichiers à échouer (“Échouer les téléchargements” doit également être activé dans l’indexeur)",
|
||||
"UserRejectedExtensionsTextsExamples": "Examples : '.ext, .xyz' or 'ext,xyz'",
|
||||
"Warning": "Avertissement"
|
||||
}
|
||||
|
||||
@@ -2166,5 +2166,10 @@
|
||||
"NotificationsAppriseSettingsIncludePosterHelpText": "Incluir pôster na mensagem",
|
||||
"EpisodeMonitoring": "Monitoramento do Episódio",
|
||||
"MonitorEpisodes": "Monitorar Episódios",
|
||||
"MonitorEpisodesModalInfo": "Esta configuração ajustará apenas quais episódios ou temporadas serão monitorados dentro de uma série. Selecionar Nenhum desativará o monitoramento da série"
|
||||
"MonitorEpisodesModalInfo": "Esta configuração ajustará apenas quais episódios ou temporadas serão monitorados dentro de uma série. Selecionar Nenhum desativará o monitoramento da série",
|
||||
"UserRejectedExtensions": "Extensões de Arquivos Rejeitadas Adicionais",
|
||||
"UserRejectedExtensionsHelpText": "Lista separada por vírgulas de extensões de arquivos para falhar (Falha em downloads também precisa ser habilitado por indexador)",
|
||||
"UserRejectedExtensionsTextsExamples": "Exemplos: '.ext, .xyz' or 'ext,xyz'",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTagsHelpText": "Adicionar etiquetas das séries a novos torrents adicionados ao cliente de download (qBittorrent 4.1.0+)",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTags": "Adicionar Etiquetas das Séries"
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@
|
||||
"AnimeEpisodeFormat": "Формат аниме-эпизода",
|
||||
"AuthBasic": "Базовый (Всплывающее окно браузера)",
|
||||
"AuthForm": "Формы (Страница авторизации)",
|
||||
"Authentication": "Авторизация",
|
||||
"Authentication": "Аутентификация",
|
||||
"AuthenticationRequired": "Требуется авторизация",
|
||||
"BackupIntervalHelpText": "Периодичность автоматического резервного копирования",
|
||||
"BackupRetentionHelpText": "Автоматические резервные копии старше указанного периода будут автоматически удалены",
|
||||
@@ -1500,7 +1500,7 @@
|
||||
"RejectionCount": "Количество отказов",
|
||||
"Release": "Релиз",
|
||||
"ReleaseGroup": "Релиз группа",
|
||||
"ReleaseGroupFootNote": "При необходимости можно управлять обрезкой до максимального количества байтов, включая многоточие (`...`). Поддерживается обрезка как с конца (например, `{Release Group:30}`), так и с начала (например, `{Release Group:-30}`).`).",
|
||||
"ReleaseGroupFootNote": "При необходимости можно управлять обрезкой до максимального количества байтов, включая многоточие (`...`). Поддерживается обрезка как с конца (например, `{Release Group:30}`), так и с начала (например, `{Release Group:-30}`).",
|
||||
"ReleaseProfileIndexerHelpText": "Укажите, к какому индексатору применяется профиль",
|
||||
"ReleaseProfileIndexerHelpTextWarning": "Установка определенного индексатора в профиле релиза приведет к тому, что этот профиль будет применяться только к релизам из этого индексатора.",
|
||||
"ReleaseProfiles": "Профили релизов",
|
||||
@@ -1696,7 +1696,7 @@
|
||||
"MetadataSettings": "Настройки метаданных",
|
||||
"NotificationsAppriseSettingsNotificationType": "Тип информирования об уведомлении",
|
||||
"NotificationsEmailSettingsFromAddress": "С адреса",
|
||||
"NotificationsEmailSettingsUseEncryptionHelpText": "Выбрать режим шифрования: предпочитать шифрование, если оно настроено на сервере; всегда использовать шифрование через SSL (только порт 465) или StartTLS (любой другой порт); никогда не использовать шифрование.",
|
||||
"NotificationsEmailSettingsUseEncryptionHelpText": "Выбрать режим шифрования: предпочитать шифрование, если оно настроено на сервере; всегда использовать шифрование через SSL (только порт 465) или StartTLS (любой другой порт); никогда не использовать шифрование",
|
||||
"NotificationsCustomScriptSettingsProviderMessage": "При тестировании будет выполняться сценарий с типом события, установленным на {eventTypeTest}. Убедитесь, что ваш сценарий обрабатывает это правильно",
|
||||
"NotificationsJoinSettingsApiKeyHelpText": "Ключ API из настроек вашей учетной записи присоединения (нажмите кнопку «Присоединиться к API»).",
|
||||
"NotificationsGotifySettingsServerHelpText": "URL-адрес сервера Gotify, включая http(s):// и порт, если необходимо",
|
||||
@@ -2016,7 +2016,7 @@
|
||||
"Search": "Поиск",
|
||||
"RestartReloadNote": "Примечание: {appName} автоматически перезапустится и перезагрузит интерфейс пользователя во время процесса восстановления.",
|
||||
"HealthMessagesInfoBox": "Дополнительную информацию о причине появления этих сообщений о проверке работоспособности можно найти, перейдя по ссылке wiki (значок книги) в конце строки или проверить [журналы]({link}). Если у вас возникли трудности с пониманием этих сообщений, вы можете обратиться в нашу службу поддержки по ссылкам ниже.",
|
||||
"MaintenanceRelease": "Технический релиз: исправление ошибок и другие улучшения. Подробнее см. в истории коммитов Github.",
|
||||
"MaintenanceRelease": "Технический релиз: исправление ошибок и другие улучшения. Подробнее см. в истории коммитов Github",
|
||||
"Space": "Пробел",
|
||||
"SslCertPasswordHelpText": "Пароль для файла pfx",
|
||||
"SpecialEpisode": "Спец. эпизод",
|
||||
@@ -2165,5 +2165,11 @@
|
||||
"NotificationsAppriseSettingsIncludePosterHelpText": "Добавлять постер в сообщение",
|
||||
"EpisodeMonitoring": "Отслеживание эпизода",
|
||||
"MonitorEpisodes": "Отслеживать эпизоды",
|
||||
"MonitorEpisodesModalInfo": "Эта настройка влияет только на отслеживание эпизодов или сезонов внутри сериала. Выбор ничего приведёт к остановке отслеживания сериала"
|
||||
"MonitorEpisodesModalInfo": "Эта настройка влияет только на отслеживание эпизодов или сезонов внутри сериала. Выбор ничего приведёт к остановке отслеживания сериала",
|
||||
"ImportListsSimklSettingsUserListTypeHold": "Оставить",
|
||||
"UserRejectedExtensions": "Дополнительные запрещенные расширения файлов",
|
||||
"UserRejectedExtensionsTextsExamples": "Примеры: '.ext, .xyz' или 'ext,xyz'",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTags": "Добавлять теги сериалов",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTagsHelpText": "Добавлять теги сериалов к новым торрентам, добавляемым в загрузчик (qBittorrent 4.1.0+)",
|
||||
"UserRejectedExtensionsHelpText": "Список запрещенных расширений файлов, разделенных запятой (так же нужно включить настройку Считать загрузки неуспешными в настройках индексаторов)"
|
||||
}
|
||||
|
||||
@@ -43,5 +43,6 @@
|
||||
"DownloadStationStatusExtracting": "Packar upp: {progress}%",
|
||||
"Duplicate": "Dubblett",
|
||||
"Yesterday": "Igår",
|
||||
"EditCustomFormat": "Redigera anpassat format"
|
||||
"EditCustomFormat": "Redigera anpassat format",
|
||||
"AbsoluteEpisodeNumber": "Fullständigt Avsnitt Nummer"
|
||||
}
|
||||
|
||||
@@ -1791,7 +1791,7 @@
|
||||
"IndexerValidationJackettAllNotSupportedHelpText": "Jackett'in tüm uç noktaları desteklenmiyor, lütfen indeksleyicileri tek tek ekleyin",
|
||||
"IndexerValidationNoRssFeedQueryAvailable": "RSS besleme sorgusu mevcut değil. Bu, indeksleyici veya indeksleyici kategori ayarlarınızdan kaynaklı bir sorun olabilir.",
|
||||
"IndexerValidationUnableToConnectResolutionFailure": "İndeksleyiciye bağlanılamıyor bağlantı hatası. İndeksleyicinin sunucusuna ve DNS'ine olan bağlantınızı kontrol edin. {exceptionMessage}.",
|
||||
"IndexerSettingsFailDownloads": "Başarısız İndirmeler",
|
||||
"IndexerSettingsFailDownloads": "İndirmeleri Başarısız Say",
|
||||
"IndexerSettingsFailDownloadsHelpText": "Tamamlanan indirmeler işlenirken {appName} bu seçili dosya türlerini başarısız indirmeler olarak değerlendirecektir.",
|
||||
"IndexerSettingsMinimumSeeders": "Minimum Seeder",
|
||||
"IndexerSettingsRssUrl": "RSS URL",
|
||||
@@ -2163,5 +2163,13 @@
|
||||
"EpisodesInSeason": "Sezondaki {episodeCount} bölüm",
|
||||
"AutoTaggingSpecificationNetwork": "Ağ(lar)",
|
||||
"NotificationsAppriseSettingsIncludePoster": "Poster'i ekle",
|
||||
"NotificationsAppriseSettingsIncludePosterHelpText": "Mesaja poster ekle"
|
||||
"NotificationsAppriseSettingsIncludePosterHelpText": "Mesaja poster ekle",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTags": "Dizilere Etiket Ekle",
|
||||
"DownloadClientQbittorrentSettingsAddSeriesTagsHelpText": "İndirme istemcisine (qBittorrent 4.1.0+) eklenen yeni torrentlere dizi etiketleri ekle",
|
||||
"UserRejectedExtensionsTextsExamples": "Örneğin: '.ext, .xyz' veya 'ext,xyz'",
|
||||
"MonitorEpisodes": "Bölümleri Takip Et",
|
||||
"MonitorEpisodesModalInfo": "Bu ayar, bir dizide hangi bölüm veya sezonların takip edileceğini kontrol eder. \"Hiçbiri\" seçilirse, dizi takip edilmeyecektir",
|
||||
"UserRejectedExtensions": "Ek Olarak Reddedilen Dosya Uzantıları",
|
||||
"UserRejectedExtensionsHelpText": "Başarısız sayılacak dosya uzantılarını virgülle ayırarak girin (Ayrıca, her dizinleyici için \"İndirmeleri Başarısız Say\" seçeneği etkin olmalıdır)",
|
||||
"EpisodeMonitoring": "Bölüm Takibi"
|
||||
}
|
||||
|
||||
@@ -136,6 +136,7 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_EpisodeAirDatesUtc", string.Join(",", episodeFile.Episodes.Value.Select(e => e.AirDateUtc)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_EpisodeTitles", string.Join("|", episodeFile.Episodes.Value.Select(e => e.Title)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_EpisodeOverviews", string.Join("|", episodeFile.Episodes.Value.Select(e => e.Overview)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_FinaleTypes", string.Join("|", episodeFile.Episodes.Value.Select(e => e.FinaleType)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_Quality", episodeFile.Quality.Quality.Name);
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_QualityVersion", episodeFile.Quality.Revision.Version.ToString());
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_ReleaseGroup", episodeFile.ReleaseGroup ?? string.Empty);
|
||||
@@ -207,6 +208,7 @@ namespace NzbDrone.Core.Notifications.CustomScript
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_EpisodeAirDatesUtc", string.Join(",", episodes.Select(e => e.AirDateUtc)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_EpisodeTitles", string.Join("|", episodes.Select(e => e.Title)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_EpisodeOverviews", string.Join("|", episodes.Select(e => e.Overview)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_FinaleTypes", string.Join("|", episodes.Select(e => e.FinaleType)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_Qualities", string.Join("|", episodeFiles.Select(f => f.Quality.Quality.Name)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_QualityVersions", string.Join("|", episodeFiles.Select(f => f.Quality.Revision.Version)));
|
||||
environmentVariables.Add("Sonarr_EpisodeFile_ReleaseGroups", string.Join("|", episodeFiles.Select(f => f.ReleaseGroup)));
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace NzbDrone.Core.Notifications.Webhook
|
||||
AirDateUtc = episode.AirDateUtc;
|
||||
SeriesId = episode.SeriesId;
|
||||
TvdbId = episode.TvdbId;
|
||||
FinaleType = episode.FinaleType;
|
||||
}
|
||||
|
||||
public int Id { get; set; }
|
||||
@@ -31,5 +32,6 @@ namespace NzbDrone.Core.Notifications.Webhook
|
||||
public DateTime? AirDateUtc { get; set; }
|
||||
public int SeriesId { get; set; }
|
||||
public int TvdbId { get; set; }
|
||||
public string FinaleType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,8 @@ namespace NzbDrone.Core.Notifications.Webhook
|
||||
public int TvMazeId { get; set; }
|
||||
public int TmdbId { get; set; }
|
||||
public string ImdbId { get; set; }
|
||||
public HashSet<int> MalIds { get; set; }
|
||||
public HashSet<int> AniListIds { get; set; }
|
||||
public SeriesTypes Type { get; set; }
|
||||
public int Year { get; set; }
|
||||
public List<string> Genres { get; set; }
|
||||
@@ -36,6 +38,8 @@ namespace NzbDrone.Core.Notifications.Webhook
|
||||
TvMazeId = series.TvMazeId;
|
||||
TmdbId = series.TmdbId;
|
||||
ImdbId = series.ImdbId;
|
||||
MalIds = series.MalIds;
|
||||
AniListIds = series.AniListIds;
|
||||
Type = series.SeriesType;
|
||||
Year = series.Year;
|
||||
Genres = series.Genres;
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace NzbDrone.Core.Parser
|
||||
new RegexReplace(@".*?[_. ](S\d{2}(?:E\d{2,4})*[_. ].*)", "$1", RegexOptions.Compiled | RegexOptions.IgnoreCase)
|
||||
};
|
||||
|
||||
private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_)(?<english>\b(?:ing|eng)\b)|(?<italian>\b(?:ita|italian)\b)|(?<german>(?:swiss)?german\b|videomann|ger[. ]dub|\bger\b)|(?<flemish>flemish)|(?<greek>greek)|(?<french>(?:\W|_|\b)(?:FR|VF|VF2|VFF|VFI|VFQ|TRUEFRENCH|FRENCH|FRE|FRA)(?:\W|_|\b))|(?<russian>\b(?:rus|ru)\b)|(?<hungarian>\b(?:HUNDUB|HUN)\b)|(?<hebrew>\bHebDub\b)|(?<polish>\b(?:PL\W?DUB|DUB\W?PL|LEK\W?PL|PL\W?LEK)\b)|(?<chinese>\[(?:CH[ST]|BIG5|GB)\]|简|繁|字幕)|(?<bulgarian>\bbgaudio\b)|(?<spanish>\b(?:español|castellano|esp|spa(?!\(Latino\)))\b)|(?<ukrainian>\b(?:\dx?)?(?:ukr))|(?<thai>\b(?:THAI)\b)|(?<romanian>\b(?:RoDubbed|ROMANIAN)\b)|(?<catalan>[-,. ]cat[. ](?:DD|subs)|\b(?:catalan|catalán)\b)|(?<latvian>\b(?:lat|lav|lv)\b)|(?<turkish>\b(?:tur)\b)|(?<urdu>\burdu\b)|(?<romansh>\b(?:romansh|rumantsch|romansch)\b)|(?<original>\b(?:orig|original)\b)",
|
||||
private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_)(?<english>\b(?:ing|eng)\b)|(?<italian>\b(?:ita|italian)\b)|(?<german>(?:swiss)?german\b|videomann|ger[. ]dub|\bger\b)|(?<flemish>flemish)|(?<greek>greek)|(?<french>(?:\W|_|\b)(?:FR|VF|VF2|VFF|VFI|VFQ|TRUEFRENCH|FRENCH|FRE|FRA)(?:\W|_|\b))|(?<russian>\b(?:rus|ru)\b)|(?<hungarian>\b(?:HUNDUB|HUN)\b)|(?<hebrew>\bHebDub\b)|(?<polish>\b(?:PL\W?DUB|DUB\W?PL|LEK\W?PL|PL\W?LEK)\b)|(?<chinese>\[(?:CH[ST]|BIG5|GB)\]|简|繁|字幕)|(?<bulgarian>\bbgaudio\b)|(?<spanish>\b(?:español|castellano|esp|spa(?!\(Latino\)))\b)|(?<ukrainian>\b(?:\dx?)?(?:ukr))|(?<thai>\b(?:THAI)\b)|(?<romanian>\b(?:RoDubbed|ROMANIAN)\b)|(?<catalan>[-,. ]cat[. ](?:DD|subs)|\b(?:catalan|catalán)\b)|(?<latvian>\b(?:lat|lav|lv)\b)|(?<turkish>\b(?:tur)\b)|(?<urdu>\burdu\b)|(?<romansh>\b(?:romansh|rumantsch|romansch)\b)|(?<japanese>\(JA\))|(?<original>\b(?:orig|original)\b)",
|
||||
RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
|
||||
private static readonly Regex CaseSensitiveLanguageRegex = new Regex(@"(?:(?i)(?<!SUB[\W|_|^]))(?:(?<lithuanian>\bLT\b)|(?<czech>\bCZ\b)|(?<polish>\bPL\b)|(?<bulgarian>\bBG\b)|(?<slovak>\bSK\b)|(?<german>\bDE\b))(?:(?i)(?![\W|_|^]SUB))",
|
||||
@@ -496,6 +496,11 @@ namespace NzbDrone.Core.Parser
|
||||
languages.Add(Language.Romansh);
|
||||
}
|
||||
|
||||
if (match.Groups["japanese"].Success)
|
||||
{
|
||||
languages.Add(Language.Japanese);
|
||||
}
|
||||
|
||||
if (match.Groups["original"].Success)
|
||||
{
|
||||
languages.Add(Language.Original);
|
||||
|
||||
@@ -35,6 +35,8 @@ public class SeriesResource : RestResource
|
||||
public int TvRageId { get; set; }
|
||||
public int TvMazeId { get; set; }
|
||||
public int TmdbId { get; set; }
|
||||
public HashSet<int>? MalIds { get; set; }
|
||||
public HashSet<int>? AniListIds { get; set; }
|
||||
public DateTime? FirstAired { get; set; }
|
||||
public DateTime? LastAired { get; set; }
|
||||
public SeriesTypes SeriesType { get; set; }
|
||||
@@ -81,6 +83,8 @@ public static class SeriesResourceMapper
|
||||
TvRageId = model.TvRageId,
|
||||
TvMazeId = model.TvMazeId,
|
||||
TmdbId = model.TmdbId,
|
||||
MalIds = model.MalIds,
|
||||
AniListIds = model.AniListIds,
|
||||
FirstAired = model.FirstAired,
|
||||
LastAired = model.LastAired,
|
||||
SeriesType = model.SeriesType,
|
||||
@@ -122,6 +126,8 @@ public static class SeriesResourceMapper
|
||||
TvRageId = resource.TvRageId,
|
||||
TvMazeId = resource.TvMazeId,
|
||||
TmdbId = resource.TmdbId,
|
||||
MalIds = resource.MalIds,
|
||||
AniListIds = resource.AniListIds,
|
||||
FirstAired = resource.FirstAired,
|
||||
SeriesType = resource.SeriesType,
|
||||
CleanTitle = resource.CleanTitle,
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace Sonarr.Http.Authentication
|
||||
|
||||
private void LogSuccess(HttpRequest context, string username)
|
||||
{
|
||||
_authLogger.Info("Auth-Success ip {0} username '{1}'", context.GetRemoteIP(), username);
|
||||
_authLogger.Debug("Auth-Success ip {0} username '{1}'", context.GetRemoteIP(), username);
|
||||
}
|
||||
|
||||
private void LogLogout(HttpRequest context, string username)
|
||||
|
||||
Reference in New Issue
Block a user