Adding new subtitle provider

All your suggestions, requests and ideas for future development
Post Reply
ytwig
Posts: 9
Joined: 16 Sep 2012, 22:36

Adding new subtitle provider

Post 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.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Adding new subtitle provider

Post 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.
:idea: Please read the FAQ and How to Request Help.
ytwig
Posts: 9
Joined: 16 Sep 2012, 22:36

Re: Adding new subtitle provider

Post 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.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Adding new subtitle provider

Post 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
:idea: Please read the FAQ and How to Request Help.
ytwig
Posts: 9
Joined: 16 Sep 2012, 22:36

Re: Adding new subtitle provider

Post by ytwig »

Thanks for the references, i start working and update on the result.
Post Reply