Skip to content

Commit

Permalink
only expand player when auto resize is Always and media is video
Browse files Browse the repository at this point in the history
  • Loading branch information
huynhsontung committed Nov 29, 2023
1 parent 4e20988 commit 8a6835a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Screenbox.Core/ViewModels/PlayerPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,10 @@ private async void ProcessOpeningMedia(MediaViewModel? current)
await current.LoadDetailsAsync();
await current.LoadThumbnailAsync();
MediaType = current.MediaType;
bool shouldBeVisible = _settingsService.PlayerAutoResize == PlayerAutoResizeOption.Always && !AudioOnly;
if (PlayerVisibility != PlayerVisibilityState.Visible)
{
PlayerVisibility = AudioOnly ? PlayerVisibilityState.Minimal : PlayerVisibilityState.Visible;
PlayerVisibility = shouldBeVisible ? PlayerVisibilityState.Visible : PlayerVisibilityState.Minimal;
}
}
else if (PlayerVisibility == PlayerVisibilityState.Minimal)
Expand Down

0 comments on commit 8a6835a

Please sign in to comment.