Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivshti committed Aug 24, 2015
0 parents commit ded893f
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
30 changes: 30 additions & 0 deletions guidebox.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
var Stremio = require("../");
var stremioCentral = "http://api8.herokuapp.com";
//var mySecret = "your secret";

var pkg = require("./package");
var manifest = {
"id": "org.stremio.guidebox",
"types": ["movie", "series"],
"filter": { "query.imdb_id": { "$exists": true }, "query.type": { "$in":["series","movie"] } },
name: pkg.displayName, version: pkg.version, description: pkg.description
};


var addon = new Stremio.Server({
"stream.get": function(args, callback, user) {
if (! args.query) return callback();
//return callback(null, dataset[args.query.imdb_id] || null);
},
"stream.find": function(args, callback, user) {
// only "availability" is required for stream.find, but we can return the whole object
//callback(null, { items: args.items.map(function(x) { return dataset[x.query.imdb_id] || null }) });
}
}, { /* secret: mySecret */ }, manifest);

var server = require("http").createServer(function (req, res) {
addon.middleware(req, res, function() { res.end() }); // wire the middleware - also compatible with connect / express
}).on("listening", function()
{
console.log("Guidebox Stremio Addon listening on "+server.address().port);
}).listen(process.env.PORT || 7000);
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "guidebox-stremio",
"displayName": "Guidebox",
"version": "1.0.0",
"description": "Guidebox Add-on - find where to stream your favorite movies and shows",
"main": "guidebox.js",
"scripts": {
"test": "tape test/*"
},
"repository": {
"type": "git",
"url": "http://github.com/Ivshti/guidebox-stremio"
},
"keywords": [
"guidebox",
"stremio",
"stremio-addons"
],
"author": "Ivo Georgiev <[email protected]> (http://ivogeorgiev.com)",
"license": "MIT",
"bugs": {
"url": "https://github.com/Ivshti/guidebox-stremio/issues"
},
"homepage": "https://github.com/Ivshti/guidebox-stremio",
"dependencies": {
"lodash": "^3.10.1",
"stremio-addons": "^1.8.3"
}
}

0 comments on commit ded893f

Please sign in to comment.