dylandoamaral / trakt-integration

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

Add 'trailer' and 'summary' attributes #112

Open mkanet opened 2 weeks ago

mkanet commented 2 weeks ago

@dylandoamaral this PR is a surprise! ๐Ÿ˜Š

Added trailer and summary attributes (from TMDB API) to trakt sensors; leveraging Upcoming Media Card's newest interactive features!

Description:


Example YAML code to enable both features:

type: custom:upcoming-media-card
entity: sensor.trakt_anticipated_shows
title: Anticipated Shows
image_style: fanart
enable_tooltips: true
enable_trailers: true


Example video showing both features in action:๐Ÿ˜Ž

Description

Example attribute data: sensor.trakt_anticipated_movies

data:
  - title_default: $title
    line1_default: $episode
    line2_default: $release
    line3_default: $rating - $runtime
    line4_default: $number - $studio
    icon: mdi:arrow-down-bold
  - title: Deadpool & Wolverine
    poster: https://image.tmdb.org/t/p/w500/jbwYaoYWZwxtPP76AZnfYKQjCEB.jpg
    fanart: https://image.tmdb.org/t/p/w500/dvBCdCohwWbsP5qAaglOXagDMtk.jpg
    genres:
      - Science Fiction
      - Action
      - Comedy
    studio: Marvel Studios
    trailer: https://www.youtube.com/watch?v=73_1biulkYk
    summary: >-
      A listless Wade Wilson toils away in civilian life with his days as the
      morally flexible mercenary, Deadpool, behind him. But when his homeworld
      faces an existential threat, Wade must reluctantly suit-up again with an
      even more reluctant Wolverine.
    runtime: 127
    release: $day, $date $time
    airdate: "2024-07-24T00:00:00Z"
dylandoamaral commented 1 week ago

This is really cool, I am not in holliday anymore, will look after work !

dylandoamaral commented 1 week ago

I rapidly checked but in this pull request, it seems that you are adding "anticipated" sensors not trailer/sumary attributes no ? I was expecting get_more_information to be updated to add trailer and summary but I don't see it.

By the way, if you also want to add a new kind of sensors, can you please separate it into 2 PRs ?

EDIT: I see that the other PR is almost the same but not exactly, I will let you order your both PRs before checking, ahah ! A tip if you have trouble with your branch, always create them from my develop branch maybe you created this one from your previous one.

mkanet commented 1 week ago

Hi @dylandoamaral, I'm currently sick. As soon as I feel better, I will look into this. FYI: I submited 2 separate PRs. The first PR includes the new Anticipated sensors. The second PR adds the trailer and summary attributes. If it is not like that, I must have made a mistake when pushing them out.

dylandoamaral commented 6 days ago

Hello @mkanet, I hope you feel better soon! Take care, and I look forward to hearing from you when you're well.