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

[FR] Remember playback position #155

Open
ImportTaste opened this issue Nov 13, 2022 · 7 comments
Open

[FR] Remember playback position #155

ImportTaste opened this issue Nov 13, 2022 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ImportTaste
Copy link

Invidious has a very nice feature called "Save playback position" (which admittedly does bug out sometimes), and it's very convenient if something like a browser crash occurs or I have to perform a reboot.

It would be nice if youtube-local could implement something similar.

@user234683 user234683 added the enhancement New feature or request label May 2, 2023
@AaronStiff
Copy link

If this is equivalent to getting the direct link for the video with the current timestamp included, I second this! :)

(awesome project by the way!)

@user234683
Copy link
Owner

user234683 commented May 19, 2023

If this is equivalent to getting the direct link for the video with the current timestamp included, I second this! :)

(awesome project by the way!)

Thank you @AaronStiff
zrose added a way to do this by pressing the 't' hotkey

@ImportTaste
Copy link
Author

If this is equivalent to getting the direct link for the video with the current timestamp included, I second this! :)
(awesome project by the way!)

Thank you @AaronStiff zrose added a way to do this by pressing the 't' hotkey

Really? Nothing happens when I push 't'.

@AaronStiff
Copy link

Oh neat!

@ImportTaste pause the video, press 't', and the link with a timestamp is copied to your clipboard.

@ImportTaste
Copy link
Author

ImportTaste commented May 19, 2023

Oh neat!

@ImportTaste pause the video, press 't', and the link with a timestamp is copied to your clipboard.

Doesn't work for me, even when I explicitly set Clipboard permissions to allow. Is there any console message for this event? Then I'd be able to tell if it's a problem with the hotkey even being registered.


EDIT: Ah, I see, there is a video hotkeys setting that I didn't have enabled, handy.

There is no console logging for the hotkeys being pressed though, that should really be changed for debugging purposes.

@Hezkore
Copy link

Hezkore commented Oct 25, 2023

Sharing a timestamp is nice, but what really needs to exist is a way to continue the video from its last location.
I have a couple of videos that are over one hour, and I only watch 10 minutes or so, and when I come back to it it's really hard to find where I was last time.

@user234683 user234683 added the good first issue Good for newcomers label Jan 21, 2024
@user234683
Copy link
Owner

Proposed implementation:

  • Add a setting for enabling/disabling automatic playback position saving
  • Add a setting for the minimum video length to enable position saving (default: 15 minutes)
  • To watch.py, add a new POST request endpoint, perhaps '/save_playback_position?video_id=...&pos=...' which will write to a json file in the settings.data_dir directory. Probably better to use a sqlite database coupled with an export feature for all of these sorts of things, but that can be done later.
  • If settings are right, add an event listener in watch.js upon pausing the video, which will do an XHR request to that endpoint
  • In watch.py, have it read that file and get the duration, and set the time_start variable to that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants