GhostNaN / mpvpaper

A video wallpaper program for wlroots based wayland compositors.
GNU General Public License v3.0
713 stars 21 forks source link

How can I create a playlist? #58

Closed ZreXoc closed 6 months ago

ZreXoc commented 6 months ago

I have a pl_wallpaper.txt which contains the path to my wallpapers. And I want to run like this: mpvpaper "*" -o "--profile=wallpaper --playlist=.config/mpv/pl_wallpaper.txt" But i get [-] Not enough args passed

Is it possible to create a playlist from a txt or somewhere?

ZreXoc commented 6 months ago

btw, -o "--profile=..." not work as well, so do my scripts

GhostNaN commented 6 months ago

I have added the feature you requested here: https://github.com/GhostNaN/mpvpaper/commit/a25ec0c2de53b3742cb7db77f3615b94c78b7705 It was a bit of a mess to implement as mpv straight up ignores --playlist with libmpv. And I also fixed the profile not loading by loading the config files in a better way here: https://github.com/GhostNaN/mpvpaper/commit/99080dc4b5589cff73dd401166209b6182f6162b

Let me know if this worked for you.

ZreXoc commented 6 months ago

playlist works as expected. But it's quiet strange that https://github.com/GhostNaN/mpvpaper/commit/a25ec0c2de53b3742cb7db77f3615b94c78b7705 (and previous build, sorry for that) loads my mpv.conf, but failed with scripts. The https://github.com/GhostNaN/mpvpaper/commit/99080dc4b5589cff73dd401166209b6182f6162b is opposite(scripts loaded, mpv.conf doesn't)

Anyway, thank you for creating the program. It's what I'm looking for :)

GhostNaN commented 6 months ago

But it's quiet strange that a25ec0c (and previous build, sorry for that) loads my mpv.conf, but failed with scripts.

Yeah because I was loading the configs manually because libmpv disables loading by default. So the solution was to just enable configs=yes with mpv_set_option_string(mpv, "config", "yes"); I just wasn't aware of this before. https://github.com/mpv-player/mpv/blob/c6ccabe5854254320b175cde4106ec40d7a30946/libmpv/client.h#L442-L450

The 99080dc is opposite(scripts loaded, mpv.conf doesn't)

That shouldn't be possible, it works fine for me loading ~/.config/mpv/mpv.conf What are you looking for? Try something obvious like adding video-zoom=2 temporarily to mpv.conf Otherwise perhaps the config-dir does need to be set after all like said in the above link.

ZreXoc commented 6 months ago

My fault, mpv.conf is loaded actually. It's --profile=... not work

GhostNaN commented 6 months ago

So... --profile= didn't work before or afterward right?

I think this is another libmpv quirk that I don't have control over. As I believe libmpv will load it's own profile=libmpv by default, sorry. https://github.com/mpv-player/mpv/blob/d90a5ff17a88cbda2ac64cccf1cd98456f2d0ab2/libmpv/client.h#L461