Coder Social home page Coder Social logo

popcorn-official / popcorn-api Goto Github PK

View Code? Open in Web Editor NEW
616.0 61.0 99.0 4.48 MB

Popcorn Time is a multi-platform, free software BitTorrent client that includes an integrated media player. Compatible API Anime/Movies/Show Scrapper

Home Page: https://popcorntime.app

License: MIT License

JavaScript 91.87% API Blueprint 8.13%
popcorn-api trakt metadata popcorn popcorn-time episodes

popcorn-api's People

Contributors

aasanchez avatar chrisalderson avatar cmd430 avatar jimic avatar mrcrjs avatar team-pct avatar tripss avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

popcorn-api's Issues

tv show poster

Hi notice that when we click on a tv show the frame of the poster is zoomming it's not really dramatic but its not very beautiful because didn't see the poster completly ex: when I click on arrow tv show only see is chest but the small view of the poster are ok It's just when we click on it It's dosen't fit at all lol :)

thanks in advance :)

Scraper stalls after initial run

when running this as a service on ubuntu, the scraper finds the initial shows and scrapes them all then never runs again. I'm not sure how to approach this problem, help would be appreciated.

Cannot start api

Sorry if this is dumb, but I'm new to Mongo/NodeJs, etc. I am an experienced C# web developer though, so I should be able to figure this out.

I cloned the repo to C:\Web\popcorn-api
Opened PowerShell (As Administrator) >

cd C:\Web\popcorn-api
npm install
npm start

and I receive the error "node: bad option: --harmony_destructuring"

The full error is below and npm-debug.txt is attached. I'm using Windows Server 2012 R2.

Thanks in advance!

PS C:\web\popcorn-api> npm start

[email protected] start C:\web\popcorn-api
node --harmony --harmony_destructuring --harmony_default_parameters --use_strict index.js

node: bad option: --harmony_destructuring

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "sta
rt"
npm ERR! node v6.2.1
npm ERR! npm v3.9.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: node --harmony --harmony_destructuring --harmony_default_parameters --use_strict inde x.js
npm ERR! Exit status 9
npm ERR!
npm ERR! Failed at the [email protected] start script 'node --harmony --harmony_destructuring --harmony_default_paramete
rs --use_strict index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the popcorn-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node --harmony --harmony_destructuring --harmony_default_parameters --use_strict index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs popcorn-api
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls popcorn-api
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\web\popcorn-api\npm-debug.log
PS C:\web\popcorn-api>

ETTV api

Would be amazing to have it alongside kat and eztv. Not asking anyone to do it, like, now, just a humble request for future(far future) releases

Any possibility of taking tmdbid from Trakt?

Since Trakt removed images yesterday, I noticed this API started pulling images from Fanart.tv. Because fanart uses arbitrary image urls, it is not possible to replace image size without making an API call directly to fanart (instead of replacing "original" with "thumb" or "medium" like you used to be able to when images were pulled from Trakt). This leads to extremely slow loading times as all the images are really high resolution.

As a compromise we were forced to grab images from tmdb, but obviously to use tmdb, you need a tmdbId (duh). This means making a call to trakt to get the tmdb id, and then to tmdb, wasting even more time.

Since Trakt is already used for grabbing metadata, would it be possible to also take tmdb id from trakt and add it to show and movie objects? This would really be a huge help.

Thanks.

Anime covers are not loading

Hi, I am pretty new with popcorntime and my experience so far is great, it has everyting i want to watch (Movies, TV series and Anime) in one place in HD, but there is one problem the anime covers are not loading. I already tried reinstalling popcorntime but it did not work, are there more people having this problem or is it just me? And is there a fix or solution?
Sorry for my bad english :)

Look within whole season torrents for individual episodes

There are a lot of shows which don't have healthy torrents for each episode, but have at least one healthy torrent for each whole season. The show providers could be modified to search for common "whole season" torrent naming schemes. This should greatly increase the number of available shows, mostly those older than a year or two.

Examples

  • Some Show - Seasons 1 Complete
  • Show X - season one [complete]

