Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Readarr/commit/c500f7b943ac79f32656af54e8328a53ee7eb88a
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
20 additions and
3 deletions
@ -19,6 +19,7 @@ namespace NzbDrone.Core.Test.MusicTests.ArtistRepositoryTests
{
private ArtistRepository _artistRepo ;
private ArtistMetadataRepository _artistMetadataRepo ;
private int _id = 1 ;
private void AddArtist ( string name )
{
@ -31,8 +32,9 @@ namespace NzbDrone.Core.Test.MusicTests.ArtistRepositoryTests
. With ( a = > a . Id = 0 )
. With ( a = > a . Metadata = metadata )
. With ( a = > a . CleanName = Parser . Parser . CleanArtistName ( name ) )
. With ( a = > a . ForeignArtistId = name )
. With ( a = > a . ForeignArtistId = _id. ToString ( ) )
. BuildNew ( ) ;
_id + + ;
_artistMetadataRepo . Insert ( artist ) ;
_artistRepo . Insert ( artist ) ;
@ -101,5 +103,20 @@ namespace NzbDrone.Core.Test.MusicTests.ArtistRepositoryTests
artist . Should ( ) . NotBeNull ( ) ;
artist . Name . Should ( ) . Be ( name ) ;
}
[Test]
public void should_not_find_artist_if_multiple_artists_have_same_name ( )
{
GivenArtists ( ) ;
string name = "Alice Cooper" ;
AddArtist ( name ) ;
AddArtist ( name ) ;
_artistRepo . All ( ) . Should ( ) . HaveCount ( 4 ) ;
var artist = _artistRepo . FindByName ( Parser . Parser . CleanArtistName ( name ) ) ;
artist . Should ( ) . BeNull ( ) ;
}
}
}
@ -2,6 +2,7 @@
using NzbDrone.Core.Datastore ;
using NzbDrone.Core.Messaging.Events ;
using Marr.Data.QGen ;
using NzbDrone.Common.Extensions ;
namespace NzbDrone.Core.Music
{
@ -43,8 +44,7 @@ namespace NzbDrone.Core.Music
{
cleanName = cleanName . ToLowerInvariant ( ) ;
return Query . Where ( s = > s . CleanName = = cleanName )
. SingleOrDefault ( ) ;
return Query . Where ( s = > s . CleanName = = cleanName ) . ExclusiveOrDefault ( ) ;
}
public Artist GetArtistByMetadataId ( int artistMetadataId )