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

File loop keybinding not working in current version #4841

Open
caleidoscopio opened this issue Mar 4, 2024 · 3 comments
Open

File loop keybinding not working in current version #4841

caleidoscopio opened this issue Mar 4, 2024 · 3 comments
Labels

Comments

@caleidoscopio
Copy link

caleidoscopio commented Mar 4, 2024

I cannot create a working keybinding for the file loop command.

I added this keyboard shortcut but it doesn't do anything when I press it.

image
@low-batt
Copy link
Contributor

low-batt commented Mar 5, 2024

I will be labeling this as bug due to poor error reporting. Checking the IINA log file shows the following errors:

19:50:58.380 [iina][e] Return value -4 when executing key command loop-file
19:50:58.380 [mpv][e] [input] error: Command 'loop-file' not found.
19:50:58.381 [mpv][e] [input] error: Command was defined at main.

This was logged by the method handleKeyBinding in PlayerWindowController. Good to log the error, but this code should display an alert like is done if an invalid mpv option is added to the Additional mpv options setting in IINA's advanced settings.

As for why this is triggering an error…

From the mpv manual entry for loop-file:

--loop-file=<N|inf|no>, --loop=<N|inf|no>

Loop a single file N times. inf means forever, no means normal playback. For compatibility, --loop-file and --loop-file=yes are also accepted, and are the same as --loop-file=inf.

This is a mpv option, not a mpv command.

This can be changed using the mpv cycle-value command like so:

cycle-values loop-file "inf" "no"

@low-batt low-batt added the bug label Mar 5, 2024
@caleidoscopio
Copy link
Author

caleidoscopio commented Mar 6, 2024

Thank you, @low-batt.

Using cycle-value worked.

However, when I use this shortcut there's no OSD overlay, nor does a checkmark appear in the Playback menu. One should appear saying File loop: on-off.

My workaround was using the macOS system shortcuts.

@low-batt
Copy link
Contributor

low-batt commented Mar 8, 2024

That an OSD message is not shown is a defect.

In the Playlist menu the checkmark appears next to the File Loop menu item for me. But the button on the Playlist Panel does not reflect that looping is enabled. So something is broken.

@uiryuu has been working on the playlist. I will mention this to him.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants