Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add total duration display to playlists #6657

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

sullivanlng
Copy link
Contributor

Title

Add total duration display to playlists

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

closes #6152

Description

This pull request adds the total playlist duration display to the playlist info container.

Changes made:

  • Implemented a feature to show the total duration of the playlist.
  • Ensured the visual style integrates seamlessly with the current UI.

Screenshots

After :
totaltime2

Testing

Approach:

  • Verified the feature on different screen sizes using the toggle device bar.
    Behavior Confirmed:
  • The total duration appears correctly and adapts visually to the playlist info container.

Desktop

  • OS: Windows 11
  • OS Version: 23H2
  • FreeTube version: 0.22.1

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jan 27, 2025
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 27, 2025 17:12
Copy link

@smm-h smm-h left a comment

Choose a reason for hiding this comment

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

Everything looks standard, I approve.

Copy link
Member

Choose a reason for hiding this comment

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

When navigating to a creators playlist this is what i see,

VirtualBoxVM_08jgZsaMtM.mp4

@efb4f5ff-1298-471a-8973-3d47447115dc efb4f5ff-1298-471a-8973-3d47447115dc added PR: changes requested and removed PR: waiting for review For PRs that are complete, tested, and ready for review labels Jan 27, 2025
auto-merge was automatically disabled January 28, 2025 06:54

Head branch was pushed to by a user without write access

@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 28, 2025 06:54
auto-merge was automatically disabled January 28, 2025 07:01

Head branch was pushed to by a user without write access

@sullivanlng sullivanlng force-pushed the feature-playlist-duration-6152 branch from 4465db8 to 7b669a2 Compare January 28, 2025 07:01
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) January 28, 2025 07:01
Copy link
Member

Choose a reason for hiding this comment

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

I dislike the placement. This is playlist info and should belong next to the other data points. Place it in between video count and Last updated on

VirtualBoxVM_G3uHfTuzVv

Place it between video count and views

VirtualBoxVM_9wjOglp8LN

seconds: totalSeconds % 60,
}

return new Intl.DurationFormat(locale, { style: 'short' }).format(duration)
Copy link
Member

Choose a reason for hiding this comment

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

This should use the user's locale and fallback to english

Suggested change
return new Intl.DurationFormat(locale, { style: 'short' }).format(duration)
return new Intl.DurationFormat([this.currentLocale, 'en'], { style: 'short' }).format(duration)

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

Successfully merging this pull request may close these issues.

[Feature Request]: Let the user know how much time it would take to watch an entire playlist
4 participants