Skip to content

Feat/player time edit - #539

Open
azfoo wants to merge 3 commits into
TimeLineAnnotator:devfrom
azfoo:feat/player-time-edit
Open

Feat/player time edit#539
azfoo wants to merge 3 commits into
TimeLineAnnotator:devfrom
azfoo:feat/player-time-edit

Conversation

@azfoo

@azfoo azfoo commented May 18, 2026

Copy link
Copy Markdown
Collaborator

Player time display is now a seekable input; playback position restored on file open

  • The current-time label in the player toolbar is now a QLineEdit.
    Type a time in HH:MM:SS.f, MM:SS.f, or plain-seconds format and press Enter to seek; the value is clamped to [0, duration].
    Pressing Escape reverts without seeking.
    The field is not updated while it has focus so in-progress edits survive playback ticks.
    A QRegularExpressionValidator allows all intermediate states while typing.
  • Controls are now disabled individually rather than via setEnabled() on the whole toolbar, so time_edit and the duration label remain enabled in NO_MEDIA state when a duration is present (annotation-only files with no media loaded).
  • Current playback position is saved to QSettings on file save and restored as a pending seek on next open. YouTube files are excluded.
  • Adds parse_media_time() as the inverse of format_media_time().

(somewhat resolves #378)

@azfoo
azfoo marked this pull request as ready for review May 19, 2026 13:48
@azfoo
azfoo requested a review from FelipeDefensor May 19, 2026 13:48
Comment thread tilia/file/file_manager.py Outdated
Comment on lines +228 to +232
try:
current_time = get(Get.MEDIA_CURRENT_TIME)
except NoReplyToRequest:
current_time = None
settings.update_recent_files(path, geometry, window_state, time=current_time)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What does this fix? Consider adding comment.

azfoo added 3 commits August 24, 2026 20:46
- static "MM:SS / MM:SS" label is replaced by an editable QLineEdit
that lets users seek by typing a time and pressing Enter. Escape reverts
the edit without seeking. QRegularExpressionValidator allows partial
input while typing.

- controls are now disabled individually rather than via setEnabled() on
the whole toolbar, so the time edit and duration label can remain enabled
in the NO_MEDIA state when a duration is present (e.g. annotation-only
files with no media loaded).

- current playback position is saved to recent-file settings on save
and restored as a pending seek when the file is next opened. YouTube
files are excluded since autoplay is disabled and seeking before the player is able to play doesn't do anything.
@azfoo
azfoo force-pushed the feat/player-time-edit branch from 5f3fb97 to 9ed526c Compare August 24, 2026 18:52
@azfoo
azfoo requested a review from FelipeDefensor August 25, 2026 11:54
@FelipeDefensor FelipeDefensor added this to the 0.7.0 milestone Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants