Beispiel #1
0
        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();
        }
Beispiel #2
0
        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;
        }
Beispiel #3
0
 public Song(string SongPath, byte OffCD, Album offAlbum)
 {
     this.oneInstanceUp = offAlbum;
     AbsoluteSongFilePath = SongPath;
     this.OffCD = OffCD;
 }
Beispiel #4
0
        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);
                }
            }
        }