package router import ( "videoweb/web/api/web_video" "github.com/gin-gonic/gin" ) func videoRouter(router *gin.RouterGroup) { advitise := router.Group("/videoinfo") { advitise.POST("/list", web_video.GetVideoInfo) advitise.POST("/update", web_video.UpdateOneVideoInfo) advitise.POST("/del", web_video.DelOneVideoInfo) advitise.POST("/sync", web_video.SyncVideoInfo) advitise.POST("/syncMediaFile", web_video.SyncVideoFromMediaFile) advitise.POST("/addcoll", web_video.AddOneVideoCollection) advitise.POST("/addTags", web_video.AddVideoTags) advitise.POST("/tag/set", web_video.SetVideoTags) advitise.POST("/recommend/set", web_video.SetVideoRecommend) advitise.POST("/setFakeLikes", web_video.SetVideoFakeLikes) advitise.POST("/setFakeWatchTimes", web_video.SetVideoFakeWatchTimes) advitise.POST("/heat/set", web_video.SetVideoHeat) advitise.POST("/fillZeroFakeFlow", web_video.FillZeroVideoFakeFlow) } videocategory := router.Group("/videocategory") { videocategory.POST("/list", web_video.GetVideoCategory) videocategory.POST("/update", web_video.UpdateOneVideoCategory) videocategory.POST("/del", web_video.DelOneVideoCategory) videocategory.POST("/add", web_video.AddOneVideoCategory) } videotag := router.Group("/videotag") { videotag.POST("/list", web_video.GetVideoTagInfo) videotag.POST("/update", web_video.UpdateOneVideoTagInfo) videotag.POST("/del", web_video.DelOneVideoTagInfo) videotag.POST("/add", web_video.AddOneVideoTagInfo) } videocreater := router.Group("/videocreater") { videocreater.POST("/list", web_video.GetVideoCreater) videocreater.POST("/update", web_video.UpdateOneVideoCreater) videocreater.POST("/del", web_video.DelOneVideoCreater) videocreater.POST("/add", web_video.AddOneVideoCreater) } router.GET("/m3u8/*key", web_video.Play) router.GET("/transm3u8/*key", web_video.TranscodeM3u8) router.GET("/enkey", web_video.Enkey) router.GET("/lsjenkey", web_video.LsjEnkey) router.POST("/videoinfo/transcode", web_video.TranscodeVideo) }