Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Readarr/commit/3743b023f2e3105309d8101df03d61813edf398e
You should set ROOT_URL correctly, otherwise the web may not work correctly.
6 changed files with
13 additions and
6 deletions
@ -13,13 +13,13 @@ function RootFolderRow(props) {
const {
id ,
path ,
accessible ,
freeSpace ,
unmappedFolders ,
onDeletePress
} = props ;
const unmappedFoldersCount = unmappedFolders . length || '-' ;
const isUnavailable = freeSpace == null ;
const isUnavailable = ! accessible ;
return (
< TableRow >
@ -47,11 +47,11 @@ function RootFolderRow(props) {
< / T a b l e R o w C e l l >
< TableRowCell className = { styles . freeSpace } >
{ freeSpace ? formatBytes ( freeSpace ) : '-' }
{ ( isUnavailable || isNaN ( freeSpace ) ) ? '-' : formatBytes ( freeSpace ) }
< / T a b l e R o w C e l l >
< TableRowCell className = { styles . unmappedFolders } >
{ unmappedFoldersCount }
{ isUnavailable ? '-' : unmappedFolders . length }
< / T a b l e R o w C e l l >
< TableRowCell className = { styles . actions } >
@ -68,6 +68,7 @@ function RootFolderRow(props) {
RootFolderRow . propTypes = {
id : PropTypes . number . isRequired ,
path : PropTypes . string . isRequired ,
accessible : PropTypes . bool . isRequired ,
freeSpace : PropTypes . number ,
unmappedFolders : PropTypes . arrayOf ( PropTypes . object ) . isRequired ,
onDeletePress : PropTypes . func . isRequired
@ -59,6 +59,7 @@ function RootFolders(props) {
key = { rootFolder . id }
id = { rootFolder . id }
path = { rootFolder . path }
accessible = { rootFolder . accessible }
freeSpace = { rootFolder . freeSpace }
unmappedFolders = { rootFolder . unmappedFolders }
/ >
@ -8,6 +8,7 @@ namespace Lidarr.Api.V1.RootFolders
public class RootFolderResource : RestResource
{
public string Path { get ; set ; }
public bool Accessible { get ; set ; }
public long? FreeSpace { get ; set ; }
public long? TotalSpace { get ; set ; }
@ -25,6 +26,7 @@ namespace Lidarr.Api.V1.RootFolders
Id = model . Id ,
Path = model . Path ,
Accessible = model . Accessible ,
FreeSpace = model . FreeSpace ,
TotalSpace = model . TotalSpace ,
UnmappedFolders = model . UnmappedFolders
@ -40,6 +42,7 @@ namespace Lidarr.Api.V1.RootFolders
Id = resource . Id ,
Path = resource . Path ,
//Accessible
//FreeSpace
//UnmappedFolders
} ;
@ -53,6 +53,7 @@ namespace NzbDrone.Core.Datastore
Mapper . Entity < Config > ( ) . RegisterModel ( "Config" ) ;
Mapper . Entity < RootFolder > ( ) . RegisterModel ( "RootFolders" )
. Ignore ( r = > r . Accessible )
. Ignore ( r = > r . FreeSpace )
. Ignore ( r = > r . TotalSpace ) ;
@ -8,6 +8,7 @@ namespace NzbDrone.Core.RootFolders
{
public string Path { get ; set ; }
public bool Accessible { get ; set ; }
public long? FreeSpace { get ; set ; }
public long? TotalSpace { get ; set ; }
@ -183,12 +183,12 @@ namespace NzbDrone.Core.RootFolders
{
if ( _diskProvider . FolderExists ( rootFolder . Path ) )
{
rootFolder . Accessible = true ;
rootFolder . FreeSpace = _diskProvider . GetAvailableSpace ( rootFolder . Path ) ;
rootFolder . TotalSpace = _diskProvider . GetTotalSize ( rootFolder . Path ) ;
rootFolder . UnmappedFolders = GetUnmappedFolders ( rootFolder . Path ) ;
}
} )
. Wait ( 5000 ) ;
} ) . Wait ( 5000 ) ;
}
}
}