mirror of
https://github.com/Radarr/Radarr.git
synced 2024-08-18 08:19:38 +02:00
Merge
This commit is contained in:
commit
7bf44e2771
@ -600,6 +600,7 @@ export const actionHandlers = handleThunks({
|
||||
const promise = createAjaxRequest({
|
||||
url: '/exclusions/bulk',
|
||||
method: 'POST',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify(exclusions)
|
||||
}).request;
|
||||
|
||||
|
@ -18,7 +18,7 @@ public class SearchDefinitionFixture : CoreTest<MovieSearchCriteria>
|
||||
public void should_replace_some_special_characters(string input, string expected)
|
||||
{
|
||||
Subject.SceneTitles = new List<string> { input };
|
||||
Subject.QueryTitles.First().Should().Be(expected);
|
||||
Subject.CleanSceneTitles.First().Should().Be(expected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -85,7 +85,8 @@ public void Block(RemoteMovie remoteMovie, string message)
|
||||
Size = remoteMovie.Release.Size,
|
||||
Indexer = remoteMovie.Release.Indexer,
|
||||
Protocol = remoteMovie.Release.DownloadProtocol,
|
||||
Message = message
|
||||
Message = message,
|
||||
Languages = remoteMovie.ParsedMovieInfo.Languages
|
||||
};
|
||||
|
||||
if (remoteMovie.Release is TorrentInfo torrentRelease)
|
||||
|
@ -19,9 +19,9 @@ public abstract class SearchCriteriaBase
|
||||
public virtual bool UserInvokedSearch { get; set; }
|
||||
public virtual bool InteractiveSearch { get; set; }
|
||||
|
||||
public List<string> QueryTitles => SceneTitles.Select(GetQueryTitle).ToList();
|
||||
public List<string> CleanSceneTitles => SceneTitles.Select(GetCleanSceneTitle).Distinct().ToList();
|
||||
|
||||
public static string GetQueryTitle(string title)
|
||||
public static string GetCleanSceneTitle(string title)
|
||||
{
|
||||
Ensure.That(title, () => title).IsNotNullOrWhiteSpace();
|
||||
|
||||
|
@ -30,7 +30,7 @@ public virtual IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var queryTitle in searchCriteria.QueryTitles)
|
||||
foreach (var queryTitle in searchCriteria.CleanSceneTitles)
|
||||
{
|
||||
var titleYearSearchQuery = string.Format("{0}+{1}", queryTitle, searchCriteria.Movie.Year);
|
||||
pageableRequests.Add(GetRequest("search-torrents", string.Format("&type=name&query={0}", titleYearSearchQuery.Trim())));
|
||||
|
@ -155,7 +155,7 @@ private void AddMovieIdPageableRequests(IndexerPageableRequestChain chain, int m
|
||||
if (SupportsSearch)
|
||||
{
|
||||
chain.AddTier();
|
||||
var queryTitles = TextSearchEngine == "raw" ? searchCriteria.SceneTitles : searchCriteria.QueryTitles;
|
||||
var queryTitles = TextSearchEngine == "raw" ? searchCriteria.SceneTitles : searchCriteria.CleanSceneTitles;
|
||||
foreach (var queryTitle in queryTitles)
|
||||
{
|
||||
var searchQuery = queryTitle;
|
||||
|
@ -60,7 +60,7 @@ public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchC
|
||||
{
|
||||
var pageableRequests = new IndexerPageableRequestChain();
|
||||
|
||||
foreach (var queryTitle in searchCriteria.QueryTitles)
|
||||
foreach (var queryTitle in searchCriteria.CleanSceneTitles)
|
||||
{
|
||||
pageableRequests.Add(GetPagedRequests(MaxPages, PrepareQuery(string.Format("{0} {1}", queryTitle, searchCriteria.Movie.Year))));
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchC
|
||||
{
|
||||
var pageableRequests = new IndexerPageableRequestChain();
|
||||
|
||||
foreach (var queryTitle in searchCriteria.QueryTitles)
|
||||
foreach (var queryTitle in searchCriteria.CleanSceneTitles)
|
||||
{
|
||||
pageableRequests.Add(GetPagedRequests(string.Format("{0}",
|
||||
queryTitle)));
|
||||
|
@ -35,7 +35,7 @@ public IndexerPageableRequestChain GetSearchRequests(MovieSearchCriteria searchC
|
||||
}
|
||||
else if (searchCriteria.Movie.Year > 0)
|
||||
{
|
||||
foreach (var queryTitle in searchCriteria.QueryTitles)
|
||||
foreach (var queryTitle in searchCriteria.CleanSceneTitles)
|
||||
{
|
||||
pageableRequests.Add(GetRequest(string.Format("{0}&year={1}", queryTitle, searchCriteria.Movie.Year)));
|
||||
}
|
||||
|
@ -204,7 +204,11 @@ private TrackedDownload Remove(int id, bool removeFromClient, bool blocklist)
|
||||
|
||||
if (pendingRelease != null)
|
||||
{
|
||||
_blocklistService.Block(pendingRelease.RemoteMovie, "Pending release manually blocklisted");
|
||||
if (blocklist)
|
||||
{
|
||||
_blocklistService.Block(pendingRelease.RemoteMovie, "Pending release manually blocklisted");
|
||||
}
|
||||
|
||||
_pendingReleaseService.RemovePendingQueueItems(pendingRelease.Id);
|
||||
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user