Giter Site home page Giter Site logo

potato's People

Contributors

bbtx0 avatar darkmount avatar microbadger avatar rolfje avatar rolfkoenders 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

potato's Issues

TypeError: Cannot read property 'id' of undefined

The bot connects correctly, but I receive a TypeError on every message it receives (commands, but also any chat message)

TypeError: Cannot read property 'id' of undefined
    at Bot._isFromBot (/path/potato/node_modules/slackbotify/lib/bot.js:116:33)
    at Bot._onMessage (/path/potato/node_modules/slackbotify/lib/bot.js:55:45)
    at emitOne (events.js:96:13)
    at Bot.emit (events.js:189:7)
    at Bot.<anonymous> (/path/potato/node_modules/slackbotify/node_modules/slackbots/index.js:62:18)
    at emitTwo (events.js:106:13)
    at WebSocket.emit (events.js:192:7)
    at Receiver.ontext (/path/potato/node_modules/slackbotify/node_modules/slackbots/node_modules/ws/lib/WebSocket.js:841:10)
    at /path/potato/node_modules/slackbotify/node_modules/slackbots/node_modules/ws/lib/Receiver.js:536:18
    at Receiver.applyExtensions (/path/potato/node_modules/slackbotify/node_modules/slackbots/node_modules/ws/lib/Receiver.js:371:5)

Smaller Docker image

Make use of the alpine version of the node image so the docker image is much smaller.

Docker Compose - Couchpotato not reachable

I am trying to get the Mr. Potato Container working in a docker-compose.yml file together with couchpotato and some other services.

All services in this file share the same docker network and are reachable though their internal dns name.
Mr. Potato is not able to reach my couchpotato container...

Here is the part of the docker-compose.yml:

mrpotato:
      image: rolfkoenders/potato:latest
        container_name: mrpotato
        env_file: uidgid.env
        environment:
            - CB_SLACK_KEY=xoxb-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            - CB_SLACK_NAME=mr_movie
            - CB_HOST=couchpotato
            - CB_PORT=5050
            - CB_COUCH_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        restart: always 

running `search movie harry potter` causes potatobot to die

Jun 10 13:17:30 plex potatoBot[15866]: [OMDB] -  Error: status code: 401
Jun 10 13:17:30 plex potatoBot[15866]:     at /opt/potato/node_modules/omdb/index.js:126:25
Jun 10 13:17:30 plex potatoBot[15866]:     at done (/opt/potato/node_modules/needle/lib/needle.js:432:14)
Jun 10 13:17:30 plex potatoBot[15866]:     at PassThrough.<anonymous> (/opt/potato/node_modules/needle/lib/needle.js:671:11)
Jun 10 13:17:30 plex potatoBot[15866]:     at emitNone (events.js:91:20)
Jun 10 13:17:30 plex potatoBot[15866]:     at PassThrough.emit (events.js:185:7)
Jun 10 13:17:30 plex potatoBot[15866]:     at endReadableNT (_stream_readable.js:974:12)
Jun 10 13:17:30 plex potatoBot[15866]:     at _combinedTickCallback (internal/process/next_tick.js:74:11)
Jun 10 13:17:30 plex potatoBot[15866]:     at process._tickCallback (internal/process/next_tick.js:98:9)
Jun 10 13:17:30 plex potatoBot[15866]: /opt/potato/lib/handlers/omdb-search-movie.js:25
Jun 10 13:17:30 plex potatoBot[15866]: #011if (movies.length > 1) {
Jun 10 13:17:30 plex potatoBot[15866]: #011          ^
Jun 10 13:17:30 plex potatoBot[15866]: TypeError: Cannot read property 'length' of null
Jun 10 13:17:30 plex potatoBot[15866]:     at _composeResponseMessage (/opt/potato/lib/handlers/omdb-search-movie.js:25:12)
Jun 10 13:17:30 plex potatoBot[15866]:     at omdb.search (/opt/potato/lib/handlers/omdb-search-movie.js:17:17)
Jun 10 13:17:30 plex potatoBot[15866]:     at omdb.search (/opt/potato/lib/omdb.js:30:12)
Jun 10 13:17:30 plex potatoBot[15866]:     at /opt/potato/node_modules/omdb/index.js:126:20
Jun 10 13:17:30 plex potatoBot[15866]:     at done (/opt/potato/node_modules/needle/lib/needle.js:432:14)
Jun 10 13:17:30 plex potatoBot[15866]:     at PassThrough.<anonymous> (/opt/potato/node_modules/needle/lib/needle.js:671:11)
Jun 10 13:17:30 plex potatoBot[15866]:     at emitNone (events.js:91:20)
Jun 10 13:17:30 plex potatoBot[15866]:     at PassThrough.emit (events.js:185:7)
Jun 10 13:17:30 plex potatoBot[15866]:     at endReadableNT (_stream_readable.js:974:12)
Jun 10 13:17:30 plex potatoBot[15866]:     at _combinedTickCallback (internal/process/next_tick.js:74:11)
Jun 10 13:17:30 plex systemd[1]: potatoBot.service: Main process exited, code=exited, status=1/FAILURE
Jun 10 13:17:30 plex systemd[1]: potatoBot.service: Unit entered failed state.
Jun 10 13:17:30 plex systemd[1]: potatoBot.service: Failed with result 'exit-code'.

