Esempio n. 1
0
        internal void WriteToTag(Tag tag)
        {
            tag.Label       = Label;
            tag.Album       = Name;
            tag.AlbumArtist = AlbumArtist.GetName(Artist.NameFormats.Last_First);
            tag.AlbumID     = ID;
            tag.AlbumType   = AlbumType;
            tag.IsComplete  = IsComplete;
            tag.IsInIpod    = IsInIpod;

            tag.AlbumPicture = GetAlbumCover();
            //if (IO.File.Exists(t.AssociatedAlbum.GetFilePath(Album.FilePaths.AlbumCoverPath_Auto)))
            //{
            //    tag.AlbumPicture = new Bitmap(t.AssociatedAlbum.GetFilePath(Album.FilePaths.AlbumCoverPath_Auto));
            //}
        }
Esempio n. 2
0
        public void RenameFiles()
        {
            foreach (Track t in Tracks)
            {
                t.RenameFile();
            }

            string new_path              = "";
            string artist_part           = PathUtils.FixPathString(AlbumArtist.GetName(Artist.NameFormats.Last_First));
            string albumname_part        = PathUtils.FixPathString(this.Name);
            string artist_albumname_part = Path.Combine(artist_part, albumname_part);

            if (AlbumType == AlbumType.ArtistAlbum)
            {
                new_path = Path.Combine("Collection II", artist_albumname_part);
            }
            else if (AlbumType == AlbumType.ComposerAlbum)
            {
                albumname_part = PathUtils.FixPathString(
                    System.Text.RegularExpressions.Regex.Replace(this.Name, @"^(\w)+:\s", ""));
                artist_albumname_part = Path.Combine(artist_part, albumname_part);
                new_path = Path.Combine("Collection I", artist_albumname_part);
            }
            else if (AlbumType == AlbumType.VariousArtistAlbum)
            {
                new_path = Path.Combine("Collection III", albumname_part);
            }

            new_path = Path.Combine(Path.GetDirectoryName(Location), new_path);

            Directory.CreateDirectory(Path.GetDirectoryName(new_path));
            Directory.Move(Location, new_path);

            Location = new_path;
            Update();
        }