Movie scraper doesn work from Kodi, but works from commandline
#1
Hi
I have problem that has been bugging me for a couple of weeks. After rippeing a lot of DVDs and using kodi for the first time
i want to use the movie scraper and the TheMovieDatabase.

However the scraper does not seesm to work when I run it fro Kodi, I suspect the problem is that KOdi doesnt wrap the CURL command in single quotes, but im not sure, and in any case I dont know how to fix it.

I get this message (with debugging turned on)


<pre>
perthi@perthi-mint:~/.kodi/temp > tail -f kodi.log
17:05:44 T:140561011390208 DEBUG: CAnnouncementManager - Announcement: OnScanFinished from xbmc
17:05:44 T:140561011390208 DEBUG: GOT ANNOUNCEMENT, type: 16, from xbmc, message OnScanFinished
17:05:44 T:140561470638016 DEBUG: CGUIMediaWindow::GetDirectory (videodb://movies/titles/)
17:05:44 T:140561470638016 DEBUG: ParentPath = [videodb://movies/titles/]
17:05:44 T:140561011390208 DEBUG: RunQuery took 0 ms for 11 items query: select * from movie_view
17:05:44 T:140560635512576 NOTICE: Thread BackgroundLoader start, auto delete: false
17:05:44 T:140560635512576 DEBUG: Thread BackgroundLoader 140560635512576 terminating
17:05:44 T:140561470638016 DEBUG: ------ Window Init (Pointer.xml) ------
17:05:44 T:140561470638016 DEBUG: ------ Window Deinit (Pointer.xml) ------
17:05:44 T:140561470638016 DEBUG: ------ Window Deinit (DialogExtendedProgressBar.xml) ------
17:05:48 T:140561470638016 DEBUG: ------ Window Init (Pointer.xml) ------
17:05:50 T:140561470638016 DEBUG: ------ Window Deinit (Pointer.xml) ------
17:05:50 T:140561470638016 DEBUG: ProcessMouse: trying mouse action leftclick
17:05:50 T:140561470638016 DEBUG: ------ Window Init (DialogExtendedProgressBar.xml) ------
17:05:50 T:140561011390208 NOTICE: VideoInfoScanner: Starting scan ..
17:05:50 T:140561011390208 DEBUG: CAnnouncementManager - Announcement: OnScanStarted from xbmc
17:05:50 T:140561011390208 DEBUG: GOT ANNOUNCEMENT, type: 16, from xbmc, message OnScanStarted
17:05:50 T:140561011390208 DEBUG: VideoInfoScanner: Skipping dir '/home/perthi/Movies/' due to no change (fasthash)
17:05:50 T:140561011390208 DEBUG: VideoInfoScanner: Scanning dir '/home/perthi/Movies/Valkyrie (2008)/' as not in the database
17:05:50 T:140561011390208 DEBUG: VideoInfoScanner: No NFO file found. Using title search for '/home/perthi/Movies/Valkyrie (2008)/valkyrie.iso'
17:05:50 T:140561011390208 DEBUG: FindMovie: Searching for 'Valkyrie' using The Movie Database scraper (path: '/usr/share/kodi/addons/metadata.themoviedb.org', content: 'movies', version: '3.8.3')
17:05:50 T:140561011390208 DEBUG: scraper: CreateSearchUrl returned <url>http://api.tmdb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&amp;query=Valkyrie&amp;year=2008&amp;language=en</url>
17:05:50 T:140561011390208 DEBUG: CurlFile::Open(0x7fd6c4014080) http://api.tmdb.org/3/search/movie?api_k...anguage=en
17:05:50 T:140561011390208 DEBUG: Curl:Big Grinebug - TEXT: Hostname was NOT found in DNS cache
17:05:50 T:140561470638016 DEBUG: ------ Window Init (Pointer.xml) ------
17:05:50 T:140560652297984 NOTICE: Thread JobWorker start, auto delete: true
17:05:51 T:140561470638016 DEBUG: ------ Window Deinit (Pointer.xml) ------
17:06:00 T:140561011390208 DEBUG: Curl:Big Grinebug - TEXT: Resolving timed out after 10148 milliseconds
17:06:00 T:140561011390208 ERROR: CCurlFile::FillBuffer - Failed: Timeout was reached(28)
17:06:00 T:140561011390208 ERROR: CCurlFile::Open failed with code 0 for http://api.tmdb.org/3/search/movie?api_k...anguage=en
17:06:05 T:140561011390208 DEBUG: Curl:Big Grinebug - TEXT: Closing connection 6
17:06:05 T:140561011390208 ERROR: Run: Unable to parse web site
17:06:05 T:140561470638016 DEBUG: ------ Window Init (DialogYesNo.xml) ------
</pre>

If I run the associated CURL command from the command line it doesnt work if I just copy and past what Kodi does, but only if I enclose the command in single quotes
i.e

<pre>
curl -v 'http://api.tmdb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&query=Valkyrie&year=2008&language=en'
</pre>
Reply
#2
By the way here is a link of the discussion I had with people at the movie database forum about the issue

https://www.themoviedb.org/talk/55c76e01...05c80024aa
Reply
#3
Quote:17:05:50 T:140561011390208 DEBUG: VideoInfoScanner: No NFO file found. Using title search for '/home/perthi/Movies/Valkyrie (2008)/valkyrie.iso'

Kodi sees ISO files kinda like zip files. Technically, ISO is not a media file which it can recognize. If you use a program like DVD decrypt ant convert it to .vob files and what not, Kodi should be able to pick them up.
Reply
#4
i have many ISO files without any problems so don't give silly advise to convert it
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#5
Silly is in the eye of the beholder, seems you have a particular point of view. The message was purloined from SlackMaster http://forum.kodi.tv/showthread.php?tid=136339 post #3 and noting others as myself recommend conversion I felt if appropriate to post, your message is an attitude rather than solution to the OP's issue, if you have updated information please feel free to educate us all.
Reply
#6
His issue is a connection problem and not a problem with detection of the ISO file.
If you look at his log you clearly see that it was detected, themoviedb did return actual valid data url for that specific movie but kodi could not open it at that specific moment.
The post you refer to is wrong that you need to extract it.
Read/follow the forum rules.
For troubleshooting and bug reporting, read this first
Interested in seeing some YouTube videos about Kodi? Go here and subscribe
Reply
#7
Video 
I think it is not a matter of wether the file is on .iso format or not, because the scraper only looks at the name of the folder
to deduce the film. By looking at what kodi does by inspecting the log files in debug mode, it seems that everything is in principle OK and that the correct search string is used. Also, the errro is the same if I mount the iso to have direct access to the VOB files etc..

Seems to me the only problem is tat the database query is not enclosed in single quotes, so curl cert confused

When I enclose the search string that kodi uses in single quotes, then I get the expected result. regardless of wether it is an ISO or not.

Please have alook at the discussion here too.

https://www.themoviedb.org/talk/55c76e01...05c80024aa
Reply
#8
So if a run the curl command that kodi uses, for one of the movies I get this result

curl -v http://api.tmdb.org/3/search/movie?api_k...anguage=en
[1] 4929
[2] 4930
[3] 4931
perthi@perthi-mint:~ > *
Hostname was NOT found in DNS cache
* Trying 198.41.187.159...
* Connected to api.tmdb.org (198.41.187.159) port 80 (#0)
> GET /3/search/movie?api_key=57983e31fb435df4df77afb854740ea9 HTTP/1.1
> User-Agent: curl/7.35.0
> Host: api.tmdb.org
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Date: Sat, 03 Oct 2015 21:24:59 GMT
< Content-Type: application/json;charset=utf-8
< Content-Length: 84
< Connection: keep-alive
< Set-Cookie: __cfduid=d254efa4a640e79e54b85690f86bcf7b81443907499; expires=Sun, 02-Oct-16 21:24:59 GMT; path=/; domain=.tmdb.org; HttpOnly
< Access-Control-Allow-Origin: *
< Cache-Control: public, max-age=21600
< ETag: "37a6259cc0c1dae299a7866489dff0bd"
< Status: 404 Not Found
< X-Memc: HIT
< X-Memc-Age: 1534
< X-Memc-Expires: 20066
< X-Memc-Key: 7bc6840b88bb2779b52eedf845718635
< X-RateLimit-Limit: 40
< X-RateLimit-Remaining: 39
< X-RateLimit-Reset: 1443906672
< CF-Cache-Status: HIT
* Server cloudflare-nginx is not blacklisted
< Server: cloudflare-nginx
< CF-RAY: 22fbb791d36416c4-ARN
<
* Connection #0 to host api.tmdb.org left intact
{"status_code":34,"status_message":"The resource you requested could not be found."}
Reply
#9
If I run exactly the same command, with single quotes around the search string, I get this (which is what i expect)


curl -v 'http://api.tmdb.org/3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&query=Valkyrie&year=2008&language=en'
* Hostname was NOT found in DNS cache
* Trying 198.41.185.159...
* Connected to api.tmdb.org (198.41.185.159) port 80 (#0)
> GET /3/search/movie?api_key=57983e31fb435df4df77afb854740ea9&query=Valkyrie&year=2008&language=en HTTP/1.1
> User-Agent: curl/7.35.0
> Host: api.tmdb.org
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Sat, 03 Oct 2015 21:28:02 GMT
< Content-Type: application/json;charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Set-Cookie: __cfduid=d613c06fa9100fd58d705926964eb77081443907682; expires=Sun, 02-Oct-16 21:28:02 GMT; path=/; domain=.tmdb.org; HttpOnly
< Access-Control-Allow-Origin: *
< Cache-Control: public, max-age=28800
< ETag: W/"ff02a4ebe87e30391fe8cbf61b933e91"
< Status: 200 OK
< Vary: Accept-Encoding
< X-Memc: HIT
< X-Memc-Age: 19590
< X-Memc-Expires: 2010
< X-Memc-Key: 9f0d3f1c4a476ec871c75a79d32d38df
< X-RateLimit-Limit: 40
< X-RateLimit-Remaining: 39
< X-RateLimit-Reset: 1443907454
< CF-Cache-Status: HIT
< Expires: Sun, 04 Oct 2015 05:28:02 GMT
* Server cloudflare-nginx is not blacklisted
< Server: cloudflare-nginx
< CF-RAY: 22fbbc054a380a4e-ARN
<
{"page":1,"results":[{"adult":false,"backdrop_path":"/ptNcTh2bewqzcV2qVpjDgsh6pTs.jpg","genre_ids":[18,53,36,10752],"id":2253,"original_language":"en","original_title":"Valkyrie","overview":"Wounded in Africa during World War II, Nazi Col. Claus von Stauffenberg returns to his native Germany and joins the Resistance in a daring plan to create a shadow government and assassinate Adolf Hitler. When events unfold so that he becomes a central player, he finds himself tasked with both leading the coup and personally killing the Führer.","release_date":"2008-12-25","poster_path":"/54GgkO63zZyJJb5Fk2CKvNIoUvr.jpg","popularity":2.181293,"title":"Valkyrie","video":false,"vote_average":6.6,"vote_count":455},{"adult":false,"backdrop_path":null,"genre_ids":[],"id":272231,"original_language":"en","original_title":"Die Walkure [The Valkyrie]","overview":"The Valkyrie takes us on theatrical voyage into a world that is in a never ending state of war, whether on the battlefield or in the family. Nobody is willing to let anyone out of their sight. A father kills his son and rejects his daughter. From this tragedy the nightmares and hidden aspirations of human history emerge, ranging from dreams of lost paradise via the apocalypse to the utopian idea that at least the final judgment an individual might be capable of bringing about the world's redemption.","release_date":"2008-01-01","poster_path":null,"popularity":1.000572,"title":"Die Walkure [The Valkyrie]","video":false,"vote_average":0.0,"vote_count":0},{"adult":false,"backdrop_path":"/qLhvLfawp8PZKSsyF3We7koOLA6.jpg","genre_ids":[99,10752],"id":253143,"original_language":"en","original_title":"Operation Valkyrie: The Stauffenberg Plot to Kill Hitler","overview":"July, 1944. As WWII raged on, a group of conspirators, led by Claus von Stauffenberg, plotted to assassinate Hitler and end his reign of terror. Using rare color footage, painstakingly recreated dramatizations, detailed CG reconstructions and exclusive interviews with leading historians, this thrilling documentary pre* Connection #0 to host api.tmdb.org left intact
sents the definitive record of what happened before, during and after these pivotal events.","release_date":"2008-11-04","poster_path":"/tRcPLIz3coHppWYLK710WnWiPVT.jpg","popularity":1.000826,"title":"Operation Valkyrie: The Stauffenberg Plot to Kill Hitler","video":false,"vote_average":0.0,"vote_count":0}],"total_pages":1,"total_results":3}p
Reply

Logout Mark Read Team Forum Stats Members Help
Movie scraper doesn work from Kodi, but works from commandline1