Ejemplo n.º 1
0
 public string GetTorrentFileName(GroupTorrentInfo torrentInfo)
 {
     int year = torrentInfo.RemasterYear != 0 ? torrentInfo.RemasterYear : this.Group.Year;
     string suggestedName = this.Group.MusicInfo.JoinedArtists + " - " + this.Group.Name + " - " + year + " (" + torrentInfo.Media + " - " + torrentInfo.Format + " - " + torrentInfo.Encoding + ").torrent";
     StringBuilder finalName = new StringBuilder();
     char[] invalidChars = Path.GetInvalidFileNameChars();
     foreach (char c in suggestedName)
     {
         if (!invalidChars.Contains(c))
         {
             finalName.Append(c);
         }
     }
     return finalName.ToString();
 }
Ejemplo n.º 2
0
        public string GetTorrentFileName(GroupTorrentInfo torrentInfo)
        {
            int           year          = torrentInfo.RemasterYear != 0 ? torrentInfo.RemasterYear : this.Group.Year;
            string        suggestedName = this.Group.MusicInfo.JoinedArtists + " - " + this.Group.Name + " - " + year + " (" + torrentInfo.Media + " - " + torrentInfo.Format + " - " + torrentInfo.Encoding + ").torrent";
            StringBuilder finalName     = new StringBuilder();

            char[] invalidChars = Path.GetInvalidFileNameChars();
            foreach (char c in suggestedName)
            {
                if (!invalidChars.Contains(c))
                {
                    finalName.Append(c);
                }
            }
            return(finalName.ToString());
        }