Example #1
0
 private static bool CanAddMedia(string filename, MediaType mediaType, CanAddMediaArgs args)
 {
     try
     {
         return(Directory.Exists(filename) ? ZuneLibrary.CanAddFromFolder(filename) && (CanAddMedia(Directory.GetFiles(filename), mediaType, args) || CanAddMedia(Directory.GetDirectories(filename), mediaType, args)) : ZuneLibrary.CanAddMedia(filename, (EMediaTypes)mediaType));
     }
     catch (UnauthorizedAccessException ex)
     {
         return(false);
     }
     catch (IOException ex)
     {
         return(false);
     }
 }