mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-21 23:32:27 +00:00
parent
85e62caccf
commit
a48dd4456d
1 changed files with 1 additions and 5 deletions
|
@ -25,7 +25,6 @@ public class SkyHookProxy : IProvideArtistInfo, ISearchForNewArtist, IProvideAlb
|
|||
private readonly IMetadataProfileService _metadataProfileService;
|
||||
private readonly ICached<HashSet<string>> _cache;
|
||||
|
||||
private static readonly List<string> NonAudioMedia = new List<string> { "DVD", "DVD-Video", "Blu-ray", "HD-DVD", "VCD", "SVCD", "UMD", "VHS" };
|
||||
private static readonly List<string> SkippedTracks = new List<string> { "[data track]" };
|
||||
|
||||
public SkyHookProxy(IHttpClient httpClient,
|
||||
|
@ -496,11 +495,8 @@ private static AlbumRelease MapRelease(ReleaseResource resource, Dictionary<stri
|
|||
}
|
||||
}
|
||||
|
||||
// Skip non-audio media
|
||||
var audioMediaNumbers = allMedia.Where(x => !NonAudioMedia.Contains(x.Format)).Select(x => x.Number);
|
||||
|
||||
// Get tracks on the audio media and omit any that are skipped
|
||||
release.Tracks = allTracks.Where(x => audioMediaNumbers.Contains(x.MediumNumber) && !SkippedTracks.Contains(x.Title)).ToList();
|
||||
release.Tracks = allTracks.Where(x => !SkippedTracks.Contains(x.Title)).ToList();
|
||||
release.TrackCount = release.Tracks.Value.Count;
|
||||
|
||||
// Only include the media that contain the tracks we have selected
|
||||
|
|
Loading…
Reference in a new issue