Ejemplo n.º 1
0
        private void onLocalDownloadPath(string path)
        {
            Logger.Default.Trace("获取本地视频信息,Path:{0}", path);
            LocalVideosInfoPacket packet = FolderManager.GetLocalVideoInfoPacket(path);

            send(ParamCode.LocalDownSource, LocalVideosInfoPacket.Encode(packet));
        }
Ejemplo n.º 2
0
        public void TestFolderManager_GetLocalVideoInfoPacket()
        {
            ExceptionManager.CheckException(() => FolderManager.GetLocalVideoInfoPacket(""));
            ExceptionManager.CheckException(() => FolderManager.GetLocalVideoInfoPacket(@"d:\"));
            var packet = FolderManager.GetLocalVideoInfoPacket(@"D:\读写测试\Time_201607190900_201607191000");

            Assert.AreEqual(new DateTime(2016, 7, 19, 9, 0, 0), packet.TimePeriod.BeginTime);
            Assert.AreEqual(2, packet.ValidTimePeriods.Length);
        }