Ejemplo n.º 1
0
 ///<summary>
 ///Returns true the track is available, and the IMetaTrack would be castable to IMetaMusic
 ///</summary>
 protected virtual System.Boolean IsAvailable(ref IMetaTrack Track)
 {
     System.String TrackPath = "";
     System.String ArtistDir = this.MusicPath + System.IO.Path.DirectorySeparatorChar + LastManager.RemoveIllegalChars(Track.Artist);
     if (System.IO.Directory.Exists(ArtistDir))
     {
         foreach (System.String Directory in System.IO.Directory.GetDirectories(ArtistDir))
         {
             TrackPath = Directory + System.IO.Path.DirectorySeparatorChar + LastManager.RemoveIllegalChars(Track.Track) + ".mp3";
             if (System.IO.File.Exists(TrackPath))
             {
                 Track = new MetaMusic(TrackPath);
                 return(true);
             }
         }
     }
     return(false);
 }
Ejemplo n.º 2
0
		///<summary>
		///Returns true the track is available, and the IMetaTrack would be castable to IMetaMusic
		///</summary>
		protected virtual System.Boolean IsAvailable(ref IMetaTrack Track)
		{
			System.String TrackPath = "";
			System.String ArtistDir = this.MusicPath + System.IO.Path.DirectorySeparatorChar + LastManager.RemoveIllegalChars(Track.Artist);
			if (System.IO.Directory.Exists(ArtistDir))
			{
				foreach (System.String Directory in System.IO.Directory.GetDirectories(ArtistDir))
				{
					TrackPath = Directory + System.IO.Path.DirectorySeparatorChar + LastManager.RemoveIllegalChars(Track.Track) + ".mp3";
					if (System.IO.File.Exists(TrackPath))
					{
						Track = new MetaMusic(TrackPath);
						return true;
					}
				}
			}
			return false;
		}