public void RescanManuallyLinkedFiles() { try { // files which have been hashed, but don't have an associated episode VideoLocalRepository repVidLocals = new VideoLocalRepository(); List<VideoLocal> files = repVidLocals.GetManuallyLinkedVideos(); foreach (VideoLocal vl in files) { CommandRequest_ProcessFile cmd = new CommandRequest_ProcessFile(vl.VideoLocalID, true); cmd.Save(); } } catch (Exception ex) { logger.ErrorException(ex.Message, ex); } }
public List<Contract_VideoLocal> GetManuallyLinkedFiles(int userID) { List<Contract_VideoLocal> contracts = new List<Contract_VideoLocal>(); try { VideoLocalRepository repVids = new VideoLocalRepository(); foreach (VideoLocal vid in repVids.GetManuallyLinkedVideos()) { contracts.Add(vid.ToContract(userID)); } } catch (Exception ex) { logger.ErrorException(ex.ToString(), ex); } return contracts; }