dbr / tvdb_api

Simple to use interface to TheTVDB.com API in Python
The Unlicense
339 stars 63 forks source link

Banner rating always 0 #68

Closed mueslo closed 6 years ago

mueslo commented 6 years ago

This is on the latest PyPI version (2.0)

For example for the top rated poster of "Doctor Who (2005)":

In [71]: tvdb['doctor who (2005)']['_banners']['poster']['raw'][47]
Out[71]: 
{'id': 1105324,
 'keyType': 'poster',
 'subKey': '',
 'fileName': 'posters/78804-52.jpg',
 'resolution': '680x1000',
 'ratingsInfo': {'average': 0, 'count': 0},
 'thumbnail': ''}
mdhiggins commented 6 years ago

I'm seeing this as well

dbr commented 6 years ago

This seems to be an issue with TheTVDB, not this library - if I query that series via https://api.thetvdb.com/swagger ..I get the same result - none of the posters seem to have ratings:

{
  "data": [
    {
      "id": 29944,
      "keyType": "poster",
      "subKey": "",
      "fileName": "posters/76107-1.jpg",
      "resolution": "680x1000",
      "ratingsInfo": {
        "average": 0,
        "count": 0
      },
      "thumbnail": ""
    },
...

Probably worth asking on their forums etc (seems like a bug with the API as the website itself is showing ratings)

mdhiggins commented 6 years ago

If I query this for example to get the season artwork like I used previously with the pre V2 API and your python implementation I get the following

Query https://api.thetvdb.com/series/73871/images/query?keyType=season

{
  "data": [
    {
      "id": 6529,
      "keyType": "season",
      "subKey": "1",
      "fileName": "seasons/249-1.jpg",
      "resolution": "",
      "ratingsInfo": {
        "average": 6.5,
        "count": 19
      },
      "thumbnail": "_cache/seasons/249-1.jpg"
    },
    {
      "id": 6530,
      "keyType": "season",
      "subKey": "2",
      "fileName": "seasons/249-2.jpg",
      "resolution": "",
      "ratingsInfo": {
        "average": 6.1,
        "count": 20
      },
      "thumbnail": "_cache/seasons/249-2.jpg"
    },
    {
      "id": 6531,
      "keyType": "season",
      "subKey": "3",
      "fileName": "seasons/249-3.jpg",
      "resolution": "",
      "ratingsInfo": {
        "average": 6.1,
        "count": 17
      },
      "thumbnail": "_cache/seasons/249-3.jpg"
    }
   ...

I don't think its an issue with the API

mdhiggins commented 6 years ago

Poster works similarly

https://api.thetvdb.com/series/73871/images/query?keyType=poster

{
  "data": [
    {
      "id": 25519,
      "keyType": "poster",
      "subKey": "",
      "fileName": "posters/73871-1.jpg",
      "resolution": "680x1000",
      "ratingsInfo": {
        "average": 6.3,
        "count": 18
      },
      "thumbnail": "_cache/posters/73871-1.jpg"
    },
    {
      "id": 25520,
      "keyType": "poster",
      "subKey": "",
      "fileName": "posters/73871-2.jpg",
      "resolution": "680x1000",
      "ratingsInfo": {
        "average": 7.8,
        "count": 44
      },
      "thumbnail": "_cache/posters/73871-2.jpg"
    }
...
mdhiggins commented 6 years ago

Can we reopen this?