是否是音视频
(path string)
| 115 | |
| 116 | // 是否是音视频 |
| 117 | func (this *StaticController) isMedia(path string) (yes bool) { |
| 118 | var videoOK, audioOK bool |
| 119 | ext := strings.ToLower(filepath.Ext(path)) |
| 120 | _, videoOK = conf.VideoExt.Load(ext) |
| 121 | _, audioOK = conf.AudioExt.Load(ext) |
| 122 | return audioOK || videoOK |
| 123 | } |
| 124 | |
| 125 | // 是否是书籍项目所有人(书籍项目所有人,可以直链播放音视频) |
| 126 | func (this *StaticController) isBookOwner() (yes bool) { |
no outgoing calls
no test coverage detected