diff --git a/Swiftfin/Views/ItemView/Landscape/ItemLandscapeMainView.swift b/Swiftfin/Views/ItemView/Landscape/ItemLandscapeMainView.swift index e2af12b6..c4290d05 100644 --- a/Swiftfin/Views/ItemView/Landscape/ItemLandscapeMainView.swift +++ b/Swiftfin/Views/ItemView/Landscape/ItemLandscapeMainView.swift @@ -53,9 +53,9 @@ struct ItemLandscapeMainView: View { .contextMenu { if viewModel.playButtonItem != nil, viewModel.item.userData?.playbackPositionTicks ?? 0 > 0 { Button { - if let itemVideoPlayerViewModel = viewModel.selectedVideoPlayerViewModel { - itemVideoPlayerViewModel.injectCustomValues(startFromBeginning: true) - itemRouter.route(to: \.videoPlayer, itemVideoPlayerViewModel) + if let selectedVideoPlayerViewModel = viewModel.selectedVideoPlayerViewModel { + selectedVideoPlayerViewModel.injectCustomValues(startFromBeginning: true) + itemRouter.route(to: \.videoPlayer, selectedVideoPlayerViewModel) } else { LogManager.shared.log.error("Attempted to play item but no playback information available") } diff --git a/Swiftfin/Views/ItemView/Portrait/ItemPortraitHeaderOverlayView.swift b/Swiftfin/Views/ItemView/Portrait/ItemPortraitHeaderOverlayView.swift index 18d8040e..2ae40695 100644 --- a/Swiftfin/Views/ItemView/Portrait/ItemPortraitHeaderOverlayView.swift +++ b/Swiftfin/Views/ItemView/Portrait/ItemPortraitHeaderOverlayView.swift @@ -113,8 +113,8 @@ struct PortraitHeaderOverlayView: View { // MARK: Play Button { - if let itemVideoPlayerViewModel = viewModel.itemVideoPlayerViewModel { - itemRouter.route(to: \.videoPlayer, itemVideoPlayerViewModel) + if let selectedVideoPlayerViewModel = viewModel.selectedVideoPlayerViewModel { + itemRouter.route(to: \.videoPlayer, selectedVideoPlayerViewModel) } else { LogManager.shared.log.error("Attempted to play item but no playback information available") } @@ -132,13 +132,13 @@ struct PortraitHeaderOverlayView: View { .background(viewModel.playButtonItem == nil ? Color(UIColor.secondarySystemFill) : Color.jellyfinPurple) .cornerRadius(10) } - .disabled(viewModel.playButtonItem == nil) + .disabled(viewModel.playButtonItem == nil || viewModel.selectedVideoPlayerViewModel == nil) .contextMenu { if viewModel.playButtonItem != nil, viewModel.item.userData?.playbackPositionTicks ?? 0 > 0 { Button { - if let itemVideoPlayerViewModel = viewModel.itemVideoPlayerViewModel { - itemVideoPlayerViewModel.injectCustomValues(startFromBeginning: true) - itemRouter.route(to: \.videoPlayer, itemVideoPlayerViewModel) + if let selectedVideoPlayerViewModel = viewModel.selectedVideoPlayerViewModel { + selectedVideoPlayerViewModel.injectCustomValues(startFromBeginning: true) + itemRouter.route(to: \.videoPlayer, selectedVideoPlayerViewModel) } else { LogManager.shared.log.error("Attempted to play item but no playback information available") } diff --git a/Translations/en.lproj/Localizable.strings b/Translations/en.lproj/Localizable.strings index 2b050861..77dcbd36 100644 Binary files a/Translations/en.lproj/Localizable.strings and b/Translations/en.lproj/Localizable.strings differ