Misc Updates

pull/6/head
Qstick 4 years ago
parent 88d1a3db6f
commit 66f726bf6f

@ -30,6 +30,7 @@ class SearchIndexRow extends Component {
publishDate,
title,
infoUrl,
downloadUrl,
indexer,
size,
files,
@ -214,8 +215,9 @@ class SearchIndexRow extends Component {
className={styles[column.name]}
>
<IconButton
name={icons.EXTERNAL_LINK}
title={'Website'}
name={icons.DOWNLOAD}
title={'Grab'}
to={downloadUrl}
/>
</VirtualTableRowCell>
);
@ -239,6 +241,7 @@ SearchIndexRow.propTypes = {
publishDate: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
infoUrl: PropTypes.string.isRequired,
downloadUrl: PropTypes.string.isRequired,
indexerId: PropTypes.number.isRequired,
indexer: PropTypes.string.isRequired,
size: PropTypes.number.isRequired,

@ -1,10 +1,8 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using NLog;
using NzbDrone.Common.Extensions;
using NzbDrone.Common.Instrumentation.Extensions;
using NzbDrone.Common.TPL;
using NzbDrone.Core.Indexers;

@ -5,6 +5,10 @@ namespace NzbDrone.Core.Indexers
{
public static class NewznabStandardCategory
{
public static readonly IndexerCategory ZedOther = new IndexerCategory(0000, "Other");
public static readonly IndexerCategory ZedOtherMisc = new IndexerCategory(0010, "Other/Misc");
public static readonly IndexerCategory ZedOtherHashed = new IndexerCategory(0020, "Other/Hashed");
public static readonly IndexerCategory Console = new IndexerCategory(1000, "Console");
public static readonly IndexerCategory ConsoleNDS = new IndexerCategory(1010, "Console/NDS");
public static readonly IndexerCategory ConsolePSP = new IndexerCategory(1020, "Console/PSP");
@ -86,6 +90,7 @@ namespace NzbDrone.Core.Indexers
public static readonly IndexerCategory[] ParentCats =
{
ZedOther,
Console,
Movies,
Audio,
@ -98,6 +103,9 @@ namespace NzbDrone.Core.Indexers
public static readonly IndexerCategory[] AllCats =
{
ZedOther,
ZedOtherHashed,
ZedOtherMisc,
Console,
ConsoleNDS,
ConsolePSP,
@ -173,6 +181,7 @@ namespace NzbDrone.Core.Indexers
static NewznabStandardCategory()
{
ZedOther.SubCategories.AddRange(new List<IndexerCategory> { ZedOtherMisc, ZedOtherHashed });
Console.SubCategories.AddRange(
new List<IndexerCategory>
{

@ -4,7 +4,7 @@ namespace NzbDrone.Core.Parser
{
public static class UserAgentParser
{
private static readonly Regex AppSourceRegex = new Regex(@"(?<agent>.*)\/.*\(.*\)",
private static readonly Regex AppSourceRegex = new Regex(@"(?<agent>.*)\/.*(\(.*\))?",
RegexOptions.IgnoreCase | RegexOptions.Compiled);
public static string ParseSource(string userAgent)
{

@ -1,5 +1,6 @@
using System;
using System.Reflection;
using System.Text;
using System.Threading;
using NLog;
using NzbDrone.Common.Composition;
@ -28,6 +29,8 @@ namespace Prowlarr.Host
throw new TerminateApplicationException("Missing system requirements");
}
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
_container = MainAppContainerBuilder.BuildContainer(startupContext);
_container.Resolve<InitializeLogger>().Initialize();
_container.Resolve<IAppFolderFactory>().Register();

@ -15,6 +15,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="NLog.Extensions.Logging" Version="1.6.5" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="5.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\NzbDrone.Common\Prowlarr.Common.csproj" />

@ -69,9 +69,9 @@ namespace Prowlarr.Api.V1.Indexers
case "music":
case "book":
case "movie":
Response movieResponse = _nzbSearchService.Search(request, new List<int> { indexer.Id }, false).ToXml(indexerInstance.Protocol);
movieResponse.ContentType = "application/rss+xml";
return movieResponse;
Response searchResponse = _nzbSearchService.Search(request, new List<int> { indexer.Id }, false).ToXml(indexerInstance.Protocol);
searchResponse.ContentType = "application/rss+xml";
return searchResponse;
default:
throw new BadRequestException("Function Not Available");
}

@ -51,7 +51,7 @@ namespace Prowlarr.Api.V1.Search
{
try
{
var decisions = _nzbSearhService.Search(new NewznabRequest { q = query, t = "search", cat = string.Join(",", categories) }, indexerIds, true).Releases;
var decisions = _nzbSearhService.Search(new NewznabRequest { q = query, source = "Prowlarr", t = "search", cat = string.Join(",", categories) }, indexerIds, true).Releases;
return MapDecisions(decisions);
}

Loading…
Cancel
Save