private string ApplyFormat(Artist artist, Album album, Song song) { StringBuilder s = new StringBuilder(); Dictionary<string, string> sdf = new Dictionary<string, string>(); //sdf.Add("artist", artist.getChoppedInfo[0]); sdf.Add("year", album.Year); //sdf.Add("albumname", joinString(album.relevantInformation)); sdf.Add("cdCount", album.CDcount.ToString()); sdf.Add("tracknum", song.TrackNum.ToString()); //sdf.Add("trackname", joinString(song.relevantInformation)); return s.ToString(); }
public List<Album> getSubs() { // wenn es unterordner gibt // und wenn diese unterordner mp3s enthalten // dann erhöhe cd counter string[] subDirs = Directory.GetDirectories(AbsoluteAlbumPath); Entities = new List<AbstractInstance>(); List<Album> result = new List<Album>(); int subDirCount = subDirs.Length; for(byte i = 0 ; i < subDirCount; i++ ) { Album s = new Album(subDirs[i] , this.oneInstanceUp); s.CDcount = (byte)subDirCount; s.OffCD = (byte)(i+1); s.getSubs(); result.Add(s); } if (addSongs(AbsoluteAlbumPath)) { result.Add(this); } //CDcount = (byte)result.Count; return result; }
public Song(string SongPath, byte OffCD, Album offAlbum) { this.oneInstanceUp = offAlbum; AbsoluteSongFilePath = SongPath; this.OffCD = OffCD; }
public void getSubs() { //erzeuge alle Alben string[] AlbumFolders = Directory.GetDirectories(ArtistPath); Entities = new List<AbstractInstance>(); foreach (string albumPath in AlbumFolders) { Album dummy = new Album(albumPath, this); List<Album> s = dummy.getSubs(); foreach (var k in s) { Entities.Add(k); } } }