Webtorrent-desktop: Torrent name should be provided to the external player for auto subtitle download

Created on 23 Aug 2016  路  6Comments  路  Source: webtorrent/webtorrent-desktop

What version of WebTorrent Desktop? (See the 'About WebTorrent' menu)
0.12.0

What operating system and version?
Windows 7, Linux, Mac

What did you do?
Enabled external media player. Tried VLC and Media Player Classic

What did you expect to happen?
External player should see the name of the file/torrent

What actually happened?
VLC sees localhost, media player classic just says "0"

I believe this is fairly simple thing to do and it would allow external players' subtitle download facility to work properly.

bug good first contribution

All 6 comments

We do pass the name of the currently playing file to VLC, but only if the user has not changed the default "External Player" setting.

Once it has been changed, we're assuming that it's a player we don't know about and not passing any custom command line flags.

This can be fixed by looking at the executable name and passing different command line flags depending on the external player that is聽being used. (This would also fix the case where the user selects their own VLC.)

Ideally command line flags shouldn't be used at all. Correct me if I'm wrong but webtorrent streams the video file that means it can use whatever standard facility internet radios use to show titles on different players.

@tapir I like this idea, maybe we can use something like ICY metadata.

Ideally command line flags shouldn't be used at all.

But we're actually _launching_ the video player for the user, so it's not that crazy to just pass the right command line flags for them.

@mathiasvr

Found this (http://www.smackfu.com/stuff/programming/shoutcast.html). It's a simple format. We could handle this in the webtorrent library itself, in lib/server.js when the request contains a Icy-MetaData: 1 header. There's also this package (https://github.com/TooTallNate/node-icy) and here's how to use it (https://github.com/TooTallNate/node-icy/blob/master/test/writer.js). But honestly, the implementation looks a little complicated for what it's doing. It could probably be rewritten to use fewer dependencies.

No it's not crazy, it's jut lot of work to support all the players on all the platforms the way it's done now.

Another way would be to provide a {title} variable to the external player path textbox along with flag support users could place it the way they want.

Fixed in #1648

Was this page helpful?
0 / 5 - 0 ratings

Related issues

harry-cpp picture harry-cpp  路  3Comments

feross picture feross  路  3Comments

sorrykim picture sorrykim  路  5Comments

hicom150 picture hicom150  路  3Comments

grunjol picture grunjol  路  5Comments