Same type of error when trying download movie Bad Boys II

Jun 10 13:17:30 plex potatoBot[15866]: [OMDB] -  Error: status code: 401
Jun 10 13:17:30 plex potatoBot[15866]:     at /opt/potato/node_modules/omdb/index.js:126:25
Jun 10 13:17:30 plex potatoBot[15866]:     at done (/opt/potato/node_modules/needle/lib/needle.js:432:14)
Jun 10 13:17:30 plex potatoBot[15866]:     at PassThrough.<anonymous> (/opt/potato/node_modules/needle/lib/needle.js:671:11)
Jun 10 13:17:30 plex potatoBot[15866]:     at emitNone (events.js:91:20)
Jun 10 13:17:30 plex potatoBot[15866]:     at PassThrough.emit (events.js:185:7)
Jun 10 13:17:30 plex potatoBot[15866]:     at endReadableNT (_stream_readable.js:974:12)
Jun 10 13:17:30 plex potatoBot[15866]:     at _combinedTickCallback (internal/process/next_tick.js:74:11)
Jun 10 13:17:30 plex potatoBot[15866]:     at process._tickCallback (internal/process/next_tick.js:98:9)
Jun 10 13:17:30 plex potatoBot[15866]: /opt/potato/lib/handlers/omdb-search-movie.js:25
Jun 10 13:17:30 plex potatoBot[15866]: #011if (movies.length > 1) {
Jun 10 13:17:30 plex potatoBot[15866]: #011          ^
Jun 10 13:17:30 plex potatoBot[15866]: TypeError: Cannot read property 'length' of null
Jun 10 13:17:30 plex potatoBot[15866]:     at _composeResponseMessage (/opt/potato/lib/handlers/omdb-search-movie.js:25:12)
Jun 10 13:17:30 plex potatoBot[15866]:     at omdb.search (/opt/potato/lib/handlers/omdb-search-movie.js:17:17)
Jun 10 13:17:30 plex potatoBot[15866]:     at omdb.search (/opt/potato/lib/omdb.js:30:12)
Jun 10 13:17:30 plex potatoBot[15866]:     at /opt/potato/node_modules/omdb/index.js:126:20
Jun 10 13:17:30 plex potatoBot[15866]:     at done (/opt/potato/node_modules/needle/lib/needle.js:432:14)
Jun 10 13:17:30 plex potatoBot[15866]:     at PassThrough.<anonymous> (/opt/potato/node_modules/needle/lib/needle.js:671:11)
Jun 10 13:17:30 plex potatoBot[15866]:     at emitNone (events.js:91:20)
Jun 10 13:17:30 plex potatoBot[15866]:     at PassThrough.emit (events.js:185:7)
Jun 10 13:17:30 plex potatoBot[15866]:     at endReadableNT (_stream_readable.js:974:12)
Jun 10 13:17:30 plex potatoBot[15866]:     at _combinedTickCallback (internal/process/next_tick.js:74:11)
Jun 10 13:17:30 plex systemd[1]: potatoBot.service: Main process exited, code=exited, status=1/FAILURE
Jun 10 13:17:30 plex systemd[1]: potatoBot.service: Unit entered failed state.
Jun 10 13:17:30 plex systemd[1]: potatoBot.service: Failed with result 'exit-code'.
Jun 10 13:17:40 plex systemd[1]: potatoBot.service: Service hold-off time over, scheduling restart.
Jun 10 13:17:40 plex systemd[1]: Stopped Potato Bot.
Jun 10 13:17:40 plex systemd[1]: Started Potato Bot.
Jun 10 13:18:36 plex potatoBot[15887]: [OMDB] -  Error: status code: 401
Jun 10 13:18:36 plex potatoBot[15887]:     at /opt/potato/node_modules/omdb/index.js:211:25
Jun 10 13:18:36 plex potatoBot[15887]:     at done (/opt/potato/node_modules/needle/lib/needle.js:432:14)
Jun 10 13:18:36 plex potatoBot[15887]:     at PassThrough.<anonymous> (/opt/potato/node_modules/needle/lib/needle.js:671:11)
Jun 10 13:18:36 plex potatoBot[15887]:     at emitNone (events.js:91:20)
Jun 10 13:18:36 plex potatoBot[15887]:     at PassThrough.emit (events.js:185:7)
Jun 10 13:18:36 plex potatoBot[15887]:     at endReadableNT (_stream_readable.js:974:12)
Jun 10 13:18:36 plex potatoBot[15887]:     at _combinedTickCallback (internal/process/next_tick.js:74:11)
Jun 10 13:18:36 plex potatoBot[15887]:     at process._tickCallback (internal/process/next_tick.js:98:9)

