Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Lidarr/commit/e6ceafa03b1be4bb9c2e5cb8bf7e510bed2b7799?style=unified&whitespace=ignore-eol
You should set ROOT_URL correctly, otherwise the web may not work correctly.
1 changed files with
17 additions and
11 deletions
@ -20,7 +20,7 @@ namespace Lidarr.Api.V1.System.Backup
private readonly IAppFolderInfo _appFolderInfo ;
private readonly IDiskProvider _diskProvider ;
private static readonly List < string > ValidExtensions = new List < string > { ".zip" , ".db" , ".xml" } ;
private static readonly List < string > ValidExtensions = new ( ) { ".zip" , ".db" , ".xml" } ;
public BackupController ( IBackupService backupService ,
IAppFolderInfo appFolderInfo ,
@ -37,22 +37,28 @@ namespace Lidarr.Api.V1.System.Backup
var backups = _backupService . GetBackups ( ) ;
return backups . Select ( b = > new BackupResource
{
Id = GetBackupId ( b ) ,
Name = b . Name ,
Path = $"/backup/{b.Type.ToString().ToLower()}/{b.Name}" ,
Type = b . Type ,
Size = b . Size ,
Time = b . Time
} )
. OrderByDescending ( b = > b . Time )
. ToList ( ) ;
{
Id = GetBackupId ( b ) ,
Name = b . Name ,
Path = $"/backup/{b.Type.ToString().ToLower()}/{b.Name}" ,
Type = b . Type ,
Size = b . Size ,
Time = b . Time
} )
. OrderByDescending ( b = > b . Time )
. ToList ( ) ;
}
[RestDeleteById]
public void DeleteBackup ( int id )
{
var backup = GetBackup ( id ) ;
if ( backup = = null )
{
throw new NotFoundException ( ) ;
}
var path = GetBackupPath ( backup ) ;
if ( ! _diskProvider . FileExists ( path ) )