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

Mpv Problems #13

Closed
ghost opened this issue Jul 30, 2020 · 19 comments
Closed

Mpv Problems #13

ghost opened this issue Jul 30, 2020 · 19 comments

Comments

@ghost
Copy link

ghost commented Jul 30, 2020

I am trying to use devour with mpv on hersbstuftwm, but the termial just fades out and then fades back in again. I know the script works because it works with emacs.

@salman-abedin
Copy link
Owner

salman-abedin commented Aug 2, 2020

Give the new version a shot. BTW, are you, by any chance, using alias to launch mpv?

@ghost
Copy link
Author

ghost commented Aug 4, 2020

I have tried using the new version with no luck. I am not using an alias

@rasmus-kirk
Copy link

I have the same problem with a single .webm file. If I just open with mpv it works though. Devouring other video files has worked so far.

@rusty-electron
Copy link

I am facing the same issue with mpv too.

@inco-cc
Copy link

inco-cc commented Aug 23, 2020

if you guys are having issues with devouring mpv when using something like youtube-viewer or straw-viewer (or just from a URL of some kind), I use the following wrapper for mpv:

#!/bin/bash

# run mpv in devoured mode with escaped args
devour /usr/bin/`basename $0` `printf %q\  "$@"`

which appears to solve the issue of devouring mpv with a URL

it uses printf to format the arguments to be used properly in the shell (as described here)

NOTE: this isn't a POSIX-compliant solution, since printf in sh doesn't support this

@salman-abedin
Copy link
Owner

salman-abedin commented Aug 23, 2020

Guys, let me have a look at your devour execution by sharing with me a demonstration(GIF/Video).

@rusty-electron
Copy link

@salman-abedin I realized that the issue appears only when opening files that have spaces in their names. It works fine otherwise.

@salman-abedin
Copy link
Owner

salman-abedin commented Aug 24, 2020

@rusty-electron
I had a feeling the issue would be somewhere along that line due to devour being such a simple program.
However, I have explicitly built this feature into devour and tested it thoroughly and I can tell with a good bit of certainty that the issue is not with the script.
You are probably launching the file incorrectly.
That is why I asked for a demonstration.
Then, it would be much easier for all of us to figure out what is actually up.

@rusty-electron
Copy link

@salman-abedin here you go. https://youtu.be/03QDuHaJ3dI

@salman-abedin
Copy link
Owner

salman-abedin commented Aug 24, 2020

@rusty-electron
As I suspected. First of all, you are not using devour in Unsafe mode where you would prefix your unsafe file with " - - " (refer back to the doc).
Second, notice that you let your shell escape the spaces using backslashes.
Devour actually does that for you.
So basically you end up with two backslashes instead of one.
As far as the fix is concerned, I'm gonna write a check for you guys so that the program accounts for such mistakes.
Either way, you're gonna have to use the prefix if you wanna launch unsafe file properly.
I appreciate you going through the trouble btw. =)

@rusty-electron
Copy link

Thanks, I will keep the UNSAFE (--) option in mind. I will also be looking out the double backslash fix. Keep up the good work 😀.

@antaxiom
Copy link

I also have this issue but I can't seem to fix it by using -- or putting my file name in quotes instead I'm using devour as such devour mpv -- "[example] file.mkv". (Yes the file I'm using has brackets in them so I used that as an example) I've had devour work with things like sxiv so what exactly is the problem with my usage?

@salman-abedin
Copy link
Owner

salman-abedin commented Aug 26, 2020

@antaxiom @rusty-electron
Just pushed the fixes for you guys. Tested for both of your use cases. Should be fine now, probably for all of you.
Give it a spin and kindly let me know how it went.

FYI: You no longer have to use -- to distinguish between safe and unsafe files.
Either escape the spaces using backslashes like @rusty-electron or quote the file name like @antaxiom.

@rusty-electron
Copy link

@salman-abedin it works like a charm! thanks for the fix 😀

@antaxiom
Copy link

Hi, thanks for all the great work you've done for this! I'm still having trouble with this. Now whenever I open a window with devour it takes no more no less than 40 seconds to open which makes it utterly unusable. On another note if the file has spaces (or brackets I'm not sure) I'll get an error like zsh:1: no matches found: [Sample Text] (my file here started with a section in brackets and I'm a zsh user). Incidentally I did another test where I ran my mpv command (which works) then did devour !! and that actually seemed to work perfectly on a file with no spaces. So it seems the bug with things with spacing in them are still there. I did build devour from source but if I did anything wrong please inform me. I'd like to help this project as much as possible.

@ghost
Copy link
Author

ghost commented Sep 1, 2020

@antaxiom @rusty-electron
Just pushed the fixes for you guys. Tested for both of your use cases. Should be fine now, probably for all of you.
Give it a spin and kindly let me know how it went.

FYI: You no longer have to use -- to distinguish between safe and unsafe files.
Either escape the spaces using backslashes like @rusty-electron or quote the file name like @antaxiom.

Thanks, it now works, the only thing I noticed was it seemed to be starting my shell again

@antaxiom
Copy link

antaxiom commented Sep 1, 2020

I wanted to put up an update about devour, I always installed the AUR repo but now I tried installing but hand and it worked like a charm, sorry for the inconvenience. Thanks to the dev for the useful improvements.

@salman-abedin
Copy link
Owner

Didn't know someone packaged devour for the AUR. That's pretty cool.
However, that also means I'm not responsible for that particular package.
In any case, closing this thread guys.
If you face any further issues, just reopen the thread.

@rusty-electron
Copy link

rusty-electron commented Sep 13, 2020

Hi, @salman-abedin sorry to bother you again but devour has the same issue I previously had, this time it is with filenames that have parentheses in them.

image

mpvd is an alias for devour mpv

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

5 participants