Ejemplo n.º 1
0
 public bool Add(Mp3FileInfo file)
 {
     if(file.TaglibFile.Properties.Duration.TotalSeconds <= TimeRemaining)
     {
         Tracks.Add(file);
         return true;
     }
     else
     {
         return false;
     }
 }
Ejemplo n.º 2
0
 public bool Add(Mp3FileInfo file)
 {
     if(file.TaglibFile.Properties.Duration.TotalSeconds <= TimeRemaining)
     {
         Tracks.Add(file);
         return true;
     }
     else
     {
         return false;
     }
 }
Ejemplo n.º 3
0
        private void SuggestNextTrack()
        {
            var timeSpan = TimeSpan.FromSeconds(tracklist.TimeRemaining);
            txtRemaining.Text = timeSpan.TotalMinutes.ToString() + " minutes remain";
            try
            {
                suggestion = filePathProvider.Next();

                if(suggestion.TaglibFile != null) { 
                    if(suggestion.TaglibFile.Tag.AlbumArtists.Count() > 0)
                    {
                        txtArtist.Text = suggestion.TaglibFile.Tag.JoinedAlbumArtists;
                    }
                    else
                    {
                        txtArtist.Text = suggestion.TaglibFile.Tag.JoinedPerformers;
                    }
                
                    txtTitle.Text = suggestion.TaglibFile.Tag.Title;
                }
                else
                {
                    txtArtist.Text = "Unknown";
                    txtTitle.Tag = "Unknown";
                }

                lblPath.Text = suggestion.Path;
                grdSelectTrack.Visibility = Visibility.Visible;
                lblDirectoryStatus.Text = filePathProvider.FileCount.ToString() + " filer tillgängliga";
            }
            catch (NoMoreFilesException)
            {
                MessageBox.Show("No more files available");
                grdSelectTrack.Visibility = Visibility.Hidden;
            }
        }
Ejemplo n.º 4
0
 public void ReInsert(Mp3FileInfo file)
 {
     files.Add(file.Path);
 }
 public void ReInsert(Mp3FileInfo file)
 {
     files.Add(file.Path);
 }