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

[Feature Request] Show total length of a playlist in sidebar #542

Closed
at-pyrix opened this issue Jul 4, 2024 · 119 comments
Closed

[Feature Request] Show total length of a playlist in sidebar #542

at-pyrix opened this issue Jul 4, 2024 · 119 comments
Assignees
Labels
complete Use this label for a feature/bug issue that is complete but not released yet enhancement New feature or request

Comments

@at-pyrix
Copy link

at-pyrix commented Jul 4, 2024

Is your feature request related to a problem? Please describe.
Sometimes, while watching a long YouTube playlist, I need to know the total length. This is very useful for students and people watching a course on a subject through YT in estimating the time required.

Describe the solution you'd like
A total duration of the playlist on the sidebar would do the trick.

It would be even better if it reacted to the playback speed, just like the remaining time does. For example, if I'm watching the current video at 2x speed, the playlist length should change to 5h:15h:18s.

image

Describe alternatives you've considered
Using the following website: https://ytplaylist-len.sharats.dev/ (maybe some code can be used from here to make it easier?)

@at-pyrix at-pyrix changed the title Show total length of playlist in sidebar [Feature Request] Show total length of a playlist in sidebar Jul 4, 2024
@VampireChicken12
Copy link
Member

thanks for the suggestion @at-pyrix I had this idea almost 4 months ago I just never looked into it much more than I did then.

image

@VampireChicken12 VampireChicken12 added the enhancement New feature or request label Jul 4, 2024
@VampireChicken12
Copy link
Member

I planned on making the displayed time match the style that shows when looking at a video's length. I could do it how you showed in your screenshot it wouldn't be much more work.

@VampireChicken12
Copy link
Member

VampireChicken12 commented Jul 4, 2024

This feature will require a YouTube Data v3 API key. I think we should be able to include one in the extension but also have the option to use your own key as it is possible the included key could be rate limited

@VampireChicken12
Copy link
Member

Making the feature react to the video speed shouldn't be hard at all

@VampireChicken12 VampireChicken12 self-assigned this Jul 4, 2024
@at-pyrix
Copy link
Author

at-pyrix commented Jul 5, 2024

Amazing! Thank you for your time.

@VampireChicken12
Copy link
Member

Amazing! Thank you for your time.

you're welcome

@at-pyrix
Copy link
Author

at-pyrix commented Jul 5, 2024

Also, can we have something like this?

image

YouTube Playlist Duration bar

@VampireChicken12
Copy link
Member

Also, can we have something like this?

image

YouTube Playlist Duration bar

I can look into doing that. I currently don't know how to get the amount watched of the videos in the playlist for the user.

@at-pyrix
Copy link
Author

at-pyrix commented Jul 5, 2024

Wait I just found out that this extension is on gh: https://github.com/WaiShen1000/YouTube-Playlist-Duration-bar

@VampireChicken12
Copy link
Member

Wait I just found out that this extension is on gh: https://github.com/WaiShen1000/YouTube-Playlist-Duration-bar

oh nice

@at-pyrix
Copy link
Author

at-pyrix commented Jul 5, 2024

Leave it, that would just increase your workload when there's already an extension for that. my main concern was that it wasn't open-source but now I found out it is, so no problem with that.

@VampireChicken12
Copy link
Member

I see no api is used with this extension. It must be limited to the amount of videos you load from the playlist part

@at-pyrix
Copy link
Author

at-pyrix commented Jul 5, 2024

yeah

@at-pyrix
Copy link
Author

at-pyrix commented Jul 5, 2024

Are you interested in implementing this feature? because now it seems unnecessary, as there is already an extension for it. It doesn't react to playback speeds though, although that is just a minor inconvenience.

@VampireChicken12
Copy link
Member

Are you interested in implementing this feature? because now it seems unnecessary, as there is already an extension for it. It doesn't react to playback speeds though, although that is just a minor inconvenience.

Yes I am

@at-pyrix
Copy link
Author

at-pyrix commented Jul 5, 2024

Oh okay, then :) Thanks 👍

@VampireChicken12
Copy link
Member

