Exemplo n.º 1
0
        /*public List<Contract_VideoLocalRenamed> RandomFileRenamePreview(int maxResults, int userID, string renameRules)
        {
            List<Contract_VideoLocalRenamed> ret = new List<Contract_VideoLocalRenamed>();
            try
            {
                VideoLocalRepository repVids = new VideoLocalRepository();
                foreach (VideoLocal vid in repVids.GetRandomFiles(maxResults))
                {
                    Contract_VideoLocalRenamed vidRen = new Contract_VideoLocalRenamed();
                    vidRen.VideoLocalID = vid.VideoLocalID;
                    vidRen.VideoLocal = vid.ToContract(userID);
                    vidRen.NewFileName = RenameFileHelper.GetNewFileName(vid, renameRules);
                    ret.Add(vidRen);
                }
            }
            catch (Exception ex)
            {
                logger.ErrorException(ex.ToString(), ex);

            }
            return ret;
        }*/
        public List<Contract_VideoLocal> RandomFileRenamePreview(int maxResults, int userID)
        {
            List<Contract_VideoLocal> ret = new List<Contract_VideoLocal>();
            try
            {
                VideoLocalRepository repVids = new VideoLocalRepository();
                foreach (VideoLocal vid in repVids.GetRandomFiles(maxResults))
                    ret.Add(vid.ToContract(userID));

            }
            catch (Exception ex)
            {
                logger.ErrorException(ex.ToString(), ex);

            }
            return ret;
        }