Exemplo n.º 1
0
        private void setVideoInfo(Microblog blog)
        {
            int videoId = ctx.PostInt("videoId");

            if (videoId <= 0)
            {
                return;
            }

            MicroblogVideoTemp mvt = MicroblogVideoTemp.findById(videoId);

            if (mvt == null)
            {
                return;
            }

            blog.FlashUrl = mvt.FlashUrl;
            blog.PageUrl  = mvt.PageUrl;
            blog.PicUrl   = mvt.PicUrl;
        }
Exemplo n.º 2
0
        public virtual void GetVideoInfo()
        {
            String videoUrl = ctx.Post("videoUrl");

            if (strUtil.IsNullOrEmpty(videoUrl))
            {
                echoError("请填写网址");
                return;
            }

            if (videoUrl.StartsWith("http://") == false)
            {
                videoUrl = "http://" + videoUrl;
            }
            VideoInfo vi = videoSpider.GetInfo(videoUrl);

            MicroblogVideoTemp mvt = new MicroblogVideoTemp(vi);

            mvt.insert();

            echoJsonMsg("", true, mvt.Id.ToString());
        }
Exemplo n.º 3
0
        public void GetVideoInfo()
        {
            String videoUrl = ctx.Post( "videoUrl" );
            if (strUtil.IsNullOrEmpty( videoUrl )) {
                echoError( "请填写网址" );
                return;
            }

            if (videoUrl.StartsWith( "http://" ) == false) videoUrl = "http://" + videoUrl;
            VideoInfo vi = videoSpider.GetInfo( videoUrl );

            MicroblogVideoTemp mvt = new MicroblogVideoTemp( vi );
            mvt.insert();

            echoJsonMsg( "", true, mvt.Id.ToString() );
        }