Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Lidarr/commit/fc6748e7ad961d410802a38108b801eb01720213
You should set ROOT_URL correctly, otherwise the web may not work correctly.
13 changed files with
39 additions and
14 deletions
@ -6,7 +6,7 @@ namespace NzbDrone.Core.Validation
{
public class FolderValidator : PropertyValidator
{
protected override string GetDefaultMessageTemplate ( ) = > "Invalid Path ";
protected override string GetDefaultMessageTemplate ( ) = > "Invalid Path : '{path}' ";
protected override bool IsValid ( PropertyValidatorContext context )
{
@ -15,6 +15,8 @@ namespace NzbDrone.Core.Validation
return false ;
}
context . MessageFormatter . AppendArgument ( "path" , context . PropertyValue . ToString ( ) ) ;
return context . PropertyValue . ToString ( ) . IsPathValid ( PathValidationType . CurrentOs ) ;
}
}
@ -14,7 +14,7 @@ namespace NzbDrone.Core.Validation.Paths
_artistService = artistService ;
}
protected override string GetDefaultMessageTemplate ( ) = > "Path is an ancestor of an existing artist";
protected override string GetDefaultMessageTemplate ( ) = > "Path '{path}' is an ancestor of an existing artist";
protected override bool IsValid ( PropertyValidatorContext context )
{
@ -23,6 +23,8 @@ namespace NzbDrone.Core.Validation.Paths
return true ;
}
context . MessageFormatter . AppendArgument ( "path" , context . PropertyValue . ToString ( ) ) ;
return ! _artistService . AllArtistPaths ( ) . Any ( s = > context . PropertyValue . ToString ( ) . IsParentPath ( s . Value ) ) ;
}
}
@ -14,7 +14,7 @@ namespace NzbDrone.Core.Validation.Paths
_artistService = artistService ;
}
protected override string GetDefaultMessageTemplate ( ) = > "Path is already configured for an existing artist";
protected override string GetDefaultMessageTemplate ( ) = > "Path '{path}' is already configured for an existing artist";
protected override bool IsValid ( PropertyValidatorContext context )
{
@ -23,6 +23,8 @@ namespace NzbDrone.Core.Validation.Paths
return true ;
}
context . MessageFormatter . AppendArgument ( "path" , context . PropertyValue . ToString ( ) ) ;
dynamic instance = context . ParentContext . InstanceToValidate ;
var instanceId = ( int ) instance . Id ;
@ -12,7 +12,7 @@ namespace NzbDrone.Core.Validation.Paths
_diskProvider = diskProvider ;
}
protected override string GetDefaultMessageTemplate ( ) = > "File does not exist";
protected override string GetDefaultMessageTemplate ( ) = > "File '{file}' does not exist";
protected override bool IsValid ( PropertyValidatorContext context )
{
@ -21,6 +21,8 @@ namespace NzbDrone.Core.Validation.Paths
return false ;
}
context . MessageFormatter . AppendArgument ( "file" , context . PropertyValue . ToString ( ) ) ;
return _diskProvider . FileExists ( context . PropertyValue . ToString ( ) ) ;
}
}
@ -13,7 +13,7 @@ namespace NzbDrone.Core.Validation.Paths
_diskProvider = diskProvider ;
}
protected override string GetDefaultMessageTemplate ( ) = > $"Folder is not writable by user {Environment.UserName} ";
protected override string GetDefaultMessageTemplate ( ) = > "Folder '{path}' is not writable by user '{user}' ";
protected override bool IsValid ( PropertyValidatorContext context )
{
@ -22,6 +22,9 @@ namespace NzbDrone.Core.Validation.Paths
return false ;
}
context . MessageFormatter . AppendArgument ( "path" , context . PropertyValue . ToString ( ) ) ;
context . MessageFormatter . AppendArgument ( "user" , Environment . UserName ) ;
return _diskProvider . FolderWritable ( context . PropertyValue . ToString ( ) ) ;
}
}
@ -12,7 +12,7 @@ namespace NzbDrone.Core.Validation.Paths
_diskProvider = diskProvider ;
}
protected override string GetDefaultMessageTemplate ( ) = > "Path does not exist";
protected override string GetDefaultMessageTemplate ( ) = > "Path '{path}' does not exist";
protected override bool IsValid ( PropertyValidatorContext context )
{
@ -21,6 +21,8 @@ namespace NzbDrone.Core.Validation.Paths
return false ;
}
context . MessageFormatter . AppendArgument ( "path" , context . PropertyValue . ToString ( ) ) ;
return _diskProvider . FolderExists ( context . PropertyValue . ToString ( ) ) ;
}
}
@ -15,7 +15,7 @@ namespace NzbDrone.Core.Validation.Paths
public class PathValidator : PropertyValidator
{
protected override string GetDefaultMessageTemplate ( ) = > "Invalid Path ";
protected override string GetDefaultMessageTemplate ( ) = > "Invalid Path : '{path}' ";
protected override bool IsValid ( PropertyValidatorContext context )
{
@ -24,6 +24,8 @@ namespace NzbDrone.Core.Validation.Paths
return false ;
}
context . MessageFormatter . AppendArgument ( "path" , context . PropertyValue . ToString ( ) ) ;
return context . PropertyValue . ToString ( ) . IsPathValid ( PathValidationType . CurrentOs ) ;
}
}
@ -13,18 +13,20 @@ namespace NzbDrone.Core.Validation.Paths
_configService = configService ;
}
protected override string GetDefaultMessageTemplate ( ) = > "Path is {relationship} configured recycle bin folder";
protected override string GetDefaultMessageTemplate ( ) = > "Path '{path}' is {relationship} configured recycle bin folder";
protected override bool IsValid ( PropertyValidatorContext context )
{
var recycleBin = _configService . RecycleBin ;
var folder = context . PropertyValue . ToString ( ) ;
if ( context . PropertyValue = = null | | recycleBin . IsNullOrWhiteSpace ( ) )
{
return true ;
}
var folder = context . PropertyValue . ToString ( ) ;
context . MessageFormatter . AppendArgument ( "path" , folder ) ;
if ( recycleBin . PathEquals ( folder ) )
{
context . MessageFormatter . AppendArgument ( "relationship" , "set to" ) ;
@ -14,7 +14,7 @@ namespace NzbDrone.Core.Validation.Paths
_rootFolderService = rootFolderService ;
}
protected override string GetDefaultMessageTemplate ( ) = > "Path is an ancestor of an existing root folder";
protected override string GetDefaultMessageTemplate ( ) = > "Path '{path}' is an ancestor of an existing root folder";
protected override bool IsValid ( PropertyValidatorContext context )
{
@ -23,6 +23,8 @@ namespace NzbDrone.Core.Validation.Paths
return true ;
}
context . MessageFormatter . AppendArgument ( "path" , context . PropertyValue . ToString ( ) ) ;
return ! _rootFolderService . All ( ) . Any ( s = > context . PropertyValue . ToString ( ) . IsParentPath ( s . Path ) ) ;
}
}
@ -13,7 +13,7 @@ namespace NzbDrone.Core.Validation.Paths
_rootFolderService = rootFolderService ;
}
protected override string GetDefaultMessageTemplate ( ) = > "Path is already configured as a root folder";
protected override string GetDefaultMessageTemplate ( ) = > "Path '{path}' is already configured as a root folder";
protected override bool IsValid ( PropertyValidatorContext context )
{
@ -22,6 +22,8 @@ namespace NzbDrone.Core.Validation.Paths
return true ;
}
context . MessageFormatter . AppendArgument ( "path" , context . PropertyValue . ToString ( ) ) ;
return ! _rootFolderService . All ( ) . Exists ( r = > r . Path . PathEquals ( context . PropertyValue . ToString ( ) ) ) ;
}
}
@ -13,7 +13,7 @@ namespace NzbDrone.Core.Validation.Paths
_appFolderInfo = appFolderInfo ;
}
protected override string GetDefaultMessageTemplate ( ) = > "Path cannot be {relationship} the start up folder";
protected override string GetDefaultMessageTemplate ( ) = > "Path '{path}' cannot be {relationship} the start up folder";
protected override bool IsValid ( PropertyValidatorContext context )
{
@ -24,6 +24,7 @@ namespace NzbDrone.Core.Validation.Paths
var startupFolder = _appFolderInfo . StartUpFolder ;
var folder = context . PropertyValue . ToString ( ) ;
context . MessageFormatter . AppendArgument ( "path" , folder ) ;
if ( startupFolder . PathEquals ( folder ) )
{
@ -6,11 +6,12 @@ namespace NzbDrone.Core.Validation.Paths
{
public class SystemFolderValidator : PropertyValidator
{
protected override string GetDefaultMessageTemplate ( ) = > " I s {relationship} system folder {systemFolder}";
protected override string GetDefaultMessageTemplate ( ) = > " Path '{path}' i s {relationship} system folder {systemFolder}";
protected override bool IsValid ( PropertyValidatorContext context )
{
var folder = context . PropertyValue . ToString ( ) ;
context . MessageFormatter . AppendArgument ( "path" , folder ) ;
foreach ( var systemFolder in SystemFolders . GetSystemFolders ( ) )
{
@ -14,7 +14,7 @@ namespace NzbDrone.Core.Validation
public class UrlValidator : PropertyValidator
{
protected override string GetDefaultMessageTemplate ( ) = > "Invalid Url ";
protected override string GetDefaultMessageTemplate ( ) = > "Invalid Url : '{url}' ";
protected override bool IsValid ( PropertyValidatorContext context )
{
@ -23,6 +23,8 @@ namespace NzbDrone.Core.Validation
return false ;
}
context . MessageFormatter . AppendArgument ( "url" , context . PropertyValue . ToString ( ) ) ;
return context . PropertyValue . ToString ( ) . IsValidUrl ( ) ;
}
}