Misc Updates

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

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

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

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

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

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

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

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

@ -51,7 +51,7 @@ namespace Prowlarr.Api.V1.Search
{ {
try 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); return MapDecisions(decisions);
} }

Loading…
Cancel
Save