Exemple #1
0
 private async void ScannerScanDone(AudioScan sender, ScanCompletedEventArgs e)
 {
     _lib = _scanner.MediaLibrary;
     await MediaRepository.Instance.Save(_lib);
     if (ScanCompleted != null)
         ScanCompleted(e);
 }
Exemple #2
0
        private void AudioScannerFileParsed(AudioScan sender, ScanFileEventArgs e)
        {
            switch (e.State)
            {
            case FileState.Added:
                MediaLibrary.AddTrack(e.Track);
                break;

            case FileState.Updated:
                MediaLibrary.RemoveTrack(e.Path);
                MediaLibrary.AddTrack(e.Track);
                break;

            case FileState.UpdateError:
                MediaLibrary.RemoveTrack(e.Path);
                break;

            case FileState.Removed:
                MediaLibrary.RemoveTrack(e.Path);
                break;
            }
        }
Exemple #3
0
 private void ScannerFileParsed(AudioScan sender, ScanFileEventArgs e)
 {
     if (FileFound != null)
         FileFound(e);
 }
Exemple #4
0
 private void AudioScannerFileParsed(AudioScan sender, ScanFileEventArgs e)
 {
     switch (e.State)
     {
         case FileState.Added:
             MediaLibrary.AddTrack(e.Track);
             break;
         case FileState.Updated:
             MediaLibrary.RemoveTrack(e.Path);
             MediaLibrary.AddTrack(e.Track);
             break;
         case FileState.UpdateError:
             MediaLibrary.RemoveTrack(e.Path);
             break;
         case FileState.Removed:
             MediaLibrary.RemoveTrack(e.Path);
             break;
     }
 }