public virtual void Process(object obj) { string trackNumberText = TrackNumberGenerator.ApplyPattern(TrackNumber, TrackCount); Logger.WriteLine(Tokens.InfoVerbose, "Creating track number " + trackNumberText); new TagEditor(obj as Tag).TrackNumber = trackNumberText; }
private static IDictionary <FrameMeaning, object> CreateObjects( ID3WebQueryBase.Release release, int index, TrackNumberGenerator trackNumberGenerator) { IDictionary <FrameMeaning, object> result = new Dictionary <FrameMeaning, object>(); result[FrameMeaning.Artist] = release.Artist; result[FrameMeaning.Album] = release.Title; result[FrameMeaning.TrackNumber] = trackNumberGenerator.ApplyPattern(index + 1, release.Tracks.Count()); result[FrameMeaning.Title] = release.Tracks.ElementAt(index).Title; result[FrameMeaning.ReleaseYear] = release.Year; if (release.CoverArt != null) { result[FrameMeaning.Picture] = release.CoverArt; } return(result); }