Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Lidarr/commit/140f3f88c4e5df816f19f14c4b81736c3eaa96e8?style=split&whitespace=ignore-change
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
36 additions and
1 deletions
@ -1,3 +1,4 @@
using System ;
using System.Collections.Generic ;
using System.Collections.Generic ;
using System.Linq ;
using System.Linq ;
using FluentValidation ;
using FluentValidation ;
@ -122,8 +123,18 @@ namespace Lidarr.Api.V1.Artist
private List < ArtistResource > AllArtists ( )
private List < ArtistResource > AllArtists ( )
{
{
var mbId = Request . GetGuidQueryParameter ( "mbId" ) ;
var artistStats = _artistStatisticsService . ArtistStatistics ( ) ;
var artistStats = _artistStatisticsService . ArtistStatistics ( ) ;
var artistsResources = _artistService . GetAllArtists ( ) . ToResource ( ) ;
var artistsResources = new List < ArtistResource > ( ) ;
if ( mbId ! = Guid . Empty )
{
artistsResources . AddIfNotNull ( _artistService . FindById ( mbId . ToString ( ) ) . ToResource ( ) ) ;
}
else
{
artistsResources . AddRange ( _artistService . GetAllArtists ( ) . ToResource ( ) ) ;
}
MapCoversToLocal ( artistsResources . ToArray ( ) ) ;
MapCoversToLocal ( artistsResources . ToArray ( ) ) ;
LinkNextPreviousAlbums ( artistsResources . ToArray ( ) ) ;
LinkNextPreviousAlbums ( artistsResources . ToArray ( ) ) ;
@ -54,5 +54,29 @@ namespace Lidarr.Http.Extensions
return request . Path . StartsWith ( "/MediaCover/" , StringComparison . InvariantCultureIgnoreCase ) | |
return request . Path . StartsWith ( "/MediaCover/" , StringComparison . InvariantCultureIgnoreCase ) | |
request . Path . StartsWith ( "/Content/Images/" , StringComparison . InvariantCultureIgnoreCase ) ;
request . Path . StartsWith ( "/Content/Images/" , StringComparison . InvariantCultureIgnoreCase ) ;
}
}
public static int GetIntegerQueryParameter ( this Request request , string parameter , int defaultValue = 0 )
{
var parameterValue = request . Query [ parameter ] ;
if ( parameterValue . HasValue )
{
return int . Parse ( parameterValue . Value ) ;
}
return defaultValue ;
}
public static Guid GetGuidQueryParameter ( this Request request , string parameter , Guid defaultValue = default )
{
var parameterValue = request . Query [ parameter ] ;
if ( parameterValue . HasValue )
{
return Guid . Parse ( parameterValue . Value ) ;
}
return defaultValue ;
}
}
}
}
}