mirror of
https://github.com/ThaUnknown/miru.git
synced 2026-04-21 23:11:59 +00:00
fix: rewatch progress
This commit is contained in:
parent
8eb5f4581b
commit
4660b2494f
4 changed files with 114 additions and 111 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Miru",
|
||||
"version": "3.1.8",
|
||||
"version": "3.1.9",
|
||||
"author": "ThaUnknown_ <ThaUnknown@users.noreply.github.com>",
|
||||
"description": "Stream anime torrents, real-time with no waiting for downloads.",
|
||||
"main": "src/index.js",
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ async function play () {
|
|||
const { status, progress } = media.mediaListEntry
|
||||
if (progress) {
|
||||
if (status === 'COMPLETED') {
|
||||
setStatus('REPEATING', { episode: 0 })
|
||||
await setStatus('REPEATING', { episode: 0 })
|
||||
} else {
|
||||
ep = Math.min(getMediaMaxEp(media, true), progress + 1)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,12 +121,15 @@ export function alEntry (filemedia) {
|
|||
if (videoEpisode && mediaEpisode && (mediaEpisode >= videoEpisode)) {
|
||||
// check user's own watch progress
|
||||
const lists = media.mediaListEntry?.customLists.filter(list => list.enabled).map(list => list.name) || []
|
||||
|
||||
const status = media.mediaListEntry?.status === 'REPEATING' ? 'REPEATING' : 'CURRENT'
|
||||
|
||||
if (!media.mediaListEntry || (media.mediaListEntry?.progress <= videoEpisode) || singleEpisode) {
|
||||
const variables = {
|
||||
method: 'Entry',
|
||||
repeat: media.mediaListEntry?.repeat || 0,
|
||||
id: media.id,
|
||||
status: 'CURRENT',
|
||||
status,
|
||||
episode: videoEpisode,
|
||||
lists
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue