OwenRay / Remote-MediaServer

A NodeJS based media server: Manage, watch and share your movies and tv series.
GNU General Public License v3.0
95 stars 20 forks source link

TypeError: Cannot read property 'ok' of undefined #45

Open gerroon opened 5 years ago

gerroon commented 5 years ago

It seems like I am hitting corner cases here ? It started scanning my media folder then crashed.


2018-12-08T02:59:26.787Z 'found new file' '/media/O/VIDEO/YOUTUBE/xxxxx.mp4'
/snapshot/Remote-MediaServer/node_modules/moviedb-api/index.js:49
      if(response.ok) {
                  ^

TypeError: Cannot read property 'ok' of undefined
    at /snapshot/Remote-MediaServer/node_modules/moviedb-api/index.js:49:19
    at Request.callback (/snapshot/Remote-MediaServer/node_modules/moviedb-api/node_modules/superagent/lib/node/index.js:687:12)
    at ClientRequest.<anonymous> (/snapshot/Remote-MediaServer/node_modules/moviedb-api/node_modules/superagent/lib/node/index.js:639:10)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)
    at TLSSocket.socketErrorListener (_http_client.js:387:9)
    at emitOne (events.js:116:13)
    at TLSSocket.emit (events.js:211:7)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
OwenRay commented 5 years ago

Thanks for the testing and reporting, sorry about the bugs:(

This seems like a moviedb specific bug, I'll look into it. Thiscourse should never happen. But I do wonder if you set the library type to TV or movie instead of unspecified by accident. Because for home videos or something you probably don't need the moviedb lookups

gerroon commented 5 years ago

Thanks I will give it a try. I do not have tv shows or movies, mostly tutorials

OwenRay commented 5 years ago

Ok, there is a known issue where it groups all the items that are not part of a movie or TV serie. So for now it's far from ideal for that. Will fix that soon too.

gerroon commented 5 years ago

Basically I use https://github.com/chibicitiberiu/ytsm/ to download my videos off youtube under a folder. And those are the videos I am trying to use RMS with

OwenRay commented 5 years ago

I created a separate issue (#46) for the improvement of "Unspecified" media items. Feel free to tell how you'd expect that to work there. I don't use it for those sort of items myself, so you probably know better whether to display them all separately, or if we should have some manner of grouping.

OwenRay commented 5 years ago

Waiting for leviwheatcroft/moviedb-api#1 to be accepted