优化代码

This commit is contained in:
dexter
2022-02-07 23:23:27 +08:00
parent d5a61e5c98
commit bc31712b1f
2 changed files with 47 additions and 29 deletions

View File

@@ -60,7 +60,6 @@ func init() {
if plugin := InstallPlugin(config); plugin != nil {
plugin.HandleApi("/list", util.GetJsonHandler(getHDList, time.Second))
plugin.HandleFunc("/pull", func(rw http.ResponseWriter, r *http.Request) {
util.CORS(rw, r)
targetURL := r.URL.Query().Get("target")
streamPath := r.URL.Query().Get("streamPath")
save := r.URL.Query().Get("save")
@@ -111,7 +110,7 @@ func (config *HDLConfig) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
metaData := amf.Object{
"MetaDataCreator": "m7s",
"MetaDataCreator": "m7s" + Version,
"hasVideo": vt != nil,
"hasAudio": at != nil,
"hasMatadata": true,