Go to file
Lucas Verney 6a2a6a7dc1 Update doc 2024-03-05 21:03:41 +01:00
public Move to Justwatch newer API/graphql 2024-03-05 11:29:17 +01:00
README.md Update doc 2024-03-05 21:03:41 +01:00

README.md

Multiwatcher

Find out which services offer a given movie or show title across a matrix of localizations.

Relies on data from Justwatch.com.

Usage

Just open public/index.html with your browser.

Serve it with a web server

If you want to serve this code with a webserver, clone this repository somewhere in your web server root and configure your webserver to proxy_pass to the underlying API.

For nginx, you can use the following snippet, replacing the server names and paths by your own configuration:

server {
    listen       80;
    server_name  multiwatch.example.com;

    location / {
        root   /path/to/multiwatch/public;
        index  index.html;
    }
}

server {
    listen       80;
    server_name  justwatch.example.com;

    location / {
        if ($request_method = OPTIONS ) {
                return 200 'OK';
        }

        root   /dev/null;
        proxy_pass https://apis.justwatch.com/;
        proxy_set_header 'Origin' 'apis.justwatch.com';

        add_header 'Access-Control-Allow-Origin' '*';
        add_header 'Access-Control-Allow-Credentials' 'true';
        add_header 'Access-Control-Allow-Headers' 'content-type';

    }
}

Then, edit the API domain in the public/index.html to match your configuration. For the above snippet, this would result in:

var JUSTWATCH_API_DOMAIN = 'http://justwatch.example.com';

License

Code published under an MIT license.

Copyright 2020 Phyks

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.