Remove gulp

Lets remove the gulp dependency and move all the scripts to npm scripts.

Feature Request - Download movie related to search result

First of all: Thanks for your great work!

I got an idea which could improve the usability. I want to explain this with an example:

Let´s search for the german movie "Ein Prophet" with the command:
movie search "Ein Prophet"

That´s the search result:
I found the following movies
• A Prophet 🆔 tt1235166
• Death of a Prophet 🆔 tt0179757
• Earthsea 🆔 tt0407384

I am looking now at IMDB if the movie with the ID tt1235166 is the one i was looking for.
And yes, it´s the correct one form the year 2009.
So what i am doing now is this:

download movie "A Prophet"

As a normal user, i would expect that CP is downloading the first movie of the search result.
But CP is downloading "A Prophet" from the year 1999.

I know that with "download movie tt1235166" CP downloads the correct one but is it possible to download the correct one depending on the search results?

Some commands not available, others not listed in `help`

Hi there :)
do you have some suggestions? doesn't return anything, it that the right command?
Also, help doesn't list all available commands, it only has:

*Here you go!
To *search* for a movie send me:
`search movie movie-title`
To *add* a movie to the wanted list:
`download movie movie-title`
Or if you know the *IMDB id* (which is also returned by searching for a movie) send me:
`download movie IMDB-id`
I really like :popcorn: so you can always give me some!

*Admin commands*
!version _Check which version of the bot and couchpotato is running.

P.S.
A huge thank you for writing this bot!

Channel messages are not working

DM's work now (thanks!), but when I try the same commands in a channel, no luck.
e.g.: search movie harry potter works in DM, but I tried @couchpotato search movie harry potter and just search movie harry potter in the channel...no reply. (no error log either)

Am I just doing it wrong?

Edit:
I just realized it is a private channel, but also just tried creating a public channel. Doesn't work there either :(

Remove `download movie <movie name>` command?

Question ❓

Are people using the download movie <movie name> command?

Why remove it?

I'm thinking of removing the command because its not reliable. Since the OMDB api is closed the search is now done using the search of couchpotato. There are allot of results coming back which cannot be easily handled by the bot.

Solutions?

  • Remove
    First make a search query using the search movie <movie name> command. You will get a single or a list of movies in response. Every movie has e tt... id next to it. This id can be copied and using the download movie <imdb_id> command the movie will be added to the wanted list.
  • Keep
    The command will still be available and the bot will download the first result it will get back from searching the name of the movie you pass to the download movie <movie name> command.

Let me know what you think!

config.get is not a function

What am I doing wrong here?

npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

> [email protected] start /opt/mr.potato
> node bin/bot.js

/opt/mr.potato/lib/handlers/download-movie.js:7
let couch = new CouchAPI(config.get('couch'));
                                ^

TypeError: config.get is not a function
    at Object.<anonymous> (/opt/mr.potato/lib/handlers/download-movie.js:7:33)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/opt/mr.potato/lib/handlers/index.js:2:30)
    at Module._compile (module.js:571:32)

npm ERR! Linux 4.4.0-36-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v7.10.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node bin/bot.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node bin/bot.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 potato package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node bin/bot.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs potato
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls potato
npm ERR! There is likely additional logging output above.

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.