The show providers would need to retrieve the torrent metadata (torrent file is more direct, but obviously possible with magnet links), then try to match the episodes with the files in the torrent. Episode file names almost always match [Ss]\d\d[Ee]\d\d or \d\dx\d\d or similar scheme.

MongoDB sorting limitation

MongoDB v3.2 has a sorting limit for 32MB (as documented here). This does become an issue with sorting on 'updated'. There is a fix for this issue for the other sorting options (name, rating, trending, year), this involves 'aggregation'.
Sadly I have not found a way to apply this fix to the 'updated' sorting option as it sorts on a key-value pair which is inside of an array as you can see here. I did try to overcome this by using the 'unwind' and 'group' opperators, but without success.

Movie/TV Show search term not working for all strings

Hello there,

recently the API seems to be having some trouble handling all search terms, for example, searching for only 1 character always works, 2 almost never works, but searching for the entire name always works, so for example:

"S" > Returns
"Su" > Does not return
"Super" > Returns

This seems to affect not only PopcornTime's search feature, but also the API results directly.

Search api works on exact words only

This is a suggestion for a possible improvement.
Search API for both movie and series returns results for exact matches on words contained in the search query.

As an example querying for 'simpson' returns no results while querying for 'simpsons' does.

I reckon it would be a good improvement to include search results where the search string is contained as opposed to an exact match to a movie title.

Problem running the API

Hello!

I just downloaded the repo and tried to start the api. I am getting the following error:

Cron job started
EZTV: Starting scraping...
Error while scraping: Error: ETIMEDOUT with link: 'showlist/'

My steps:
I ran the code as stated in the readme file. Installed node 4.2.2 and installed mongodb via brew. Started mongodb and npm installed and started the api.

What am I doing wrong? Do I need to have a dump of some database set up?

build #236 Close button not working

On the #236 build of popcorn time, the close button on top right after watching a serie or movie does not do anything, making it impossible to close the window, forcing you to force close popcorn time and restart it to watch something else.

Downloadable database

Have a route which allows you download the content of the MongoDB database. This file should be a compressed, because I do not know how big the file will be. This file also needs to be easily imported back into the database or another database. This way different hosts hosting the API can profit from each other as they might have different content providers and/or kat providers. It would be nice if the import can be done through the CLI part of the API.

Unparsed '&' (&)

Some movie/episode/show's have unparsed ampersands in string variables. Not sure if this is a bug or if it is done on purpose as the desktop app displays it correctly.

Use JSON array instead objects only

We are using objects only for responses with variable key names, this difficults the parsing process and the model definition (we are forced to use any getter or any setter annotations), an example for common torrents:

"torrents": {
	"en": {
		"1080p": {
			"url": "magnet:?xt=urn:btih:DC5E0F28C56CBB93E57FC11CA8E56CC79A5D2E13",
			"seed": 777,
			"peer": 276,
			"size": 1771674010,
			"filesize": "1.65 GB",
			"provider": "YTS"
		},
		"720p": {
			"url": "magnet:?xt=urn:btih:1C12E9D7A919113C923EF20089E7435890A12933",
			"seed": 611,
			"peer": 170,
			"size": 787847578,
			"filesize": "751.35 MB",
			"provider": "YTS"
		}
	}
}

we should use an appropiate format like this

"torrents": [{
	"language": "en",
	"qualities": [{
		"quality": "1080p",
		"url": "magnet:?xt=urn:btih:DC5E0F28C56CBB93E57FC11CA8E56CC79A5D2E13",
		"seed": 777,
		"peer": 276,
		"size": 1771674010,
		"filesize": "1.65 GB",
		"provider": "YTS"
	},
	{
		"quality": "720p",
		"url": "magnet:?xt=urn:btih:1C12E9D7A919113C923EF20089E7435890A12933",
		"seed": 611,
		"peer": 170,
		"size": 787847578,
		"filesize": "751.35 MB",
		"provider": "YTS"
	}]
},
{
	"language": "es",
	"qualities": [{
		"quality": "1080p",
		"url": "magnet:?xt=urn:btih:DC5E0F28C56CBB93E57FC11CA8E56CC79A5D2E13",
		"seed": 777,
		"peer": 276,
		"size": 1771674010,
		"filesize": "1.65 GB",
		"provider": "YTS"
	},
	{
		"quality": "720p",
		"url": "magnet:?xt=urn:btih:1C12E9D7A919113C923EF20089E7435890A12933",
		"seed": 611,
		"peer": 170,
		"size": 787847578,
		"filesize": "751.35 MB",
		"provider": "YTS"
	}]
}]

