dylandoamaral / trakt-integration

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

Shows are showing starting yesterday #39

Closed Mattssn closed 2 years ago

Mattssn commented 2 years ago

Hello, I am having the same issue as #17 which was closed with no resolution, The integration is working, but when I add it to the Upcoming Media Card it shows items from yesterday for example today is Friday 8/26 but this is what my upcoming media card is currently displaying:

P1josx2

I cant seem to figure out how to make it show todays shows from the current time onward.

Thanks!

Mattssn commented 2 years ago

When I look up the sensor in Dev Tools it shows that the Big Brother episode airdate is 8/26/22 which is incorrect.

`- title: Big Brother fanart: https://image.tmdb.org/t/p/w500/HmKMi8XfmMx3K7nlYL11W526FB.jpg genres:

Also here is my config for the integration:

trakt_tv: language: en sensors: upcoming: show: days_to_fetch: 30 max_medias: 10 movie: days_to_fetch: 45 max_medias: 5 recommendation: show: max_medias: 3 movie: max_medias: 3

Here is the config for the upcoming media card:

type: custom:upcoming-media-card entity: sensor.trakt_upcoming_shows title: Upcoming Episodes image_style: fanart hide_empty: true title_text: $title line1_text: $episode line2_text: $number line3_text: $day, $date $time line4_text: $empty max: 10

dylandoamaral commented 2 years ago

Hi, my guess is that you are seeing yesterday show because of your timezone. I can't know what is your timezone for now so I can't figure out what is "today" for you. I will create a PR to support timezone with a new entry in your configuration. The second thing is about the wrong air date of "Big Brother", the data is coming from are you sure it is not the same as the trakt website ?

dylandoamaral commented 2 years ago

According to https://trakt.tv/shows/big-brother-2000/seasons/24 it was the 26.

Mattssn commented 2 years ago

Thanks for the reply, for me the episode aired on Thursday 8/25 as seen here:

oYgWzsU

I have checked my time in SSH in both Unraid and the HAOS and they were correct, I also checked my TZ in Trakt it was also set correct MST (-7)

So yeah I am really not sure what is going on here, I hope the PR for TZ support helps as I can no longer add Sonarr to HA for some reason so getting this to work would be awesome.

Also, I looked over the docs, I did not see anything, but I was curious is there a way to use a custom calendar you set up with a list, so it just shows the shows I am watching or not. I have a media server and it scrobbles to trakt so it has a lot of shows and movies listed.

Thanks for your help!

dylandoamaral commented 2 years ago

Yes it is totally due to timezone I am actually UTC+1 and I don't see the same information ahah. I will publish a new version with https://github.com/dylandoamaral/trakt-integration/pull/40, feel free to close the issue if you think it is fixed !

dylandoamaral commented 2 years ago

I am not sure to understand your question , but if you add:

  sensors:
    upcoming:
      show:
        days_to_fetch: 90 # How many days in the future you want to fetch
        max_medias: 3 # How many medias you want to fetch

You should only see your show.

Mattssn commented 2 years ago

Sorry am kinda new to all this, how will I update? it will just pop up in HACS with an update notification?

Mattssn commented 2 years ago

Aslo what I meant is like in this screenshot you see Fantasy and Medical shows? Those are lists I subscribe to, what I would like to ultimately do is put all of the shows I watch into one list, then just display that list on the upcoming media card. Sorry I hope this makes sense

Edit: Sorry forgot to attach the screenshot

CSPn8HK

dylandoamaral commented 2 years ago

Yes it will just pop soon. I am going as far as I can, if I think something is good for the integration I integrate it. Feel free to open one issue for each subject please ^^'. It is easier for me ! However for your feature, I don't know how I can help you. It is a premium feature and I don't have a premium account for trakt.

Mattssn commented 2 years ago

Maybe I can open another account and only follow shows that I watch and use that, My main account sync from my media server so I think it will always show the tons of shows I have, thats okay though, I will wait for the update on HACS, I appreciate your quick support, thanks a ton!

Mattssn commented 2 years ago

Sorry to bother you again, I have updated the integration, and I set the timezone in my config

trakt_tv: timezone: America/Phoenix # Prefered timezone language: en sensors: upcoming: show: days_to_fetch: 30 max_medias: 10 movie: days_to_fetch: 45 max_medias: 5 recommendation: show: max_medias: 3 movie: max_medias: 3

But before I even updated the Time Zone I was seeing the following on the Upcoming Media Card:

Qz6j2Cf

I know that America/Phoenix is a valid time zone

I am not sure how to format the code here, but the indentation is correct on my config

dylandoamaral commented 2 years ago

You should open a new issue but yes it is a bug ! I have created a new issue and will try to fix it asap.