void btnRehash_Click(object sender, RoutedEventArgs e) { try { if (!VM_ShokoServer.Instance.ServerOnline) { return; } Cursor = Cursors.Wait; foreach (VM_VideoLocal vid in UnrecognisedFiles.Where(a => a.IsHashed())) { VM_ShokoServer.Instance.ShokoServices.RehashFile(vid.VideoLocalID); } Cursor = Cursors.Arrow; MessageBox.Show(Shoko.Commons.Properties.Resources.Unrecognized_AniDBQueue, Shoko.Commons.Properties.Resources.Complete, MessageBoxButton.OK, MessageBoxImage.Information); } catch (Exception ex) { Utils.ShowErrorMessage(ex); } finally { Cursor = Cursors.Arrow; } }
public void RefreshUnrecognisedFiles() { try { UnrecognisedFiles.Clear(); if (!VM_ShokoServer.Instance.ServerOnline) { return; } List <VM_VideoLocal> vids = VM_ShokoServer.Instance.ShokoServices.GetUnrecognisedFiles(VM_ShokoServer.Instance.CurrentUser.JMMUserID).CastList <VM_VideoLocal>(); FileCount = vids.Count; foreach (VM_VideoLocal vid in vids) { UnrecognisedFiles.Add(vid); } } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }
public void RefreshUnrecognisedFiles() { try { UnrecognisedFiles.Clear(); if (!JMMServerVM.Instance.ServerOnline) { return; } List <JMMServerBinary.Contract_VideoLocal> vids = JMMServerVM.Instance.clientBinaryHTTP.GetUnrecognisedFiles(JMMServerVM.Instance.CurrentUser.JMMUserID.Value); FileCount = vids.Count; foreach (JMMServerBinary.Contract_VideoLocal vid in vids) { UnrecognisedFiles.Add(new VideoLocalVM(vid)); } } catch (Exception ex) { Utils.ShowErrorMessage(ex); } }