Load next automatically
Keith94 opened this issue · 6 comments
Loading next file automatically doesn't seem to work. I'm using latest mpv on Windows.
This is what I tried:
- Set
load_next_automatically = true
innextfile.lua
, doesn't work. - Added
n script-binding autonextfiletoggle
ininput.conf
, I can see the OSD messages but it still doesn't work.
Does manually loading next files work? If that works then there might be some underlying difference in how linux and windows treats closing and opening events. I'll take a look if I have the same problem when I get my hands on my windows machine tomorrow.
Does manually loading next files work?
Yes it does, I've added SHIFT+PGDWN script-binding nextfile
and it works correctly. My only gripe is the command prompt window that pops up briefly.
It seems I had only left an unused remnant that caused this bug. Can you try if it works now?
As for the command prompt it's an unfortunate feature but it can be avoided by running mpv with mpv.com instead of mpv.exe
Hmm, not fixed for me. I set load_next_automatically = true
in the new file.
- mpv window closes after the current playback ends.
- Loading next file manually causes infinite loop bug.
Okay I still had a bug in there even though it didn't create an infinite loop for me, only double skip. For me it works now without any double skips, or infinite loops.
The problem with load next automatically was that it actually only works when mpv is launched with --idle or mpv.conf has idle=yes. Since otherwise the player has closed and cannot open another file. I'm going to remove this functionality from this script completely since it's inconsistent, niche and requires idle. But if you'd like the fixed version it's here. The infinite loop bug might still exist for you since I couldn't reproduce it.
I suggest using an automatic playlist creator like autoload/playlistmanager instead, which will fix the command prompt issue, and files flickering between opening.
Yeah, the feature works now after I added idle=yes
. No loop bug, etc. Thanks for the fix.
I will also check out the other scripts you mentioned.