Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Prowlarr/commit/8f0c872873f27780cde6fe0240949f531a2b71fb
You should set ROOT_URL correctly, otherwise the web may not work correctly.
6 changed files with
27 additions and
0 deletions
@ -92,6 +92,7 @@ namespace NzbDrone.Core.History
history . Data . Add ( "ElapsedTime" , message . Time . ToString ( ) ) ;
history . Data . Add ( "Query" , message . Query . SearchTerm ? ? string . Empty ) ;
history . Data . Add ( "Categories" , string . Join ( "," , message . Query . Categories ) ? ? string . Empty ) ;
history . Data . Add ( "Source" , message . Query . Source ? ? string . Empty ) ;
history . Data . Add ( "Successful" , message . Successful . ToString ( ) ) ;
history . Data . Add ( "QueryResults" , message . Results . HasValue ? message . Results . ToString ( ) : null ) ;
@ -19,5 +19,6 @@ namespace NzbDrone.Core.IndexerSearch.Definitions
public string SearchType { get ; set ; }
public int? Limit { get ; set ; }
public int? Offset { get ; set ; }
public string Source { get ; set ; }
}
}
@ -26,5 +26,6 @@ namespace NzbDrone.Core.IndexerSearch
public string author { get ; set ; }
public string title { get ; set ; }
public string configured { get ; set ; }
public string source { get ; set ; }
}
}
@ -121,6 +121,7 @@ namespace NzbDrone.Core.IndexerSearch
spec . SearchType = query . t ;
spec . Limit = query . limit ;
spec . Offset = query . offset ;
spec . Source = query . source ;
spec . IndexerIds = indexerIds ;
@ -0,0 +1,21 @@
using System.Text.RegularExpressions ;
namespace NzbDrone.Core.Parser
{
public static class UserAgentParser
{
private static readonly Regex AppSourceRegex = new Regex ( @"(?<agent>.*)\/.*\(.*\)" ,
RegexOptions . IgnoreCase | RegexOptions . Compiled ) ;
public static string ParseSource ( string userAgent )
{
var match = AppSourceRegex . Match ( userAgent ) ;
if ( match . Groups [ "agent" ] . Success )
{
return match . Groups [ "agent" ] . Value ;
}
return "Other" ;
}
}
}
@ -4,6 +4,7 @@ using Nancy.ModelBinding;
using NzbDrone.Common.Extensions ;
using NzbDrone.Core.Indexers ;
using NzbDrone.Core.IndexerSearch ;
using NzbDrone.Core.Parser ;
using Prowlarr.Http.REST ;
namespace Prowlarr.Api.V1.Indexers
@ -41,6 +42,7 @@ namespace Prowlarr.Api.V1.Indexers
private object GetNewznabResponse ( NewznabRequest request )
{
var requestType = request . t ;
request . source = UserAgentParser . ParseSource ( Request . Headers . UserAgent ) ;
if ( requestType . IsNullOrWhiteSpace ( ) )
{