hazcod / Gunther

Easy web frontend for media streaming - Fork me! (NO LONGER MAINTAINED)
27 stars 5 forks source link

SickRage search not working #20

Closed blindpet closed 9 years ago

blindpet commented 9 years ago

I have successfully integrated CP and I can add videos to CP from the Gunther web interface.

SickRage however returns a 500 error. I have triple checked the API keys in my test environment

'CP_API' => 'http://localhost:5050/api/b9c4b434529249db902304b1be18d8ce/', 'SB_API' => 'http://localhost:8081/api/e4096e232586865d48902ca0ada4fb0e/?cmd=',

hazcod commented 9 years ago

Can you pastebin your logs when this happens?

blindpet commented 9 years ago

Of course, just did it in chrome (I get a white page there, here is the log) `#1 /var/www/application/includes/TvDb/Client.php(447): Moinax\TvDb\Http\CacheClient->fetch('http://thetvdb....')

2 /var/www/application/includes/TvDb/Client.php(476): Moinax\TvDb\Client->getMirrors()

3 /var/www/application/includes/TvDb/Client.php(350): Moinax\TvDb\Client->getMirror(1)

4 /var/www/application/incl

2015/06/09 14:19:36 [error] 9311#0: 276 FastCGI sent in stderr: "PHP message: ERROR: Set the TheTVDB API in application/config.php !" while reading response header from upstream, client: 192.168.40.100, server: , request: "GET /series/add HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.40.135", referrer: "https://192.168.40.135/series/index" 2015/06/09 14:19:39 [error] 9311#0: 276 FastCGI sent in stderr: "PHP message: ERROR: Set the TheTVDB API in application/config.php ! PHP message: PHP Warning: fopen(cache/814dfb6ae81649a9e856643210059685): failed to open stream: No such file or directory in /var/www/application/includes/MediaModel.php on line 67 PHP message: PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/application/includes/MediaModel.php on line 68 PHP message: PHP Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/www/application/includes/MediaModel.php on line 69 PHP message: PHP Warning: fclose() expects parameter 1 to be resource, boolean given in /var/www/application/includes/MediaModel.php on line 70" while reading response header from upstream, client: 192.168.40.100, server: , request: "GET /series/index HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.40.135", referrer: "https://192.168.40.135/series/add"`

hazcod commented 9 years ago

Could you post it on pastebin.com or pastie.org and post the link here? The code layout of Github is messy for logs :/

Edit: Could you try removing everything in cache/ and checking the folder permissions?

I committed 1023b3db0c12696499665340b02a692d0ffe16e2 so it shows a clearer error in the logs.

blindpet commented 9 years ago

Sorry, that is what you asked for too http://pastebin.com/zxFZZEUq

hazcod commented 9 years ago

Sounds like it can't write to a cache file. Have you tried a chmod 777 /var/www/cache ?

blindpet commented 9 years ago

I don't have /var/www/cache, keep in mind CouchPotato does add successfully.

Do you want me to try git pull and try again and give you the new log?

hazcod commented 9 years ago

Ahhh, that's why.. I forgot to include the cache directory in the repo. Try a git pull and refresh! (fixed in 143cebf0ccc72d522db7ba4da4ddd030049eed0d)

blindpet commented 9 years ago

Git pull, refreshed (used incognito to be sure) and new log http://pastebin.com/6gEJdZnq

I did do chmod 777 as well, no difference

hazcod commented 9 years ago

Hm, it seems it's still stuck because the internal TvDb code needs the TvDB api. Could you try filling in E7526E1C56751C2A in application/config.php as the TvDb API key?

blindpet commented 9 years ago

Now it shows in after I type it in but when I click Add I now get a Red error message

http://pastebin.com/kmEYgFGm

hazcod commented 9 years ago

I'm also developing in my dev branch, so I won't mess things up for you guys.~~~ 

Should be fixed in 58c3cafd04d1332cb9ac476a37796f0b513901b8, but i'm testing.

EDIT: Fixed.
blindpet commented 9 years ago

Does not seem to work for me, it does say it was added but SickRage doesn't show the new show

blindpet commented 9 years ago

btw if you are in a test environment use my installer to easily install CP and SR https://github.com/blindpet/MediaServerInstaller

hazcod commented 9 years ago

It takes a while for sickrage to load the show completely (and show it over the api). Even after a show cache refresh?

And thanks for the installer!

blindpet commented 9 years ago

It does seem to be adding now and quickly funnily enough.

No worries, the server is made for ARM but the couchpotato and sickrage stuff is python so CPU architecture doesn't matter. I will be adding x86/x64 for the future