From 978128bf9922c95ee446809f2aeaf7270b238244 Mon Sep 17 00:00:00 2001 From: Lunatic Date: Sat, 28 Feb 2026 09:46:12 +0800 Subject: [PATCH] Translate the annotation from Chinese to English --- .../components/app/MediaPlayerContainer.vue | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/client/components/app/MediaPlayerContainer.vue b/client/components/app/MediaPlayerContainer.vue index 42b2619a5..3564a5670 100644 --- a/client/components/app/MediaPlayerContainer.vue +++ b/client/components/app/MediaPlayerContainer.vue @@ -312,7 +312,7 @@ export default { this.checkChapterEnd() } - // 检查章节intro/outro跳过 + // check for intro/outro and skip if needed this.checkAndSkipIntroOutro(time) }, setDuration(duration) { @@ -551,7 +551,7 @@ export default { } }, - // 获取跳过设置 + // get skip settings getSkipSettings() { return { skipIntro: this.$store.getters['user/getUserSetting']('skipIntro'), @@ -561,7 +561,7 @@ export default { } }, - // 检查并执行章节intro/outro跳过 + // check and skip intro/outro checkAndSkipIntroOutro(currentTime) { const skipSettings = this.getSkipSettings() if (!skipSettings) return @@ -571,10 +571,10 @@ export default { if (!doSkipIntro && !doSkipOutro) return if (!this.isPlaying || !this.chapters.length) return - // 用户手动seek后2秒内不触发跳过 + // The skip function is not triggered within 2 seconds after the user manually seeks if (this._manualSeekTime && Date.now() - this._manualSeekTime < 2000) return - // 防重入:正在跳过时等待到达目标位置后再解除 + // Reentry guard: When skipping, wait until reaching the target position before cancelling if (this._isSkipping) { if (this._skipTarget != null && currentTime >= this._skipTarget - 0.5) { this._isSkipping = false @@ -592,10 +592,10 @@ export default { const introEndTime = Math.min(chapter.start + introDuration, chapter.end) const outroStartTime = Math.max(chapter.end - outroDuration, chapter.start) - // 短章节:intro和outro区间重叠则不跳 + // Short chapter: If the intro and outro intervals overlap, do not skip if (doSkipIntro && doSkipOutro && introEndTime > outroStartTime) return - // 检查是否在intro区间 + // Check whether it is within the intro interval if (doSkipIntro && currentTime < introEndTime) { const target = introEndTime + 0.5 this._isSkipping = true @@ -604,18 +604,18 @@ export default { return } - // 检查是否在outro区间 + // check whether it is within the outro interval if (doSkipOutro && currentTime >= outroStartTime) { const chapterIndex = this.chapters.indexOf(chapter) const nextChapter = this.chapters[chapterIndex + 1] if (nextChapter) { - // 有下一章:跳到下一章开头(如果同时开了skipIntro则跳过intro) + // has next chapter: skip to next chapter start (if skipIntro is on, skip intro) let target = nextChapter.start if (doSkipIntro) { const nextIntroEnd = Math.min(nextChapter.start + introDuration, nextChapter.end) const nextOutroStart = Math.max(nextChapter.end - outroDuration, nextChapter.start) - // 确保下一章intro/outro不重叠 + // ensure that the next chapter intro/outro does not overlap if (nextIntroEnd <= nextOutroStart) { target = nextIntroEnd + 0.5 } @@ -624,7 +624,7 @@ export default { this._skipTarget = target this.seek(target) } else { - // 最后一章:跳到结尾,触发播放完成 + // last chapter: skip to end this._isSkipping = true this._skipTarget = chapter.end this.seek(chapter.end)