u8sand / Baka-MPlayer

The libmpv based media player
https://u8sand.github.io/Baka-MPlayer/
GNU General Public License v2.0
431 stars 93 forks source link

Option to disable auto-population of playlist #245

Open 0ion9 opened 7 years ago

0ion9 commented 7 years ago

Synopsis: The auto-population mechanic actively interferes with user selection and ordering of files. even in cases where the desired files are the only ones present in a directory. Awkward workarounds are necessary to obtain a manual ordering and selection. An option that disables auto-population, and inserts exactly and only the files specified in the order specified, is one way to address this.

As the docs say:

The playlist is automatically populated by loading the files in the directory of the loaded file. If a folder is opened by drag and dropping it, the files in the immediate folder directory will be automatically populated (not including subdirectories).

This behaviour makes opening individual lists of files very difficult, since playlists are not a realistic option: passing a playlist in (eg baka-mplayer /tmp/my-playlist.m3u) disables 'next/previous video' actions. (in fact, for some reason, when passing a playlist in, no entries are shown in the playlist, despite the fact that they continue to play... Possibly mpv is doing something you are not accounting for there?)

So far I have found one way I could get the exact files in the exact order I specify, with the ability to navigate through them:

  1. Create a directory /tmp/playlist
  2. Populate that directory with 1 line each from the actual playlist: I=1;while read LINE; do printf '%s\n' "$LINE" >> $(printf '/tmp/playlist/pl%03d.m3u' "$I"); I=$((I+1)); done) < /tmp/actualplaylist.m3u
  3. Start baka-mplayer
  4. Open /tmp/playlist/pl001.m3u
  5. The remaining files are auto-added, in the order specified

I found this rather contrived, and later tried to at least do it via N symlinks rather than N m3u files. Unfortunately, that didn't fully work, as the list includes images as well as video (baka-mplayer automatically finds all videos, and ignores any images found).