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

iina-cli --mpv-shuffle does not shuffle playlist #4434

Open
1 task done
low-batt opened this issue May 27, 2023 · 1 comment · Fixed by #4439
Open
1 task done

iina-cli --mpv-shuffle does not shuffle playlist #4434

low-batt opened this issue May 27, 2023 · 1 comment · Fixed by #4439

Comments

@low-batt
Copy link
Contributor

System and IINA version:

  • macOS 13.4
  • IINA 1.3.1

Expected behavior:
Executing iina-cli --mpv-shuffle ~/Movies plays files in random order as per the documented behavior of the mpv shuffle option.

Actual behavior:
The files in the directory are always played in the same order.

From a quick look at the code, it appears IINA is processing the directory itself and adding the files to the playlist one by one. Possibly if IINA passed the directory to mpv it would load the files and shuffle the playlist. If that is not feasible then IINA needs to recognize and implement this mpv option.


Steps to reproduce:

  • Put multiple video files into a directory
  • Start IINA using iina-cli, specifying --mpv-shuffle and the directory containing the video files
  • Click on Show Playlist Panel under the Playback menu
  • Take note of the order of the files in the playlist
  • Repeat
  • The same file starts playing and the playlist order has not changed
  • MPV does not have this problem.

How often does this happen?
Every time.

@svobs
Copy link
Contributor

svobs commented Jun 1, 2023

From a quick look at the code, it appears IINA is processing the directory itself and adding the files to the playlist one by one. Possibly if IINA passed the directory to mpv it would load the files and shuffle the playlist. If that is not feasible then IINA needs to recognize and implement this mpv option.

I went ahead and implemented exactly the change you suggested in PR #4439, following the pattern used for BD folders and playlist files. Seems to do the job.

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

Successfully merging a pull request may close this issue.

3 participants