elementary / videos

Video player and library app designed for elementary OS

Home Page:https://elementary.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Save playback time, not percentage

danirabbit opened this issue · comments

Currently we're saving the percentage of playback, not the time. This is inaccurate and seems like it might be causing issues with shorter videos where 0 seconds is getting rounded up to some percentage of playback

It looks to me as if "last-stopped" can be converted to use the position rather than the progress due to the presence of that accessor: https://github.com/GNOME/clutter-gst/commit/37889b48957d1476f9f1a7641e72e1fec1f8025b#diff-2c51f77dd418fe891d5f3d8135edcfaf

However, there is only a set_progress() method on the playback object of clutter-gst-3.0, so unless that can be added, the alternative would be to use an asymettric combination of get_position (seconds) and set_progress (percentage) rather than the current get_progress (percentage) and set_progress (percentage).

If you are OK with that, I'm happy to add it.

Please also let me know if you have a preference on whether you are happy for me to change the meaning of the value in the settings, or if you'd like some effort put into preserving/converting the current value to avoid a one-off issue where resuming a video after the upgrade would treat the previous 0.0-1.0 percentage value as a value in seconds and jump back to the start. I can probably do this either by storing the units as a separate setting, changing the name of the stored value so that both persist, or (crudely) assuming that a resume between 0.0 and 1.0 second is a percentage...

Fixed with #335