GithubHelp home page GithubHelp logo

sovilor / wako2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gitter-badger/wako

0.0 0.0 0.0 3.48 MB

A trakt.tv client that plugs with kodi and elementum addon (https://github.com/elgatito/plugin.video.elementum)

License: Other

JavaScript 0.61% TypeScript 79.16% CSS 3.92% HTML 16.31%

wako2's Introduction

What is it?

wako is a mobile app (for now) build with ionic to sync what you're watching with trakt.tv. It also provides a simple remote control for Kodi and allow you to play any movies or tv shows (using providers) via Elementum addon

Features

  • Trakt.tv movies and shows sync
  • Notification on new aired episodes
  • Kodi remote control
  • Play any media from provider to kodi thanks to Elementum addons

Installation

Android

Go on the release page, download and install the latest apk for your device.

iOS

You have to build by yourself the app and running it on your device using xcode.

How it works?

Launch the app, sign in with trakt.tv and there you go.

Kodi

If you want to use wako as a kodi remote control you need to allow remote control via HTTP in Kodi > Settings > Services > Control. Then configure the host on wako > Settings > Kodi

Provider

When you navigate to a movie or tv show, wako is trying to find some sources for this media by using the providers you set. wako doesn't provide any providers, it has to be added manually in Settings > Providers. You need to add a list of providers in a JSON format:

{
  "my_first_provider": {
    "name": "MyProvider",
    "enabled": true,
    "enabled_in_list": true,
    "languages": ["en"],
    "base_url": "https://www.my-provider.com/search/",
    "response_type": "text",
    "movie": {
      "query": "{query}/Movies/1/",
      "keywords": "{title} {year}"
    },
    "episode": {
      "query": "{query}/TV/1/",
      "keywords": "{title} {episodeCode}"
    },
    "html_parser": {
      "row": "doc.querySelectorAll('tbody > tr')",
      "title": "row.querySelector('a:nth-child(2)').innerHTML",
      "peers": "row.querySelector('.leeches').innerHTML",
      "seeds": "row.querySelector('.seeds').innerHTML",
      "size": "row.querySelector('tbody > tr .size').textContent.split('B')[0] + 'B'",
      "url": "'https://www.my-provider.com/'+ row.querySelector('a:nth-child(2)').getAttribute('href')"
    }
  }
}

Here are all the properties that can be set:

export interface Provider {
 name: string;
 enabled: boolean;
 enabled_in_list: boolean;
 languages: string[];
 base_url: string;
 response_type: 'json' | 'text';
 time_to_wait_between_each_request_ms?: number;
 time_to_wait_on_too_many_request_ms?: number;
 token?: {
   query: string;
   token_validity_time_ms?: number;
   token_format: {
     token: string;
   };
 };
 movie?: {
   query: string;
   keywords: string;
 };
 episode?: {
   query: string;
   keywords: string;
 };
 json_format?: {
   results: string;
   sub_results?: string;
   url: string;
   title: string;
   seeds: string;
   peers: string;
   size: string;
   quality?: string;
 };
 html_parser?: {
   row: string;
   url: string;
   title: string;
   seeds: string;
   peers: string;
   size: string;
 };
}

Test a provider

  1. Clone the project, go into it, install dependencies npm i
  2. Edit the spec: src/app/shared/queries/torrents/torrent-from-provider.query.spec.ts
  3. Run the tests with ng test. This will open your browser and run the tests. Because of CORS issue you might have, you should bypass them see (https://www.thepolyglotdeveloper.com/2014/08/bypass-cors-errors-testing-apis-locally)
  4. To debug your provider see what's going on here: src/app/shared/queries/torrents/torrent-from-provider.query.ts:175 if you set response_type to json or here: src/app/shared/queries/torrents/torrent-from-provider.query.ts:251 in the other case

Screenshots

wako2's People

Contributors

jumbay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.