dylandoamaral / trakt-integration

A Trakt integration for Home Assistant compatible with upcoming media card
MIT License
30 stars 12 forks source link

Sensors empty #88

Closed skank01 closed 7 months ago

skank01 commented 7 months ago

Hi

I have 3 upcoming sensors. All 3 are empty. How can that be?

I just want to see upcoming new movies, new episodes and completely new series.

Thx

dylandoamaral commented 7 months ago

Maybe you don't have upcoming movies/series configured in trakt ?

skank01 commented 7 months ago

Yes i do Watchlist: image

Even in the anticipated

image

skank01 commented 7 months ago

I'm seeing 2 errors in log:

First: Unexpected error fetching trakt data: 'NoneType' object is not iterable Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 290, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 246, in _async_update_data return await self.update_method() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/trakt_tv/apis/trakt.py", line 368, in retrieve_data data = await gather( ^^^^^^^^^^^^^ File "/config/custom_components/trakt_tv/apis/trakt.py", line 320, in fetch_upcomings data = await gather( ^^^^^^^^^^^^^ File "/config/custom_components/trakt_tv/apis/trakt.py", line 277, in fetch_upcoming raw_medias = [media for medias in data for media in medias] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/trakt_tv/apis/trakt.py", line 277, in raw_medias = [media for medias in data for media in medias] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'NoneType' object is not iterable

Second: Can't request calendars/my/movies/2024-05-12/15 with get because it returns a 502 status code with content <!DOCTYPE html> api.trakt.tv | 502: Bad gateway

Bad gateway Error code 502

Visit cloudflare.com for more information.
2023-11-30 15:06:59 UTC
You

Browser

Working
skank01 commented 7 months ago

Hi any idea?

dylandoamaral commented 7 months ago

HI, I don't, generally 5XX errors are due to trakt servers.

skank01 commented 7 months ago

Hi, Strange but now i have 1 movie in the upcoming sensors.. Which is great, so it works, but a bit pity it shows not many movies.. up

Even my shows are empty

Any idea how it comes? Should i do something in trakt.tv ?

Arent the anticapted shown? I got upcoming movies and shows, and also all_upcoming movies and shows, and almost everything is empty All sensors are already 90 and 180 days ahead... which is big no?

Can you also explain a bit whats the difference between upcoming and all_upcoming.. cause upcoming is from the watchlist right.. but all upcoming should show all, no? Then why is it empty...

dylandoamaral commented 7 months ago

Indeed, you have to do something in trakt. For upcoming movies and shows, you have to go to https://trakt.tv/movies/anticipated and add some of them to the watchlist. If they are upcoming in less than 90 days (as your configuration say), it will appear. For show, it depends if you selected show or new_show: I advise you to look at https://trakt.docs.apiary.io/#reference/calendars/get-shows for more information.