mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-19 03:10:50 +02:00
Fixed: Add Newznab Indexer with poor caps
This commit is contained in:
parent
a3bf86935d
commit
79d2238652
1 changed files with 21 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using NLog;
|
||||
|
|
@ -127,6 +128,10 @@ private IndexerCapabilities ParseCapabilities(HttpResponse response)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
capabilities.SearchParams = new List<SearchParam> { SearchParam.Q };
|
||||
}
|
||||
|
||||
var xmlMovieSearch = xmlSearching.Element("movie-search");
|
||||
if (xmlMovieSearch == null || xmlMovieSearch.Attribute("available").Value != "yes")
|
||||
|
|
@ -143,6 +148,10 @@ private IndexerCapabilities ParseCapabilities(HttpResponse response)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
capabilities.MovieSearchParams = new List<MovieSearchParam> { MovieSearchParam.Q };
|
||||
}
|
||||
|
||||
var xmlTvSearch = xmlSearching.Element("tv-search");
|
||||
if (xmlTvSearch == null || xmlTvSearch.Attribute("available").Value != "yes")
|
||||
|
|
@ -159,6 +168,10 @@ private IndexerCapabilities ParseCapabilities(HttpResponse response)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
capabilities.TvSearchParams = new List<TvSearchParam> { TvSearchParam.Q };
|
||||
}
|
||||
|
||||
var xmlAudioSearch = xmlSearching.Element("audio-search");
|
||||
if (xmlAudioSearch == null || xmlAudioSearch.Attribute("available").Value != "yes")
|
||||
|
|
@ -175,6 +188,10 @@ private IndexerCapabilities ParseCapabilities(HttpResponse response)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
capabilities.MusicSearchParams = new List<MusicSearchParam> { MusicSearchParam.Q };
|
||||
}
|
||||
|
||||
var xmlBookSearch = xmlSearching.Element("book-search");
|
||||
if (xmlBookSearch == null || xmlBookSearch.Attribute("available").Value != "yes")
|
||||
|
|
@ -191,6 +208,10 @@ private IndexerCapabilities ParseCapabilities(HttpResponse response)
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
capabilities.BookSearchParams = new List<BookSearchParam> { BookSearchParam.Q };
|
||||
}
|
||||
}
|
||||
|
||||
var xmlCategories = xmlRoot.Element("categories");
|
||||
|
|
|
|||
Loading…
Reference in a new issue