diff --git a/README.md b/README.md index 0f4c0de..6034853 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,8 @@ We are welcome any contributing: bug fixes, improvements, code refactoring and o [Translation guide](docs/TRANSLATION.md) +[Own strategy / Other tracker support](docs/TRACKERS.md) + ## Usage Manuals * [English](docs/USAGE.md) * [Russian](docs/USAGE.RU.md) diff --git a/docs/TRACKERS.md b/docs/TRACKERS.md new file mode 100644 index 0000000..9fec4e0 --- /dev/null +++ b/docs/TRACKERS.md @@ -0,0 +1,36 @@ +## Implementation own tracker strategy + +In a case you wanna add support of getting description from any web tracker, here the instruction: + +## Strategy implementation + +You need to create folowing files: + +1. src/background/strategies/`newStrategy`.js (your strategy implementation) - [Examples](../src/background/strategies) +2. tests/strategies/`newStrategy`.js (test for your strategy) - [Examples](../tests/strategies) + +You need to implements follwing methods: + +* `get name()` - Name of the strategy +* `async findHash()` - Return object of respoce type +* * Example of respoce object: +```json +{ + name: 'Name of torrent', + poster: 'Link to poster of torrent', + description: 'Description of torrent in text format.', + contentCategory: 'Category of torrent' + ... Other additional files +} +``` + +## Client modification: + +Add post to `app/trackers-images.js`: +```javascript +{ + info.trackers.includes('1337x') + && + +} +``` \ No newline at end of file