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

Auto download subtitles #677

Closed

Conversation

codealchemist
Copy link
Contributor

Added subtitles autoloading.
Uses OpenSubtitles API.
All available subtitles for configured language are downloaded into the subs folder on the torrent path.
Then, one after one they are loaded into WebTorrent.
It's a brute force approach to subtitle loading.

TODO: add subtitles preferences with language selector and total amount of downloaded subtitles limit.

@codealchemist
Copy link
Contributor Author

Another todo: avoid re-downloading existing subs.

@codealchemist
Copy link
Contributor Author

I've found issues with single video files.
Fixing that.

@codealchemist
Copy link
Contributor Author

Another TODO: add app notifications for errors.

@mathiasvr mathiasvr changed the title Autoload subtitles Auto download subtitles Jun 26, 2016
@mathiasvr
Copy link
Contributor

I also thought about adding a subtitle downloader, but I think it would make more sense as a plugin in relation to #664. However if many people is interested in this I guess it would make sense to include it by default.

Also I edited the title, since I initially thought this was about loading embedded subtitles (like in mkv files).

@codealchemist
Copy link
Contributor Author

Thanks for the title adjustments @mathiasvr!
If we can create a plugin repository for WebTorrent that would be awesome.
I'm thinking about something like Sublime Text's Package Control, which is integrated into the app.
I'd like to help with the subtitles downloader either way.
Whatever the community and the project maintainers prefer.

@dcposch
Copy link
Contributor

dcposch commented Jul 4, 2016

i don't like hitting a central server every time a file is opened. not ideal for privacy or performance.

what about checking OpenSubtitles only after the user clicks the CC button?

currently, that pops open an Open File dialog

we could make it show a menu instead: Open Subtitles File, Search OpenSubtitles. If the user clicks that second option, it would show a loading spinner, then a list of available languages. they can select one to download and use that subtitle track.

to be honest, i'm not sure we need this. i don't know any video player that has this feature. even VLC supports it only via a third-party plugin called VLsub.

@codealchemist
Copy link
Contributor Author

@dcposch, the latest code on the PR allows enabling / disabling automatic subtitles downloading from preferences.
I still think we should not download already downloaded subtitles, that's not terrible but it's not good enough.

But in general it's a cool and useful feature that might be appreciated by anyone who uses subtitles.
It makes it tremendously easy to get subtitles, even easier than with VLSub where you need to make several clicks and write stuff manually to identify the video file (we can't just use hashes when streaming since the file isn't downloaded yet and can't be hashed).

That being said, I really like the idea of having a plugin repository integrated in the app.
And I'm looking forward to help with that if I can and if that's something wanted.
:)

@feross
Copy link
Member

feross commented Jul 30, 2016

Thanks for the PR, but we're not going to add this feature to WebTorrent Desktop, because the legality of OpenSubtitles is not clear to us.

Once there's a plugin system, I suppose you could build this as a plugin. But it's not something the WebTorrent team can endorse.

@feross feross closed this Jul 30, 2016
@codealchemist
Copy link
Contributor Author

I see. Thanks for the explanation @feross!
:)

@feross
Copy link
Member

feross commented Jul 30, 2016

Sure thing. 👍

@janat08
Copy link

janat08 commented Sep 25, 2017

There're some other players that use this that are open source, likely even copyleft. I don't know which one I use that has it. Perhaps ask them about it.

@janat08
Copy link

janat08 commented Sep 26, 2017

SMPlayer has it and is GNU.

@janat08
Copy link

janat08 commented Sep 26, 2017

I say if you let user decide what and if he wants the subtitles choosing "find subtitles" option, then it becomes his responsibility what happens right?

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants