mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-19 07:32:05 +00:00
feat: fix stats for nerds
chore: update wiki links
This commit is contained in:
parent
8b544a6a26
commit
1b8680b863
4 changed files with 14 additions and 11 deletions
|
|
@ -8,7 +8,7 @@ No. See above. The miniplayer provides feedback that something is happening in t
|
|||
No. See above. This app is also meant to seed the torrents the user downloads, if you want freeleech go to some private tracker.
|
||||
|
||||
## **Is this safe?**
|
||||
I recommend you read the [guide about basics of piracy.](https://wiki.piracy.moe/guides/torrenting)
|
||||
I recommend you read the [guide about basics of piracy.](https://thewiki.moe/guides/torrenting)
|
||||
|
||||
## **Will this replace streaming sites?**
|
||||
Not really. The underlying source of video are still torrents, which aren't always seeded, so anime that's a few years old might not play back smoothly.
|
||||
|
|
@ -20,7 +20,7 @@ No. You can however migrate MAL to AL, see [this guide.](https://anilist.co/foru
|
|||
One of four reasons:
|
||||
- the anime isn't seeded
|
||||
- your download speed isn't fast enough
|
||||
- your ISP blocks Nyaa, see [this tutorial](https://wiki.piracy.moe/en/tutorials/unblock) for a fix
|
||||
- your ISP blocks Nyaa, see [this tutorial](https://thewiki.moe/en/tutorials/unblock) for a fix
|
||||
- the app couldn't find a matching torrent for the anime
|
||||
- you can POTENTIALLY fix this by disabling `Trusted Only` in `RSS Settings`, but this might cause false-positives when finding torrents, so I'd also disable `Auto-play torrents`, and pick torrents manually.
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@
|
|||
},
|
||||
"build": {
|
||||
"electronDownload": {
|
||||
"mirror": "https://github.com/86b7573af6c8/adf9376faf73/releases/download/",
|
||||
"mirror": "https://github.com/aa910d571134/feb7c2e1a10f/releases/download/",
|
||||
"version": "18.2.1",
|
||||
"customDir": "74155efc1c58"
|
||||
"customDir": "2ffc48f0b43f"
|
||||
},
|
||||
"protocols": {
|
||||
"name": "miru",
|
||||
|
|
|
|||
|
|
@ -701,15 +701,17 @@
|
|||
} else {
|
||||
requestCallback = video.requestVideoFrameCallback((a, b) => {
|
||||
stats = {}
|
||||
handleStats(a, b)
|
||||
handleStats(a, b, b)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
async function handleStats (now, metadata) {
|
||||
async function handleStats (now, metadata, lastmeta) {
|
||||
if (stats) {
|
||||
const msbf = (metadata.mediaTime - lastmeta.mediaTime) / (metadata.presentedFrames - lastmeta.presentedFrames)
|
||||
const fps = (1 / msbf).toFixed(3)
|
||||
stats = {
|
||||
fps: await video.fps,
|
||||
fps,
|
||||
presented: metadata.presentedFrames,
|
||||
dropped: video.getVideoPlaybackQuality()?.droppedVideoFrames,
|
||||
processing: metadata.processingDuration + ' ms',
|
||||
|
|
@ -718,7 +720,7 @@
|
|||
buffer: getBufferHealth(metadata.mediaTime) + ' s',
|
||||
speed: video.playbackRate || 1
|
||||
}
|
||||
setTimeout(() => video.requestVideoFrameCallback(handleStats), 200)
|
||||
setTimeout(() => video.requestVideoFrameCallback((n, m) => handleStats(n, m, metadata)), 200)
|
||||
}
|
||||
}
|
||||
function getBufferHealth (time) {
|
||||
|
|
@ -727,6 +729,7 @@
|
|||
return parseInt(video.buffered.end(index) - time)
|
||||
}
|
||||
}
|
||||
return 0
|
||||
}
|
||||
const thumbCanvas = document.createElement('canvas')
|
||||
thumbCanvas.width = 200
|
||||
|
|
@ -941,7 +944,7 @@
|
|||
Frame time: {stats.processing}<br />
|
||||
Viewport: {stats.viewport}<br />
|
||||
Resolution: {stats.resolution}<br />
|
||||
Buffer health: {stats.buffer || 0}<br />
|
||||
Buffer health: {stats.buffer}<br />
|
||||
Playback speed: x{stats.speed?.toFixed(1)}
|
||||
</div>
|
||||
{/if}
|
||||
|
|
@ -955,7 +958,7 @@
|
|||
<span class="material-icons"> arrow_upward </span>
|
||||
<span class="stats">{fastPrettyBytes(torrent.up)}/s</span>
|
||||
</div>
|
||||
<span class="material-icons ctrl font-size-12 p-10" title="Keybinds [`]" on:click={() => (showKeybinds = true)}> help_outline </span>
|
||||
<span class="material-icons ctrl" title="Keybinds [`]" on:click={() => (showKeybinds = true)}> help_outline </span>
|
||||
</div>
|
||||
<div class="middle d-flex align-items-center justify-content-center flex-grow-1 position-relative">
|
||||
<div class="position-absolute w-full h-full" on:dblclick={toggleFullscreen} on:click|self={() => (page = 'player')}>
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ const imageRx = /\.(jpeg|jpg|gif|png|webp)/i
|
|||
|
||||
fetch('https://nyaa.si').catch(() => {
|
||||
addToast({
|
||||
text: 'Failed connecting to Nyaa! Visit<br>wiki.piracy.moe/en/tutorials/unblock<br>for a guide on how to bypass ISP blocks.',
|
||||
text: 'Failed connecting to Nyaa! Visit<br><a href="https://thewiki.moe/en/tutorials/unblock">thewiki.moe/en/tutorials/unblock</a><br>for a guide on how to bypass ISP blocks.',
|
||||
title: 'Nyaa Blocked',
|
||||
type: 'danger'
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue