btplay needs to escape spaces or quote path names
bim9262 opened this issue · 9 comments
When you open files using btplay, on line 84 or the file name contains space is it (ie the name of the file being torrented) then the player will be unable to find the file(s).
maybe you could use: media = map(lambda x: '"' + x + '"', media)
That's odd - we don't use shell=True
so that shouldn't happen I think. What OS are you using?
Linux 4.4.1-2-ARCH x86_64 GNU/Linux
Tested with Python 3.5.1 and Python 2.7.11
Interesting. I would think that media
would already have split up the file names with spaces, given that subprocess.call
doesn't do that. However, I see no reason that would happen with media
either.
My apologies, the version that is packaged with arch is different than what is posted here on the repo. It uses the following:
ret = subprocess.call(
"%s %s" % (cmd, " ".join(media)),
shell=True,
stdin=sys.stdin)
There was a rewrite of btplay recently. I would assume it didn't escape before that.
Assuming this issue doesn't persist in the new version, you can close the issue.
Thanks, will do. I'll flag the arch package as out of date too.
That fix isn't in an official release yet, so the package isn't out of date. It's currently just in git. @johang maybe add a new release with the new btplay script?