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

Broken playlist_load_files with mpv v0.38.0 due to changed loadfile arguments #39

Open
marco-04 opened this issue Apr 20, 2024 · 0 comments

Comments

@marco-04
Copy link

The current version of mpv changed the loadfile instruction to take these arguments:

loadfile <url> [<flags> [<index> [<options>]]]

(from https://mpv.io/manual/stable/#command-interface-[%3Coptions%3E]]]) where index is a newly added argument.

The current implementation of playlist_load_files is

    pub fn playlist_load_files(&self, files: &[(&str, FileState, Option<&str>)]) -> Result<()> {
        for (i, elem) in files.iter().enumerate() {
            let args = elem.2.unwrap_or("");

            let ret = self.command(
                "loadfile",
                &[&format!("\"{}\"", elem.0), elem.1.val(), args],
            );

            if let Err(err) = ret {
                return Err(Error::Loadfiles {
                    index: i,
                    error: ::std::rc::Rc::new(err),
                });
            }
        }
        Ok(())
    }

and the args variable now takes the place of the new index argument.

(for reference, this was the old specification: https://web.archive.org/web/20240414164307/https://mpv.io/manual/stable/#command-interface-[%3Coptions%3E]])

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

No branches or pull requests

1 participant