Skip to content

Commit

Permalink
Merge pull request #8 from TriPSs/bookmarks
Browse files Browse the repository at this point in the history
Bookmarks
  • Loading branch information
TriPSs authored Jul 18, 2017
2 parents 0a283c3 + c3c6946 commit 4169a91
Show file tree
Hide file tree
Showing 199 changed files with 23,598 additions and 4,800 deletions.
6 changes: 1 addition & 5 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@
"env": {
"production": {
"presets": ["react-optimize"],
"plugins": ["babel-plugin-dev-expression"]
"plugins": []
},
"development": {
"plugins": [
"transform-class-properties",
"transform-es2015-classes"
// ["flow-runtime", {
// "assert": true,
// "annotate": true
// }]
]
}
}
Expand Down
165 changes: 0 additions & 165 deletions .env.example

This file was deleted.

2 changes: 0 additions & 2 deletions .tmp/.gitignore

This file was deleted.

6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ before_script:
- sleep 3

script:
# - npm run lint
# - npm run test
- npm run lint:check
# - npm run test
- npm run package
- npm run test-e2e
# - npm run test-e2e
39 changes: 20 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
<h3 align="center">A Modern and Experimental Popcorn Time Client</h3>

<div align="center">
<a target="_blank" href="https://travis-ci.org/amilajack/popcorn-time-desktop/">
<img src="https://img.shields.io/travis/amilajack/popcorn-time-desktop/master.svg?maxAge=86400" alt="Travis Build branch" />
<a target="_blank" href="https://travis-ci.org/tripss/popcorn-time-desktop/">
<img src="https://img.shields.io/travis/tripss/popcorn-time-desktop/master.svg?maxAge=86400" alt="Travis Build branch" />
</a>
<a target="_blank" href="https://ci.appveyor.com/project/amilajack/popcorn-time-desktop/branch/master">
<a target="_blank" href="https://ci.appveyor.com/project/tripss/popcorn-time-desktop/branch/master">
<img src="https://ci.appveyor.com/api/projects/status/071qeglg94au8wr2/branch/master?svg=true&maxAge=86400" alt="AppVeyor Build status" />
</a>
<a target="_blank" href="https://david-dm.org/amilajack/popcorn-time-desktop?type=dev">
<img src="https://img.shields.io/david/dev/amilajack/popcorn-time-desktop.svg?maxAge=86400" alt="npm dev dependencies" />
<a target="_blank" href="https://david-dm.org/tripss/popcorn-time-desktop?type=dev">
<img src="https://img.shields.io/david/dev/tripss/popcorn-time-desktop.svg?maxAge=86400" alt="npm dev dependencies" />
</a>
<a target="_blank" href="https://gitter.im/amilajack/popcorn-time-desktop?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge">
<img src="https://badges.gitter.im/amilajack/popcorn-time-desktop.svg" alt="Gitter" />
</a>
<a target="_blank" href="https://github.com/amilajack/popcorn-time-desktop/pulls">
<a target="_blank" href="https://github.com/tripss/popcorn-time-desktop/pulls">
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" />
</a>
</div>
Expand All @@ -34,6 +34,8 @@

**Faster Torrents**: New API optimized for fast torrents by querying the from multiple endpoints

**Auto Torrents Search**: Search automatically for missing torrents on shows

**Modern Stack**: Electron, React, Redux, Webpack, ES7, Flow, and others

