Skip to content

Commit

Permalink
fix: caching
Browse files Browse the repository at this point in the history
  • Loading branch information
P-Asta committed May 11, 2024
1 parent 213baac commit b034d11
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"title": "ny-music",
"width": 800,
"height": 600,
"decorations": false,
"transparent": true
}
],
Expand Down
6 changes: 3 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ function App() {
useEffect(() => {
if (START == 1) return
START = 1
fetch("https://fback.imnyang.xyz//NY64_Cover/list").then(res => res.text().then(data => {
fetch(`https://fback.imnyang.xyz//NY64_Cover/list?${Date.now()}`).then(res => res.text().then(data => {
setMusics(eval(data))
}));
setInterval(() => {
fetch("https://fback.imnyang.xyz//NY64_Cover/list").then(res => res.text().then(data => {
fetch(`https://fback.imnyang.xyz//NY64_Cover/list?${Date.now()}`).then(res => res.text().then(data => {
setMusics(eval(data))
}));
}, 10000)
Expand Down Expand Up @@ -104,7 +104,7 @@ function App() {

<div id="music">
<div>
<img src={`https://fback.imnyang.xyz//NY64_Cover/Image/${playing}.jpg`} /> {playing}
<img src={`https://fback.imnyang.xyz//NY64_Cover/Image/${playing}.jpg?${Date.now()}`} /> {playing}
</div>
<div>
<input type="range" min="0" max="100" ref={volume} onChange={() => {audioContainer.current.volume = volume.current.value/100}}/>
Expand Down

0 comments on commit b034d11

Please sign in to comment.