gpenverne/opensubtitles

A bundle for kminek/open-subtitles

1.0 2017-01-15 11:00 UTC

This package is not auto-updated.

Last update: 2024-05-12 00:37:44 UTC


README

This repo provides a service for symfony3 to handle the kminek/open-subtitles client. This client allow to fetch subtitles from opensubtitles.org

Config/Parameters

Set your parameters.yml with your custom credentials:

parameters:
    opensubtitles.username: ~
    opensubtitles.password: ~
    opensubtitles.user_agent: OSTestUserAgentTemp

Load the bundle from your AppKernel.php file:

$bundles = [
    new Gpenverne\OpenSubtitlesBundle\OpenSubtitlesBundle(),
    ...,
];

Use it

    $this->container->get('opensubtitles_api')->getSubtitles('A movie title');
    $this->container->get('opensubtitles_api')->getSubtitles(1234); // Search from imdbid
    $client = $this->container->get('opensubtitles_api')->getClient(); // Return the kminek/open-subtitles client