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

Playback position not always saved when closing window via close button #981

Open
FusionGold opened this issue Sep 21, 2024 · 9 comments
Open

Comments

@FusionGold
Copy link

Overview Description:
When using an external MPV configuration with save-position-on-quit = yes, the video playback position is consistently saved when quitting with the q key. However, when closing the window by clicking the "close" button, the playback position is not always saved.

Steps to Reproduce:

  1. Open a video with save-position-on-quit = yes enabled in external mpv config file.
  2. Click to seek to a specific position in the video.
  3. Close the window using the "close" button instead of the q key.

Actual Results:
Playback position is not always saved when closing the window using the "close" button.

Expected Results:
Playback position should be saved consistently when closing the window, just as it is when quitting with the q key.

Version:
0.27 (installed via Arch's extra repo)

Additional Information:
Running Arch Linux, GNOME.

@gnome-mpv
Copy link
Collaborator

Would you be able to test with the git version? I think this might have been fixed already.

@FusionGold
Copy link
Author

Thank you for your response. I installed the celluloid-git package from AUR, version 0.27.r35.g8356432-1, but unfortunately, the issue still persists.

@FusionGold
Copy link
Author

Dear dev,
I'm afraid the issue has not been resolved. I tested with 3f2aef9 (installed via celluloid-git), but the problem still persists.
For test, I used a single line configuration in my mpv.conf that is save-position-on-quit = yes and did choose the file correctly. Disable loading of file and add --save-position-on-quit in the Extra MPV Options UI also not working.

@gnome-mpv
Copy link
Collaborator

Can you try reproducing the bug again with logging enabled and post the log file here?

@FusionGold
Copy link
Author

FusionGold commented Oct 1, 2024

I have a video file called video_for_test.mkv, and i play it for 3-5 seconds, and then close it.
For test convenient, alias test='rm ~/.config/celluloid/watch_later/*; rm /tmp/celluloid.log;G_MESSAGES_DEBUG=all celluloid video_for_test.mkv --mpv-msg-level=all=trace > /tmp/celluloid.log'

Test with click close button:
close_button.log
now, do cat ~/.config/celluloid/watch_later/*:

# redirect entry
# redirect entry

Test with press q:
q.log
now, do cat ~/.config/celluloid/watch_later/*:

# redirect entry
start=3.670000
# redirect entry

Also to mention that this is an occasional issue. I tested by clicking the close button five times, and one time the watch_later recorded the correct position.

Test file with additional stderr message: (not sure if it's helpful.)
This time, alias test='rm ~/.config/celluloid/watch_later/*; rm /tmp/celluloid.log;G_MESSAGES_DEBUG=all celluloid video_for_test.mkv --mpv-msg-level=all=trace &> /tmp/celluloid.log'

Test with click close button and redirect stderr:
close_button_stderr.log

Test with press q and redirect stderr:
q_stderr.log

@gnome-mpv gnome-mpv reopened this Oct 1, 2024
@gnome-mpv
Copy link
Collaborator

Is close_button_stderr.log from when it failed to write a watch_later file?

3f2aef9 fixed a crash on exit that could prevent the watch_later file from being written, but it doesn't look like there's a crash happening in your log. I'm unable to reproduce the bug with the fix applied.

@FusionGold
Copy link
Author

Yes, for the close_button_stderr.log case, I immediately ran cat ~/.config/celluloid/watch_later/*, and it showed # redirect entry # redirect entry with no time logged. It's wired. Not sure if it's an OS specific issue, a Btrfs filesystem problem, or just an isolated case.

@FusionGold
Copy link
Author

if it's an OS specific issue

Can confirm no such issue with the flatpak version. The issue only exists when using the celluloid package from arch extra repo, or using celluloid-git from aur.

@rthery
Copy link

rthery commented Oct 16, 2024

I'm experiencing the same on 0.27 on a freshly installed Ubuntu 24.10, both with the snap and the ppa:xuzhen666/gnome-mpv versions
I have to use q for the position to save, closing with the application with the GUI close button won't save the last position

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

No branches or pull requests

3 participants