private void DeleteCachedFiles() { var files = FanArtArtistImageSpec.GetAllFileArtistImagePaths(); foreach (var file in files) { try { File.Delete(file); } catch (Exception e) { if (e is DirectoryNotFoundException || e is IOException || e is UnauthorizedAccessException) { Hyena.Log.Debug(String.Format("Could not delete file {0}", file)); Hyena.Log.Warning(e); } else { throw; } } } }
private bool SaveArtistImage(string uri, string artistMusicbrainzID) { var filename = FanArtArtistImageSpec.CreateArtistImageFileName(artistMusicbrainzID); return(SaveHttpStream(new Uri(uri), FanArtArtistImageSpec.GetPath(filename), null)); }