Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
Firefox compatibility and many improvements (#89)
Browse files Browse the repository at this point in the history
* - Make extension compatible with Firefox
- Improve episode title detection

* Update extension.zip

* - Migrate to Webpack
- Add options menu
- Various fixes and improvements

* - Many bug fixes and enhancements
- Add PT-BR locale
- Fix tests
- Up version

* Update README.md

* - Fix collections detection

* Update README.md

* - Use Netflix API instead of scraping the HTML (close #1)

* - Improve loading time of activity history (closes #2)

* - Fix webpack.config

* - Rename config.json.dev to config.dev.json

* - Add Firefox to .travis.yml

* - Possible fix for Travis

* - Implement cache and database for history sync (close #3)
- Add option to disable scrobbling (close #4)

* - Improve error handling when updating item in history sync (close #5)

* - Make requests to the Netflix API using English (close #7)
- Disable sync checkbox if item was not found on Trakt (close #8)
- Make sure that when 'Select all' is toggled, items that are disabled are not checked (close #9)

* - v2.0.1

* - Fix a bug that only triggers the extension when installing/updating on Firefox (close #10)
- Migrate tests from Jasmine to Mocha + Chai (close #11)
- v2.0.2

* v2.0.3

* v2.0.4

-  Fix a bug that happens when updating shows (close #14)
  • Loading branch information
Rafael authored and tegon committed Dec 27, 2018
1 parent 7d6b4d3 commit fbc8807
Show file tree
Hide file tree
Showing 180 changed files with 8,046 additions and 3,487 deletions.
38 changes: 38 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"env": {
"production": {
"presets": [
["minify",
{
"builtIns": false
}
]
]
},
"test": {
"plugins": [
[
"istanbul",
{
"include": [
"src/**/*.js"
]
}
]
]
}
},
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"regenerator": true
}
]
],
"presets": [
"@babel/preset-env",
"@babel/preset-flow",
"@babel/preset-react"
]
}
36 changes: 36 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"env": {
"browser": true,
"es6": true,
"mocha": true,
"node": true,
"webextensions": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended"
],
"globals": {
"expect": false
},
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 9,
"sourceType": "module"
},
"plugins": [
"mocha",
"sinon"
],
"rules": {
"no-console": "off",
"no-constant-condition": [
"error",
{
"checkLoops": false
}
],
"no-empty": "off",
"no-fallthrough": "off"
}
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ build
*.crx
*.pem
coverage
app.zip
config.json
.idea/
app.zip
src.zip
package-lock.json
25 changes: 0 additions & 25 deletions .jshintrc

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.12.0
v10.11.0
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
language: node_js
node_js:
- "0.10"
- "0.11"
- "0.12"
script: "npm test"
- "node"
script: "xvfb-run npm test"
after_script:
- "cat ./coverage/**/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
- "cat ./coverage/**/lcov.info | ./node_modules/coveralls/bin/coveralls.js"
37 changes: 25 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@
</h1>


<h4 align="center">Netflix and trakt.tv integration.</h4>
<h4 align="center">A Trakt.tv scrobbler for Netflix.</h4>

<p align="center">
<a href="https://github.com/tegon/traktflix/releases"><img src="https://img.shields.io/github/release/tegon/traktflix.svg" alt="github release"></a>
<a href="https://travis-ci.org/tegon/traktflix"><img src="https://img.shields.io/travis/feross/webtorrent/master.svg" alt="travis"></a>
<a href="https://coveralls.io/github/tegon/traktflix?branch=master"><img src="https://coveralls.io/repos/tegon/traktflix/badge.svg?branch=master&service=github" alt="coveralls"></a>
<a href="https://chrome.google.com/webstore/detail/traktflix-netflix-and-tra/bmoemkaigjgcgjjnpmdgkifndiidkeji"><img src="https://img.shields.io/chrome-web-store/d/bmoemkaigjgcgjjnpmdgkifndiidkeji.svg" alt="downloads"></a>
<a href="https://github.com/gsrafael01/traktflix/releases"><img src="https://img.shields.io/github/release/gsrafael01/traktflix.svg" alt="github release"></a>
<a href="https://travis-ci.com/gsrafael01/traktflix"><img src="https://travis-ci.com/gsrafael01/traktflix.svg?branch=master" alt="travis"></a>
<a href='https://coveralls.io/github/gsrafael01/traktflix?branch=master'><img src='https://coveralls.io/repos/github/gsrafael01/traktflix/badge.svg?branch=master' alt='Coverage Status' /></a>
</p>

<p align=left">
<a href="https://addons.mozilla.org/en-US/firefox/addon/traktflix"><img src="https://discourse-paas-production-content.s3.amazonaws.com/original/3X/c/0/c03e12b8fae82e431eabaf0f6e250bfc78504182.png" alt="Get the add-on"></a>
</p>

### Table of Contents
Expand All @@ -32,8 +35,8 @@ Automatically scrobble TV show episodes and movies you are watching to Trakt.tv!

### Why do I need this extension?
Trakt.tv has a [lot of plugins](http://trakt.tv/downloads) to automatically scrobble the movies and episodes you watch from your media center.
But I found nothing to integrate with Netflix, so I created this extension.
Every time you click to play something on Netflix, it will send the scrobble to Trakt.tv. Cool, isn't it?
But there are none for Netflix.
This extension allows you to scrobble from Netflix to Trakt.tv. Cool, isn't it?

### How does traktflix work?
Unfortunately Netflix doesn't provide a public API, so the movie or episode info is extracted from the HTML of the player.
Expand All @@ -43,20 +46,20 @@ This extension only works with Netflix HTML player and new layout. If you are in
See this link for more info: https://help.netflix.com/en/node/23742

### Problems
If you find any problems or have suggestions or questions, feel free to [open an issue](https://github.com/tegon/traktflix/issues/new)
If you find any problems or have suggestions or questions, feel free to [open an issue](https://github.com/gsrafael01/traktflix/issues/new)

### Development
Create an application in [Trakt API](http://trakt.tv/oauth/applications/new).

Don't forget to check `/scrobble` permission.

In `Redirect uri:` put `https://{extensionId}.chromiumapp.org`
In `Redirect uri:` put `https://www.netflix.com/Activate`

In `Javascript (cors) origins:` put `https://{extensionId}.chromiumapp.org` and `chrome-extension://{extensionId}`
In `Javascript (cors) origins:` put `http://www.netflix.com, moz-extension:// and chrome-extension://`

Copy the `config.json` example file and change Trakt.tv credentials:
```bash
cp config.json.dev config.json
cp config.dev.json config.json
```

Use [nvm](https://github.com/creationix/nvm) to run in the correct version of node
Expand All @@ -75,7 +78,12 @@ To run in development mode
npm start
```

To get build version (generates app.zip, ready for chrome store)
To get build version for development mode (unlike npm start this does not watch the files for changes)
```bash
npm run build-dev
```

To get build version for production mode (generates app.zip, ready for deployment)
```bash
npm run build
npm run zip
Expand All @@ -86,6 +94,8 @@ To run tests
npm test
```

The commands above have only been tested on Linux.

### Credits
<h3 align="center">
<a href="https://tegon.github.io/traktflix/">
Expand All @@ -99,4 +109,7 @@ npm test
This product uses the TMDb API but is not endorsed or certified by TMDb. <br>
This product uses the Trakt.tv API.

[tegon](https://github.com/user/tegon) is the original developer of this extension.
Since it was not having many updates in the past year and was also removed from the Chrome store, I took it upon myself to work on it and finally port it to Firefox.

[LICENSE](LICENSE)
Loading

0 comments on commit fbc8807

Please sign in to comment.