From 5122c66341185aee20d4cd789e831b3f564549ce Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 10 Jun 2021 17:57:47 -0700 Subject: [PATCH] [create-pull-request] automated change (#54) Co-authored-by: acvigue --- JellyfinPlayer/VideoPlayer.swift | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/JellyfinPlayer/VideoPlayer.swift b/JellyfinPlayer/VideoPlayer.swift index 0355babd..e9d2d43e 100644 --- a/JellyfinPlayer/VideoPlayer.swift +++ b/JellyfinPlayer/VideoPlayer.swift @@ -381,17 +381,17 @@ class PlayerViewController: UIViewController, VLCMediaDelegate, VLCMediaPlayerDe mediaPlayer.media = VLCMedia(url: playbackItem.videoUrl) mediaPlayer.play() - - //1 second = 10,000,000 ticks - + + // 1 second = 10,000,000 ticks + let rawStartTicks = manifest.userData?.playbackPositionTicks ?? 0 - - if(rawStartTicks != 0) { + + if rawStartTicks != 0 { let startSeconds = rawStartTicks / 10_000_000 mediaPlayer.jumpForward(Int32(startSeconds)) } - - //Pause and load captions into memory. + + // Pause and load captions into memory. mediaPlayer.pause() subtitleTrackArray.forEach { sub in if sub.id != -1 && sub.delivery == .external && sub.codec != "subrip" {