Oh okay, then :) Thanks 👍

no problem.

@VampireChicken12
Copy link
Member

that extension is limited to the amount of videos you load in the playlist side element. If a playlist is big enough it will show 200 videos then you have to go to the last video to load more.

@VampireChicken12
Copy link
Member

@at-pyrix do you know about the discord server for the extension? If you use discord feel free to join and discuss this suggestion and others you might have.

@VampireChicken12
Copy link
Member

Here's the invite link YouTube Enhancer Extension Discord Server

@at-pyrix
Copy link
Author

at-pyrix commented Jul 5, 2024

I'm sorry but I don't use discord.

@VampireChicken12
Copy link
Member

I'm sorry but I don't use discord.

That's fine

@VampireChicken12
Copy link
Member

@at-pyrix I started working on this feature. I'm thinking of a way to handle fetching the playlist info and each videos duration without destroying the API thus hitting quota limit fast

@VampireChicken12 VampireChicken12 moved this from Todo to In Progress in YouTube Enhancer Jul 6, 2024
VampireChicken12 added a commit that referenced this issue Jul 6, 2024
@VampireChicken12 VampireChicken12 moved this from In Progress to Done in YouTube Enhancer Jul 29, 2024
@VampireChicken12 VampireChicken12 closed this as completed by moving to Done in YouTube Enhancer Jul 29, 2024
@VampireChicken12 VampireChicken12 added the complete Use this label for a feature/bug issue that is complete but not released yet label Jul 29, 2024
@at-pyrix
Copy link
Author

thanks

@VampireChicken12
Copy link
Member

@at-pyrix you're welcome, if you find any bugs or anything you think is an issue make an issue about it please and thank you.

@at-pyrix
Copy link
Author

Alright! (I think we should end this with 100 comments lol)

@at-pyrix
Copy link
Author

Also, when are you gonna release this (pre-built)?

@VampireChicken12
Copy link
Member

Not sure it might be a couple days or a week or weeks it depends on when I get more done.

@at-pyrix
Copy link
Author

Fair enough.

@at-pyrix
Copy link
Author

Hey, what do you think of this?

image
image

It's using the --yt-lightsource-section2-color variable for the background color.

@VampireChicken12
Copy link
Member

I should be able to apply that change.

@VampireChicken12
Copy link
Member

Also, when are you gonna release this (pre-built)?
@at-pyrix i attached the extension pre built in a comment. You just need to extract the zip and select the folder

@at-pyrix
Copy link
Author

at-pyrix commented Jul 29, 2024

Also, when are you gonna release this (pre-built)?
@at-pyrix i attached the extension pre built in a comment. You just need to extract the zip and select the folder

sorry, I didn't see that at the time

@VampireChicken12
Copy link
Member

sorry, I didn't see that at the time
No problem

@VampireChicken12
Copy link
Member

@at-pyrix is the feature working alright so far?

@at-pyrix
Copy link
Author

@at-pyrix is the feature working alright so far?

It is. Btw, how was the HTML option supposed to work? Does it include all the videos before the one you've watched? Because that's a bit more handy, specially if you don't keep a YouTube history or simply completed half of the playlist with another account and now want to continue.

@VampireChicken12
Copy link
Member

@at-pyrix is the feature working alright so far?

It is. Btw, how was the HTML option supposed to work? Does it include all the videos before the one you've watched? Because that's a bit more handy, specially if you don't keep a YouTube history or simply completed half of the playlist with another account and now want to continue.

Yes it includes the ones before you watched but only the amount tracked on that account. The feature doesn't assume you watched it all.

@VampireChicken12
Copy link
Member

The html option uses the pages data to get the playlist duration and the playlist watch time. it is not possible to get the watch time from the api. so the api type uses the api to get the playlist duration and the page data for the watch time

@VampireChicken12
Copy link
Member

if needed I could modify the code to assume you watched any videos prior to the one you are on. I could add a checkbox for that or something

@at-pyrix
Copy link
Author

at-pyrix commented Aug 1, 2024

Good idea

@VampireChicken12
Copy link
Member

Good idea

