mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-08-18 05:27:47 +00:00
fix: subtitle negative offset
fix: go back episode on media with no episodes
This commit is contained in:
parent
4dbf3817a6
commit
2f9db0fe54
3 changed files with 6 additions and 4 deletions
|
|
@ -36,7 +36,9 @@
|
|||
|
||||
const fileList = files.value
|
||||
|
||||
const targetFile = fileList.find(file => file.media?.media?.id === obj.media.id && (obj.media.episodes === 1 || !obj.media.episodes || file.media?.episode === obj.episode))
|
||||
const targetFile = fileList.find(file => file.media?.media?.id === obj.media.id &&
|
||||
(file.media?.episode === obj.episode || obj.media.episodes === 1 || (!obj.media.episodes && (obj.episode === 1 || !obj.episode) && (oldNowPlaying.episode === 1 || !oldNowPlaying.episode))) // movie check
|
||||
)
|
||||
if (!targetFile) return false
|
||||
if (oldNowPlaying.media?.id !== obj.media.id) {
|
||||
// mediachange, filelist change
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@
|
|||
let subDelay = 0
|
||||
$: updateDelay(subDelay)
|
||||
function updateDelay (delay) {
|
||||
if (subs?.renderer) subs.renderer.timeOffset = delay
|
||||
if (subs?.renderer) subs.renderer.timeOffset = Number(delay)
|
||||
}
|
||||
|
||||
let currentTime = 0
|
||||
|
|
@ -1177,7 +1177,7 @@
|
|||
</label>
|
||||
{/if}
|
||||
{/each}
|
||||
<input type='text' inputmode='numeric' pattern='[0-9]*' step='0.1' bind:value={subDelay} on:click|stopPropagation class='form-control text-right form-control-sm' />
|
||||
<input type='text' inputmode='numeric' pattern='-?[0-9]*.?[0-9]*' step='0.1' bind:value={subDelay} on:click|stopPropagation class='form-control text-right form-control-sm' />
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@
|
|||
{/if}
|
||||
<SettingCard title='Transfer Speed Limit' description='Download/Upload speed limit for torrents, higher values increase CPU usage, and values higher than your storage write speeds will quickly fill up RAM.'>
|
||||
<div class='input-group w-100 mw-full'>
|
||||
<input type='number' inputmode='numeric' pattern={'[0-9]*.[0-9]{1, 2}'} bind:value={settings.torrentSpeed} min='0' max='50' step='0.1' class='form-control text-right bg-dark' />
|
||||
<input type='number' inputmode='numeric' pattern={'[0-9]*.?[0-9]*'} bind:value={settings.torrentSpeed} min='0' max='50' step='0.1' class='form-control text-right bg-dark' />
|
||||
<div class='input-group-append'>
|
||||
<span class='input-group-text bg-dark'>MB/s</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue