w.Header().Set("content-type", "text/html")
}
- //cache
- if bp, ok := cache.IsCache("html/streamList/" + p); ok {
- w.Header().Set("Cache-Control", "max-age=60")
- _, _ = w.Write(*bp)
- return
- }
- w = cache.Cache("html/streamList/"+p, time.Minute, w)
-
f := file.New("html/streamList/"+p, 0, true)
if !f.IsExist() || f.IsDir() {
w.WriteHeader(http.StatusNotFound)
return
}
+ // mod
+ if info, e := f.Stat(); e == nil && pweb.NotModified(r, w, info.ModTime()) {
+ return
+ }
+
b, _ := f.ReadAll(humanize.KByte, humanize.MByte)
_, _ = w.Write(b)
})
return
}
+ // mod
+ if info, e := f.Stat(); e == nil && pweb.NotModified(r, w, info.ModTime()) {
+ return
+ }
+
b, _ := f.ReadAll(humanize.KByte, humanize.MByte)
_, _ = w.Write(b)
})
return
}
+ // mod
+ if info, e := f.Stat(); e == nil && pweb.NotModified(r, w, info.ModTime()) {
+ return
+ }
+
b, _ := f.ReadAll(humanize.KByte, humanize.MByte)
_, _ = w.Write(b)
})
</head>
<body>
<div class="artplayer-app"></div>
- <script>
- /**
- * @function addDOM 添加节点
- * @version 0.0
- * @param {*} El 添加到哪个元素
- * @param {*} ElN 添加的元素名
- * @param {*} text 元素内的值
- * @param {*} cla 该元素属性,数组,[[属性名,属性值],[..,..],]
- */
- function addDOM(El,ElN,text,cla){
- var d=document.createElement(ElN);
- if(text)d.innerHTML=text;
- for(var i=0;i<cla.length;i++)d.setAttribute(cla[i][0],cla[i][1]);
- El.appendChild(d);
- }
- addDOM(document.body, "script", "", [["src", "bundle.js?_="+new Date().getTime()]])
- </script>
+ <script src="bundle.js"></script>
</body>
</html>
\ No newline at end of file
require (
github.com/gotk3/gotk3 v0.6.4
github.com/mdp/qrterminal/v3 v3.2.0
- github.com/qydysky/part v0.28.20240721025108
+ github.com/qydysky/part v0.28.20240721124143
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
golang.org/x/text v0.16.0
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/qydysky/biliApi v0.0.0-20240707084224-dd146610f462 h1:SblV/m+0mx6QgH2YYvdjE5QxhyfE/EOQglJ1PGd3x3E=
github.com/qydysky/biliApi v0.0.0-20240707084224-dd146610f462/go.mod h1:om024vfxALQ5vxsbaGoMm8IS0esLYBnEOpJI8FsGoDg=
-github.com/qydysky/part v0.28.20240721025108 h1:3E8dRdVYfYDMNgMG1mIVigrj0i3fi4LsriKTHpo+EXc=
-github.com/qydysky/part v0.28.20240721025108/go.mod h1:dgagZnPYRFZDbt7XJf7nADOJLoYwlebD9B8Z8g5aHhI=
+github.com/qydysky/part v0.28.20240721124143 h1:PX5BIhrrrnKN/VJFJSeg+qzdAPKb+N199vDtPjyNK5g=
+github.com/qydysky/part v0.28.20240721124143/go.mod h1:dgagZnPYRFZDbt7XJf7nADOJLoYwlebD9B8Z8g5aHhI=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE=
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo=
github.com/shirou/gopsutil v3.21.11+incompatible h1:+1+c1VGhc88SSonWP6foOcLhvnKlUeu/erjjvaPEYiI=