Page 1 of 1

Adding new subtitle provider

Posted: 01 Oct 2012, 12:21
by ytwig
Hi,

I would like to add an additional provider for subtitles, and wondered what's the best way to do that.
As i see it there are 2 options:

1. Use the groovy script ability - here i need to know how it's possible to get the "pretty" name of the file, so i can use it to query the subtitle.
2. Add the classes to main FileBot and compile the whole thing - as i see you don't use maven for dependencies, how do you manage these?

Is there a better option?

Thanks again for your work.

Re: Adding new subtitle provider

Posted: 01 Oct 2012, 13:03
by rednoah
1. You can easily use scripting for some specialized little solution, i.e. page scraper for a subtitle site that doesn't have an API.

2. Integrating into FileBot is easy, but you'll need to implement the SubtitleProvider interface and add your new implementation to WebServices. I've checked in all the dependencies so just check out /trunk and it'll immediately compile.

Re: Adding new subtitle provider

Posted: 01 Oct 2012, 13:27
by ytwig
Thanks, i think ill go with the scripting solution.
How can i get the clean media file info? meaning if it's a TV show then the episode information, or a clean movie title.

Re: Adding new subtitle provider

Posted: 01 Oct 2012, 14:15
by rednoah
This is related and get you up to speed on the extra functions that FileBot scripting adds:
http://filebot.sourceforge.net/forums/v ... =259#p1957

All that stuff is actively used in the utorrent-postprocess:
http://filebot.sourceforge.net/forums/v ... =215#p1561

Since you're probably building a page scraper you should check out JSoup:
http://filebot.sourceforge.net/forums/v ... =280#p1956

Re: Adding new subtitle provider

Posted: 01 Oct 2012, 19:19
by ytwig
Thanks for the references, i start working and update on the result.