mirror of
https://github.com/fergalmoran/Readarr.git
synced 2026-01-04 15:54:33 +00:00
Fixed: (FileList) Prevent double query escaping in search requests
This commit is contained in:
@@ -23,7 +23,11 @@ namespace NzbDrone.Core.Indexers.FileList
|
||||
{
|
||||
var pageableRequests = new IndexerPageableRequestChain();
|
||||
|
||||
pageableRequests.Add(GetRequest("search-torrents", Settings.Categories, string.Format("&type=name&query={0}+{1}", Uri.EscapeDataString(searchCriteria.AuthorQuery.Trim()), Uri.EscapeDataString(searchCriteria.BookQuery.Trim()))));
|
||||
var authorQuery = searchCriteria.AuthorQuery.Replace("+", " ").Trim();
|
||||
var bookQuery = searchCriteria.BookQuery.Replace("+", " ").Trim();
|
||||
|
||||
pageableRequests.Add(GetRequest("search-torrents", Settings.Categories, string.Format("&type=name&query={0}+{1}", Uri.EscapeDataString(authorQuery), Uri.EscapeDataString(bookQuery))));
|
||||
pageableRequests.Add(GetRequest("search-torrents", Settings.Categories, string.Format("&type=name&query={0}+{1}", Uri.EscapeDataString(bookQuery), Uri.EscapeDataString(authorQuery))));
|
||||
|
||||
return pageableRequests;
|
||||
}
|
||||
@@ -32,7 +36,9 @@ namespace NzbDrone.Core.Indexers.FileList
|
||||
{
|
||||
var pageableRequests = new IndexerPageableRequestChain();
|
||||
|
||||
pageableRequests.Add(GetRequest("search-torrents", Settings.Categories, string.Format("&type=name&query={0}", Uri.EscapeDataString(searchCriteria.AuthorQuery.Trim()))));
|
||||
var authorQuery = searchCriteria.AuthorQuery.Replace("+", " ").Trim();
|
||||
|
||||
pageableRequests.Add(GetRequest("search-torrents", Settings.Categories, string.Format("&type=name&query={0}", Uri.EscapeDataString(authorQuery))));
|
||||
|
||||
return pageableRequests;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace NzbDrone.Core.Indexers.FileList
|
||||
|
||||
Categories = new int[]
|
||||
{
|
||||
(int)FileListCategories.DOCS
|
||||
(int)FileListCategories.Docs
|
||||
};
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace NzbDrone.Core.Indexers.FileList
|
||||
|
||||
public enum FileListCategories
|
||||
{
|
||||
[FieldOption]
|
||||
DOCS = 16,
|
||||
[FieldOption(Label = "Docs")]
|
||||
Docs = 16,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user