mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-08-16 16:25:49 +00:00
fix: drag-drop subtitle files
fix: episodes marked as complete too early
This commit is contained in:
parent
92e5207e3a
commit
6e426630f4
3 changed files with 8 additions and 4 deletions
|
|
@ -900,9 +900,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
function checkCompletionByTime (time, duration) {
|
||||
const fromend = Math.max(180, duration / 10)
|
||||
if (time && time && video?.readyState && time - fromend < time) {
|
||||
function checkCompletionByTime (currentTime, safeduration) {
|
||||
const fromend = Math.max(180, safeduration / 10)
|
||||
if (safeduration && currentTime && video?.readyState && safeduration - fromend < currentTime) {
|
||||
if (media?.media?.episodes || media?.media?.nextAiringEpisode?.episode) {
|
||||
if (media.media.episodes || media.media.nextAiringEpisode?.episode > media.episode) {
|
||||
completed = true
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "5.0.2",
|
||||
"version": "5.0.3",
|
||||
"private": true,
|
||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||
"description": "Stream anime torrents, real-time with no waiting for downloads.",
|
||||
|
|
|
|||
|
|
@ -49,6 +49,10 @@ function createWindow () {
|
|||
new Dialog(webtorrentWindow)
|
||||
mainWindow.setMenuBarVisibility(false)
|
||||
|
||||
mainWindow.webContents.setWindowOpenHandler(() => {
|
||||
return { action: 'deny' }
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.webRequest.onHeadersReceived(({ responseHeaders }, fn) => {
|
||||
delete responseHeaders['Access-Control-Allow-Origin']
|
||||
responseHeaders['access-control-allow-origin'] = ['*']
|
||||
|
|
|
|||
Loading…
Reference in a new issue