Obviously, this will cause an impact in the desktop and Android app response treatment.

Fix issue with branch 103

@ChrisAlderson
Branch 103 is not adding any seasons/episodes to shows!

this fix is to add change data.<thing> to data.episodes.<thing>

here is the fixed code for lib\eztv.js specificly the function getShowData lines 86 to 101

if (title.match(seasonBased) || title.match(vtv)) {
  season = parseInt(title.match(seasonBased)[1], 10);
  episode = parseInt(title.match(seasonBased)[2], 10);
  data.episodes.dateBased = false;
} else if (title.match(dateBased)) {
  season = title.match(dateBased)[1];
  episode = title.match(dateBased)[2].replace(/\s/g, "-");
  data.episodes.dateBased = true;
}

if (season && episode) {
  if (!data.episodes[season]) data.episodes[season] = {};
  if (!data.episodes[season][episode]) data.episodes[season][episode] = {};
  if (!data.episodes[season][episode][quality] || title.toLowerCase().indexOf("repack") > -1)
    data.episodes[season][episode][quality] = torrent;
}

Search

Can Search be added back into the API? I planned on using it for a project but I discovered it was disabled.

Update: If possible, could the last updated API be reenabled again as well?

Keywords search doesn't work perfectly

/movies/1?keywords=Independence%20Day:%20Resurgence doesn't return any results. It's seems it is due to the :.

Oh, and maybe we could add searching for imdb key? Would make other things so much easier :)

Incremental updates

When updating popcorn time using the builds provided on ci.popcorntime.sh, the installer always completely wipes out the old popcorn time folders including user data making you lose your favorites and seen markers.

I would propose to just update what has changed and to never delete the user data folder.

Add to the API how many seasons a tv show has and how many are available through the API

See issues 389 and 392 on popcorn-desktop.

Right now the API uses "num_seasons" to tell how many seasons of a certain show are available through the API, but this is quite confusing and definitely misleading when seen on PT. This way, would be better to use "num_seasons" to tell how many seasons a certain show has and create "avail_seasons" to tell how many seasons are available through the API.

CLI error when adding a movie.

Did gulp build of the latest master (v2.2.0) and tried to invoke the CLI by -

./popcorn-api.js -c movie

After inputting all of information, the error pops up -

An error occurred: ReferenceError: logger is not defined

Backtracking through all codes, I figured it was due to the logger not being referenced in moviehelper.js Although I'm not too sure how I'm supposed to reference logger to something.

Issue with thumbnail images

Problem:
Turns out that thumbnail images are mostly fetched from fanart. Unfortunately this service has a slow response time.

I have noticed that some images are trying to be fetched from walter.trakt.us and they fail because this service has been moved to walter.trakt.tv.

Solution:
Consider switching the image fetching to https://walter.trakt.tv/

Several genre's aren't working as expected

There are a several genre's listed in the documentation which don't function on the movies API, will these be re-intergraded or removed?

Examples

  • Disaster
  • Fan Film
  • Holiday
  • Indie

change the type field value for anime

Type for anime content needs to be changed from show to tvshow inside the database.

db.animes.update({type: 'show'}, {$set: {type: 'tvshow'}}, {multi: true})

API for Conan, Daily Show, Jimmy Fallon and some others daily evening shows do not work

Hi,
I am a fan of the Apple TV PopcornTV version and use it with pleasure. The makers (alias FlavioBondJamesBondsHusband) redirect me to this forum. Currently the above mentioned shows seem not to have any episodes. In the desktop version and Butter CE version these shows can be streamed without problems, but not in the PopCornTV app. It seems there is an API issue?

Could you fix this, so I can go for the brainless end of day moment again with my favorite app?

Status page

I would like to suggest a /status endpoint and move the info from / to it ?

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.