Skip to content

Commit

Permalink
fix setpositionstate crash, fix setting id's, downgrade webtorrent du…
Browse files Browse the repository at this point in the history
…e to crash issues
  • Loading branch information
ThaUnknown committed Mar 15, 2022
1 parent 5d5822b commit 3170feb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Miru",
"version": "0.5.2",
"version": "0.5.3",
"author": "ThaUnknown_",
"main": "src/index.js",
"scripts": {
Expand Down Expand Up @@ -47,6 +47,6 @@
"@electron/remote": "^2.0.7",
"anitomyscript": "^2.0.4",
"matroska-subtitles": "^3.3.2",
"webtorrent": "^1.7.2"
"webtorrent": "^1.5.0"
}
}
4 changes: 2 additions & 2 deletions src/renderer/src/lib/pages/Player.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
muted = !muted
}
document.addEventListener('visibilitychange', () => {
if (!video.ended && set.playerPause) {
if (!video?.ended && set.playerPause) {
if (document.visibilityState === 'hidden') {
wasPaused = paused
paused = true
Expand Down Expand Up @@ -522,7 +522,7 @@
$: navigator.mediaSession?.setPositionState({
duration: Math.max(0, duration || 0),
playbackRate: 1,
position: Math.max(duration || 0, currentTime || 0)
position: Math.min(duration || 0, currentTime || 0)
})
$: mediaChange(current)
Expand Down
12 changes: 6 additions & 6 deletions src/renderer/src/lib/pages/Settings.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -223,24 +223,24 @@
data-toggle="tooltip"
data-placement="bottom"
data-title="Doesn't Delete Files Of Old Torrents When A New Torrent Is Played">
<input type="checkbox" id="rss-batch" bind:checked={settings.torrentPersist} />
<label for="rss-batch">Persist Files</label>
<input type="checkbox" id="torrent-persist" bind:checked={settings.torrentPersist} />
<label for="torrent-persist">Persist Files</label>
</div>
<div
class="custom-switch mb-10 pl-10 font-size-16 w-300"
data-toggle="tooltip"
data-placement="bottom"
data-title="Disables Distributed Hash Tables For Use In Private Trackers To Improve Piracy">
<input type="checkbox" id="rss-batch" bind:checked={settings.torrentDHT} />
<label for="rss-batch">Disable DHT</label>
<input type="checkbox" id="torrent-dht" bind:checked={settings.torrentDHT} />
<label for="torrent-dht">Disable DHT</label>
</div>
<div
class="custom-switch mb-10 pl-10 font-size-16 w-300"
data-toggle="tooltip"
data-placement="bottom"
data-title="Disables Peer Exchange For Use In Private Trackers To Improve Piracy">
<input type="checkbox" id="rss-batch" bind:checked={settings.torrentPeX} />
<label for="rss-batch">Disable PeX</label>
<input type="checkbox" id="torrent-pex" bind:checked={settings.torrentPeX} />
<label for="torrent-pex">Disable PeX</label>
</div>
</div>
</Tab>
Expand Down
1 change: 0 additions & 1 deletion src/renderer/src/modules/torrent.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ if (worker) {
}
window.client = client
client.on('torrent', torrent => {
console.log('hash', torrent.infoHash)
files.set(torrent.files)
})

Expand Down

0 comments on commit 3170feb

Please sign in to comment.