mpv.net icon indicating copy to clipboard operation
mpv.net copied to clipboard

Can't navigate to previous file in playlist and rewinding problem

Open 1024mb opened this issue 3 years ago • 6 comments

Describe the bug I had the problem with the input.conf file which was an older version and some commands weren't working, among those that got updated were these two:

DOWN       script-message-to mpvnet playlist-add -1 #menu: Navigate > Previous File
UP         script-message-to mpvnet playlist-add  1 #menu: Navigate > Next File

(UP and DOWN is how I've configured them)

Before those commands were

DOWN       playlist-prev                 #menu: Navigate > Previous File
UP         playlist-next                 #menu: Navigate > Next File

With the old conf file I could navigate to the previous file though to do this mpv.net first rewinded the current file and then if pressed again went back to the previous file. Now with the new conf file when I press DOWN to go to the previous file the current file gets rewinded forever, no matter how many times I press DOWN it wont go to the previous file, it will keep rewinding the current file. Even so, and this is not a bug I'm guessing, I would like to ask for Navigate > Previous File to send to the previous file directly without rewinding because the current way the progress of the current file is reset.

The playlist has 4611 files, almost every single file is in a different folder, there are some files that share the same directory.

To Reproduce Steps to reproduce the behavior:

  1. Create a playlist
  2. Navigate to whatever file that is not the first one
  3. Press the hotkey to go to the previous file
  4. See behavior

Expected behavior mpv.net should move directly without rewinding to the previous file

1024mb avatar Jul 08 '22 23:07 1024mb

To add: When poressing F8 to see the playlist and clicking on a file mpv.net plays the next one, if you keep selecting the file it keeps playing the next one. Also the problem in the OP doesn't happen with every file, somethings it does change to the previous file, it seems random.

1024mb avatar Jul 09 '22 00:07 1024mb

You can still use the old playlist-prev and playlist-next commands because that are mpv commands.

If that don't help, then please read here:

https://mpv.io/manual/master/#options-keep-open

https://mpv.io/manual/master/#options-keep-open-pause

stax76 avatar Jul 10 '22 08:07 stax76

I just noticed why it's happening, whenever a file has an emoji in its filename I can't go to the previous file and it's not even about not being able to go to the previous file, the app doesn't play any file that has some emojis in their filenames in this playlist, some that do have other emojis do play without problems.
For instance try to add this to a filename: 😈 and create a pls playlist, this is how it looks in the UTF-8-BOM PLS file: notepad++_2022-07-18_22-04-45 Then try to play that pls file, mpv.net wont load that file and the console will show that the file doesn't exists but playing the file directly works.

1024mb avatar Jul 19 '22 03:07 1024mb

How was the playlist created? It works in mpv and vlc? Please post the content of a playlist containing 3 files. Maybe it's triggered by forward vs backward slashes. I believe Linux related apps such as mpv expect files being UTF-8 without BOM.

stax76 avatar Jul 19 '22 06:07 stax76

I created the playlist using MPC-BE and leaving the default UTF-8 in the dialog. Neither VLC nor MPV can play the files that have emojis when the playlist is like that, MPC-BE does plays every file.

It's because instead of having this: notepad++_2022-07-26_22-09-43 The MPC-BE created UTF-8 BOM pls file has this: notepad++_2022-07-26_22-10-35

These are the values in hex: Correct file: 20 73 61 77 20 74 68 69 73 20 F0 9F 98 82 F0 9F 98 82 20 Problematic file: 20 73 61 77 20 74 68 69 73 20 ED A0 BD ED B8 82 ED A0 BD ED B8 82 20

The weird thing is that if I copy the problematic text opened in Notepad++ and then without doing anything else paste it, it will paste the correct text and the emojis will appear.

1024mb avatar Jul 27 '22 03:07 1024mb

I think the MPC-BE created .pls file isn't correctly UTF-8 encoded, you can request support here:

https://forum.doom9.org/showthread.php?t=165890

stax76 avatar Jul 27 '22 08:07 stax76