2017-02-24, 01:54
(2017-02-24, 00:42)redglory Wrote: I'm executing this on cmd:
Code:python texturecache.py imdb tvshows
and always outputs []
That means one of 3 things: 1) you have no TV shows, 2) all your tv show/episodes are failing when querying omdbapi.com or 3) you have no episodes that need updating
You should see in the logfile when omdbapi.com queries fail to obtain a result. Assuming some omdbapi.com queries are succeeding (sorry, this isn't shown clearly in the log - you can only tell by the absence of a failure message) and you're not getting any "changes" (ie. "[]" is being output) then this would confirm that your current media library matches perfectly with omdbapi.com and nothing needs to be updated. I'm not sure how often omdbapi.com will update it's own database, it might only be once a day so running this script repeatedly is unlikely to be beneficial.
If you just want to test your code, you can manually change the votes for an episode so that re-runnig "imdb tvshows" should correct the change (assuming the episode is being found on omdbapi.com, of course):
Here's an example, using the show "Lucifer":
Code:
texturecache.py/texturecache.py imdb tvshows lucifer
[]
So no errors/failures - all episodes are being found on omdbapi.com - and nothing that needs updating.
View the votes for the tvshow:
Code:
texturecache.py Jd tvshows lucifer @extrajson.tvshows.episode=votes
This is my result: http://sprunge.us/UbhJ
Now pick an episode and make a note of the episodeid - in my case, the latest episode 2x13 has episodeid 20387 (with votes 412)
Change the number of votes to something other than its current value, for example 1:
Code:
texturecache.py set episode 20387 votes 1
And now re-run the imdb update:
Code:
texturecache.py/texturecache.py imdb tvshows lucifer
[
{
"episodetitle": "2x13. A Good Day to Die",
"imdbnumber": "tt5668586",
"items": {
"votes": "412"
},
"libraryid": 20387,
"title": "Lucifer",
"type": "episode"
}
]
You can do this repeatedly until you are happy with your code. If you still get no changes after changing the votes then please upload your logfile somewhere when running "imdb tvshows <tvshowname>"