## Requirements:
Expand All @@ -43,41 +45,40 @@
* For packaging, see [packaging requirements](https://github.com/amilajack/popcorn-time-desktop/wiki/Packaging-Requirements)

## Getting started:
- **I am a tester:** Download the latest build from the [releases](https://github.com/amilajack/popcorn-time-desktop/releases) section.
- **I am a tester:** Download the latest build from the [releases](https://github.com/tripss/popcorn-time-desktop/releases) section.

- **I am a developer:** Compile the project with the installation steps below.

## Installation:
```bash
git clone https://github.com/amilajack/popcorn-time-desktop.git
git clone https://github.com/tripss/popcorn-time-desktop.git
cd popcorn-time-desktop

# Install dependencies
# Have a cup of coffee ☕️ this might take a while
# Run `npm run electron-rebuild` if get a 'module version mismatch' error
yarn

# Customize Build
# Feel free to enable flags and configs in the `.env` file
vi .env
npm install

# Developement build
npm run dev
npm run start:dev

# Production build
npm run package
```

## Contributing:
Please see the [contributing guide](https://github.com/amilajack/popcorn-time-desktop/blob/master/CONTRIBUTING.md)
Please see the [contributing guide](https://github.com/tripss/popcorn-time-desktop/blob/master/CONTRIBUTING.md)

## Todos:
See the [roadmap](https://github.com/amilajack/popcorn-time-desktop/wiki/Road-Map-and-Progress) for the full list.
See the [roadmap](https://github.com/tripss/popcorn-time-desktop/wiki/Road-Map-and-Progress) for the full list.

## Goals/Mockups:
## Screenshots

### Home Page:
![Home Page](https://github.com/amilajack/popcorn-time-desktop-design/raw/master/Desktop.jpg)
![Home Page](https://github.com/tripss/popcorn-time-desktop/raw/master/home.png)

### Movie Page:
![Movie page](https://raw.github.com/amilajack/popcorn-time-desktop/master/images/movie-page.jpg)
![Movie page](https://github.com/tripss/popcorn-time-desktop/raw/master/movie.png)

### Show page:
![Show page](https://github.com/tripss/popcorn-time-desktop/raw/master/show.png)
88 changes: 21 additions & 67 deletions app/api/Butter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,87 +2,41 @@
* The highest level abstraction layer for querying torrents and metadata
* @flow
*/
import TorrentAdapter from './torrents/TorrentAdapter'
import MetadataAdapter from './metadata/MetadataAdapter'
import PctMetadataProvider from './metadata/PctMetadataProvider'
import TraktMetadataProvider from './metadata/TraktMetadataProvider'
import MetadataAdapter from './Metadata/MetadataAdapter'
import PctTorrentProvider from './Torrents/PctTorrentProvider'
import TorrentAdapter from './Torrents'

export class Butter {

metadata: MetadataAdapter
metadataAdapter: MetadataAdapter

trakt: TraktMetadataProvider
pctAdapter: PctMetadataProvider
pctAdapter: PctTorrentProvider

torrentAdapter: TorrentAdapter

constructor() {
this.metadata = MetadataAdapter
this.pctAdapter = new PctMetadataProvider()
this.trakt = new TraktMetadataProvider()
this.pctAdapter = new PctTorrentProvider()
this.metadataAdapter = new MetadataAdapter()
this.torrentAdapter = new TorrentAdapter()
}

getMovies = (page: number = 1, limit: number = 50) => this.pctAdapter.getMovies(page, limit)
getMovies = (page: number = 1, filters = {}) => this.pctAdapter.getMovies(page, filters)

getMovie = (itemId: string) => this.pctAdapter.getMovie(itemId)

getShows = (page: number = 1, limit: number = 50) => this.pctAdapter.getShows(page, limit)

getShow = (itemId: string) => {
return this.pctAdapter.getShow(itemId).then(pctShow => {

// Deze wordt leidend! Episode info van pctShow hier in mergen
this.trakt.getSeasons(pctShow.id).then(show => {
console.log('trakt', show)
})

return pctShow
})
}

searchTorrent = (itemId: string, type: string) => {
return TorrentAdapter(itemId, type, {}, false)
}

/* getSeasons(itemId: string) {
return MetadataAdapter.getSeasons(itemId);
}
getSeason(itemId: string, season: number) {
return MetadataAdapter.getSeason(itemId, season);
}
getEpisode(itemId: string, season: number, episode: number) {
return MetadataAdapter.getEpisode(itemId, season, episode);
}
getSimilar(type: string = 'movies', itemId: string) {
return MetadataAdapter.getSimilar(type, itemId, 5);
}*/

/**
* @param {string} itemId
* @param {string} type | Type of torrent: movie or show
* @param {object} extendedDetails | Additional details provided for heuristics
* @param {boolean} returnAll
*/
getTorrent(itemId: string, type: string, extendedDetails: { [option: string]: string | number } = {}, returnAll: boolean = false) {
return TorrentAdapter(itemId, type, extendedDetails, returnAll)
}

/* getSubtitles(itemId: string, filename: string, length: number, metadata: Object) {
return MetadataAdapter.getSubtitles(itemId, filename, length, metadata);
}*/
getShows = (page: number = 1, filters = {}) => this.pctAdapter.getShows(page, filters)

/* favorites(method: string, metadata: Object) {
return MetadataAdapter.favorites(method, metadata);
}
getShow = (itemId: string) => this.pctAdapter.getShow(itemId)
.then(pctShow => this.metadataAdapter
.getSeasons(pctShow.id, pctShow.seasons)
.then(seasons => ({
...pctShow,
seasons,
})))

recentlyWatched(method: string, metadata: Object) {
return MetadataAdapter.recentlyWatched(method, metadata);
}
searchEpisode = (...args) => this.torrentAdapter.searchEpisode(...args)

watchList(method: string, metadata: Object) {
return MetadataAdapter.watchList(method, metadata);
}*/
search = (...args) => this.torrentAdapter.search(...args)

}

Expand Down
Loading

0 comments on commit 4169a91

Please sign in to comment.