I thought about it a bit. I think I'd need to think of the right way to word the checkbox label/title.

@VampireChicken12
Copy link
Member

@at-pyrix
Method_To_Get_Watched_Time
how is this?

@VampireChicken12
Copy link
Member

Hey, what do you think of this?

image image

It's using the --yt-lightsource-section2-color variable for the background color.

Where does that selector get modified? is it just something that changes automatically

@VampireChicken12
Copy link
Member

@at-pyrix I've attached the extension pre-built with the new select for how watch time is obtained.

Release Artifacts

File Name SHA-256 Hash
youtube-enhancer-v1.27.0.1-Chrome.zip 12db435f44b308ec79be32b365064c383ae959fc728046a2ea5ff628635aed78
youtube-enhancer-v1.27.0.1-Edge.zip cd9803ad61979c65d8b25bc3839cb2247f729f9f5e739ff85eb765d188842d1b
youtube-enhancer-v1.27.0.1-Firefox.zip 0e8db7f16a81cfb1887f7a260556458b2268e479ece95d05b37e817060e9742e

@VampireChicken12
Copy link
Member

@at-pyrix is everything still working fine with the feature? have you found any bugs or is there anything you want changed

@at-pyrix
Copy link
Author

at-pyrix commented Aug 8, 2024

It's working perfectly fine :)

@at-pyrix
Copy link
Author

at-pyrix commented Aug 8, 2024

thanks

@VampireChicken12
Copy link
Member

@at-pyrix great to hear thanks for replying

github-actions bot pushed a commit that referenced this issue Oct 13, 2024
# [1.27.0](v1.26.0...v1.27.0) (2024-10-13)

### Bug Fixes

* add missing function call ([fb3fdfd](fb3fdfd))
* Add shadow around on screen display to improve visibility [#591](#591) ([4a54256](4a54256))
* disable playback speed buttons when live ([585adc9](585adc9))
* **eslint:** migrate to flat config ([9a086ad](9a086ad))
* Features being enabled multiple times ([f758184](f758184))
* features not working on '/live' page ([3759d7f](3759d7f))
* **hide scrollbar:** Failed to set the 'innerHTML' property on 'Element' [#621](#621) ([74a46b5](74a46b5))
* **hide translate comment:** comment replies showed translate button [#471](#471) ([82a8104](82a8104))
* Make speed limit higher [#637](#637) ([35bcd4f](35bcd4f))
* playback speed buttons tooltip ([394b59f](394b59f))
* **playback speed buttons:** decrease increasing speed ([5269f33](5269f33))
* **playback speed buttons:** label not updating when adjusting speed with scroll wheel ([a16cd44](a16cd44))
* **playback speed buttons:** label not updating when player speed changes ([a88d29d](a88d29d))
* video id obtaining ([8edf9a4](8edf9a4))

### Features

* automatically disable closed captions [#371](#371) ([00a4870](00a4870))
* copyTimestampUrlButton ([80c7685](80c7685))
* hide official artist videos from home page ([7e202f1](7e202f1))
* Playlist length bar [#542](#542) ([8ed563f](8ed563f))
* **playlist length:** watch time options ([6782340](6782340))
* **video history:** do not resume or track history on official artist channels ([60e7797](60e7797))

## Release Artifacts
| File Name | SHA-256 Hash |
| :--- | :---: |
| youtube-enhancer-v1.27.0-Chrome.zip | 18f54c95d20543efa191d0438daf9362b7a0b9a6060f3f011a6c699d6cbfb353 |
| youtube-enhancer-v1.27.0-Chromium.zip | 18f54c95d20543efa191d0438daf9362b7a0b9a6060f3f011a6c699d6cbfb353 |
| youtube-enhancer-v1.27.0-Edge.zip | 18f54c95d20543efa191d0438daf9362b7a0b9a6060f3f011a6c699d6cbfb353 |
| youtube-enhancer-v1.27.0-Firefox.zip | 9899180b25e1e74fd251de0516fd442b1bcbdd277fd8b7c12629a618474a9b16 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complete Use this label for a feature/bug issue that is complete but not released yet enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

2 participants