You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Lidarr/src/NzbDrone.Core/Parser/Model/ParsedTrackInfo.cs

46 lines
1.4 KiB

using NzbDrone.Common.Extensions;
using NzbDrone.Core.Qualities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NzbDrone.Core.Languages;
namespace NzbDrone.Core.Parser.Model
{
public class ParsedTrackInfo
{
//public int TrackNumber { get; set; }
public string Title { get; set; }
public string ArtistTitle { get; set; }
public string AlbumTitle { get; set; }
public ArtistTitleInfo ArtistTitleInfo { get; set; }
public string ArtistMBId { get; set; }
public string AlbumMBId { get; set; }
public string TrackMBId { get; set; }
public QualityModel Quality { get; set; }
public int[] TrackNumbers { get; set; }
public Language Language { get; set; }
public string ReleaseGroup { get; set; }
public string ReleaseHash { get; set; }
public ParsedTrackInfo()
{
TrackNumbers = new int[0];
}
public override string ToString()
{
string trackString = "[Unknown Track]";
if (TrackNumbers != null && TrackNumbers.Any())
{
trackString = string.Format("T{0}", string.Join("-", TrackNumbers.Select(c => c.ToString("00"))));
}
return string.Format("{0} - {1} - {2}: {3}", ArtistTitle, AlbumTitle, trackString, Quality);
}
}
}