Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/Readarr/commit/038deb0e8d389cf86dd8ceace033d32a881bab0e
You should set ROOT_URL correctly, otherwise the web may not work correctly.
2 changed files with
48 additions and
2 deletions
@ -279,5 +279,51 @@ namespace NzbDrone.Core.Test.MediaFiles.AudioTagServiceFixture
tag . Quality . Should ( ) . NotBeNull ( ) ;
tag . MediaInfo . Should ( ) . NotBeNull ( ) ;
}
private TrackFile GivenPopulatedTrackfile ( )
{
var meta = Builder < ArtistMetadata > . CreateNew ( ) . Build ( ) ;
var artist = Builder < Artist > . CreateNew ( )
. With ( x = > x . Metadata = meta )
. Build ( ) ;
var album = Builder < Album > . CreateNew ( )
. With ( x = > x . Artist = artist )
. Build ( ) ;
var media = Builder < Medium > . CreateListOfSize ( 2 ) . Build ( ) as List < Medium > ;
var release = Builder < AlbumRelease > . CreateNew ( )
. With ( x = > x . Album = album )
. With ( x = > x . Media = media )
. With ( x = > x . Country = new List < string > ( ) )
. With ( x = > x . Label = new List < string > ( ) )
. Build ( ) ;
var tracks = Builder < Track > . CreateListOfSize ( 10 )
. All ( )
. With ( x = > x . AlbumRelease = release )
. With ( x = > x . ArtistMetadata = meta )
. TheFirst ( 5 )
. With ( x = > x . MediumNumber = 1 )
. TheNext ( 5 )
. With ( x = > x . MediumNumber = 2 )
. Build ( ) as List < Track > ;
release . Tracks = tracks ;
var file = Builder < TrackFile > . CreateNew ( )
. With ( x = > x . Tracks = new List < Track > { tracks [ 0 ] } )
. Build ( ) ;
return file ;
}
[Test]
public void get_metadata_should_not_fail_with_missing_country ( )
{
var file = GivenPopulatedTrackfile ( ) ;
var tag = Subject . GetTrackMetadata ( file ) ;
tag . MusicBrainzReleaseCountry . Should ( ) . BeNull ( ) ;
}
}
}
@ -67,7 +67,7 @@ namespace NzbDrone.Core.MediaFiles
return new AudioTag ( path ) ;
}
p rivate AudioTag GetTrackMetadata ( TrackFile trackfile )
p ublic AudioTag GetTrackMetadata ( TrackFile trackfile )
{
var track = trackfile . Tracks . Value [ 0 ] ;
var release = track . AlbumRelease . Value ;
@ -90,7 +90,7 @@ namespace NzbDrone.Core.MediaFiles
OriginalReleaseDate = album . ReleaseDate ,
OriginalYear = ( uint ) album . ReleaseDate ? . Year ,
Publisher = release . Label . FirstOrDefault ( ) ,
MusicBrainzReleaseCountry = IsoCountries . Find ( release . Country . FirstOrDefault ( ) ) .TwoLetterCode ,
MusicBrainzReleaseCountry = IsoCountries . Find ( release . Country . FirstOrDefault ( ) ) ? .TwoLetterCode ,
MusicBrainzReleaseStatus = release . Status . ToLower ( ) ,
MusicBrainzReleaseType = album . AlbumType . ToLower ( ) ,
MusicBrainzReleaseId = release . ForeignReleaseId ,