Skip to content

feat: hide redundant caption for videos when it only adds file extension#782

Open
Copilot wants to merge 8 commits intomainfrom
copilot/fix-video-title-caption-logic
Open

feat: hide redundant caption for videos when it only adds file extension#782
Copilot wants to merge 8 commits intomainfrom
copilot/fix-video-title-caption-logic

Conversation

Copy link
Contributor

Copilot AI commented Feb 13, 2026

For videos without metadata, the title displays the file's DisplayName (e.g., "MyVideo") while the caption shows the full filename (e.g., "MyVideo.mp4"), creating redundant information.

Result

  • Before: Title: "MyVideo", Caption: "MyVideo.mp4"
  • After: Title: "MyVideo.mp4", Caption: hidden
image image

Copilot AI and others added 2 commits February 13, 2026 17:21
…r videos

Co-authored-by: huynhsontung <31434093+huynhsontung@users.noreply.github.com>
Co-authored-by: huynhsontung <31434093+huynhsontung@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix video title and caption logic based on file names feat: hide redundant caption for videos when it only adds file extension Feb 13, 2026
Copilot AI requested a review from huynhsontung February 13, 2026 17:26
@huynhsontung huynhsontung marked this pull request as ready for review February 14, 2026 13:11
@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Feb 14, 2026
@dosubot dosubot bot added the enhancement New feature or request label Feb 14, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the user experience for videos without metadata by eliminating redundant caption information. Previously, when a video file had no metadata, the title would display the file's DisplayName (e.g., "MyVideo") while the caption showed the full filename (e.g., "MyVideo.mp4"), creating unnecessary duplication. The PR changes this behavior to display only the full filename as the title when the caption would be redundant, and hides the caption entirely.

Changes:

  • Modified MediaViewModel to use the full filename instead of DisplayName, track when details are loaded, and automatically hide captions that duplicate the title
  • Updated LibraryService to respect already-loaded media details when applying cached properties
  • Adjusted PlayerPage layout to vertically center the title area in MiniPlayer and Hidden states when the subtitle is hidden

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Screenbox.Core/ViewModels/MediaViewModel.cs Added DetailsLoaded property tracking, changed constructor to use full filename, added logic to hide redundant captions after loading details, and improved null safety by initializing string properties with string.Empty
Screenbox.Core/Services/LibraryService.cs Added check to prevent overwriting media properties from cache if details were already loaded
Screenbox/Pages/PlayerPage.xaml Added RowSpan and VerticalAlignment setters to vertically center the title area in MiniPlayer and Hidden states

@United600
Copy link
Collaborator

United600 commented Feb 14, 2026

Don't like how it looks when it's by itself on the miniplayer. Should we consider increasing its size in that case? Also, why is the file extension missing?

@United600
Copy link
Collaborator

BTW, I'm working on a branch that adds a TitleBar control and I'm considering separating the PlayerPage titlebar from the miniplayer.

@huynhsontung
Copy link
Owner

Don't like how it looks when it's by itself on the miniplayer. Should we consider increasing its size in that case?

That would require some extra UI logic and not just a simple visual state change. I want to avoid that.

I'm working on a branch that adds a TitleBar control and I'm considering separating the PlayerPage titlebar from the miniplayer.

I think separating them is a good move. PlayerPage visual states are quite overloaded. The more reason we shouldn't invest too much into customizing the current mini title.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants