mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
Fix track lookup in integration tests
This commit is contained in:
parent
5765829008
commit
fe0abd527e
2 changed files with 5 additions and 5 deletions
|
@ -46,7 +46,7 @@ namespace NzbDrone.Core.Test.OrganizerTests.FileNameBuilderTests
|
||||||
.With(e => e.AlbumRelease = _release)
|
.With(e => e.AlbumRelease = _release)
|
||||||
.Build();
|
.Build();
|
||||||
|
|
||||||
_trackFiles = new TrackFile { Quality = new QualityModel(Quality.FLAC), ReleaseGroup = "SonarrTest" };
|
_trackFiles = new TrackFile { Quality = new QualityModel(Quality.FLAC), ReleaseGroup = "LidarrTest" };
|
||||||
|
|
||||||
_namingConfig = NamingConfig.Default;
|
_namingConfig = NamingConfig.Default;
|
||||||
_namingConfig.RenameTracks = true;
|
_namingConfig.RenameTracks = true;
|
||||||
|
|
|
@ -297,9 +297,9 @@ namespace NzbDrone.Integration.Test
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EnsureTrackFile(ArtistResource artist, int albumId, int albumReleaseId, int trackId, Quality quality)
|
public void EnsureTrackFile(ArtistResource artist, int albumId, int albumReleaseId, int trackNumber, Quality quality)
|
||||||
{
|
{
|
||||||
var result = Tracks.GetTracksInArtist(artist.Id).Single(v => v.Id == trackId);
|
var result = Tracks.GetTracksInArtist(artist.Id).Single(v => v.AlbumId == albumId && v.AbsoluteTrackNumber == trackNumber);
|
||||||
|
|
||||||
if (result.TrackFile == null)
|
if (result.TrackFile == null)
|
||||||
{
|
{
|
||||||
|
@ -318,14 +318,14 @@ namespace NzbDrone.Integration.Test
|
||||||
ArtistId = artist.Id,
|
ArtistId = artist.Id,
|
||||||
AlbumId = albumId,
|
AlbumId = albumId,
|
||||||
AlbumReleaseId = albumReleaseId,
|
AlbumReleaseId = albumReleaseId,
|
||||||
TrackIds = new List<int> { trackId },
|
TrackIds = new List<int> { trackNumber },
|
||||||
Quality = new QualityModel(quality)
|
Quality = new QualityModel(quality)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Commands.WaitAll();
|
Commands.WaitAll();
|
||||||
|
|
||||||
var track = Tracks.GetTracksInArtist(artist.Id).Single(x => x.Id == trackId);
|
var track = Tracks.GetTracksInArtist(artist.Id).Single(x => x.AlbumId == albumId && x.AbsoluteTrackNumber == trackNumber);
|
||||||
|
|
||||||
track.TrackFileId.Should().NotBe(0);
|
track.TrackFileId.Should().NotBe(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue