Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After the update from 0.4.1 to 0.4.2 the thumbnails of the media are no longer shown #75

Closed
XalaTheShepard opened this issue May 22, 2024 · 20 comments

Comments

@XalaTheShepard
Copy link

Since version 0.4.2 the thumbnails of the media are no longer shown in the sensor. Reverting back to 0.4.1 the thumbnails are again visible.
Could you please add the thumbnails to the sensors?

Thanks in advance.

Kind regards,

Robin

@XalaTheShepard
Copy link
Author

Schermafbeelding 2024-05-22 150908

Please find enclosed the image with the current situation in version 0.4.2
Kind regards

@mkanet mkanet mentioned this issue May 23, 2024
@mkanet
Copy link
Collaborator

mkanet commented May 23, 2024

Hi Robin, thank you for reporting this issue. I just made a change; and, updated the version to 0.4.3. Can you please give it a try when you're notified of update? Let me know how it works after you update and reboot home assistant.

@XalaTheShepard
Copy link
Author

Dear Mkanet, I have updated the integration, but the thumbnails are still not loaded.
In the logs I find no issue with Plex nor with Recently added.
I am wondering if there is an issue in my configuration of my Lovelace Dashboard.
Please find enclosed the screenshots.

Many thanks for looking into this issue.
Kind regards,
Robin
Screenshot_20240523_075605_io homeassistant companion android
Screenshot_20240523_075543_io homeassistant companion android

@XalaTheShepard
Copy link
Author

data:

  • title_default: $title
    line1_default: $episode
    line2_default: $release
    line3_default: $number - $rating - $runtime
    line4_default: $genres
    icon: mdi:eye-off
  • airdate: "2024-05-17T20:04:21Z"
    aired: "2024-03-20"
    release: $day, $date $time
    flag: true
    title: "Ghostbusters: Frozen Empire"
    episode: "Ghostbusters: Frozen Empire"
    number: ""
    runtime: 116
    studio: Ghost Corps
    genres: ""
    rating: ""
    summary: >-
    De familie Spengler keert terug naar waar het allemaal begon – de
    iconische brandweerkazerne van New York City – om samen te werken met de
    originele Ghostbusters, die een uiterst geheim onderzoekslaboratorium
    hebben ontwikkeld om de opsporende geesten naar een hoger niveau te
    tillen. Maar wanneer de ontdekking van een oud artefact een kwade kracht
    ontketent, moeten nieuwe en oude Ghostbusters hun krachten bundelen om hun
    huis te beschermen en de wereld te redden van een tweede ijstijd.
    poster: /plex_plex_recently_added?path=/library/metadata/61865/thumb/1715994852
    fanart: /plex_plex_recently_added?path=/library/metadata/61865/art/1715994852
    deep_link: >-

@XalaTheShepard
Copy link
Author

Forgot the details of the sensor

@loryanstrant
Copy link

I've got this issue as well, although I don't have a comparison as I only just got it working yesterday.
image

@pbaart
Copy link

pbaart commented May 23, 2024

I got the same issue after updating to the latest version (0.4.3), but I also moved the config from a yaml file to the frontend.
The issue for me was a Mixed content issue. My Home Assistant is accessed over SSL, but was trying to retrieve the images over a non-SSL connection that was why the images were blocked by the browser.

I had configured my plex server without SSL, because it wouldn't login with SSL enabled on port 32400. Even with Verify SSL turned off it wouldn't login.
After changing my plex to a valid https url it was working again.
Maybe this helps in solving the issue for some of you.

data: 
- title_default: $title
  line1_default: $episode
  line2_default: $release
  line3_default: $number - $rating - $runtime
  line4_default: $genres
  icon: mdi:eye-off
- airdate: '2024-05-23T06:42:58Z'
  aired: '2024-05-23'
  release: $day, $date $time
  flag: true
  title: 'Star Trek: Discovery'
  episode: Lagrange Point
  season_num: '5'
  episode_num: '9'
  number: S05E09
  runtime: 46
  studio: ''
  genres: ''
  rating: ''
  summary: >-
    After Moll and the Breen capture a mysterious structure that contains the
    Progenitors' power, Captain Burnham must lead a covert mission to retrieve
    it before the Breen figure out how to use it.
  poster: /plex_recently_added?path=/library/metadata/69045/thumb/1716446580
  fanart: /plex_recently_added?path=/library/metadata/43526/art/1716339551
  deep_link: >-
    https://plex.xxxxx.xxx:443/web/index.html#!/server/afb6c664a192e78f7400b2e96919a15c92e78db2/details?key=%2Flibrary%2Fmetadata%2F69045

@mkanet
Copy link
Collaborator

mkanet commented May 23, 2024

@XalaTheShepard thank you. @pbaart Can you also provide the attribute data just like @XalaTheShepard did above (look under Home Assistant's GUI Developer tools/STATES).

@pbaart
Copy link

pbaart commented May 23, 2024

added sensor data. This data is working.
The differece with the non working version is ony the deep_link url

working:

deep_link: >-
    https://plex.xxxxx.xxx:443/web/index.html#!/server/afb6c664a192e78f7400b2e96919a15c92e78db2/details?key=%2Flibrary%2Fmetadata%2F69045

not working:

deep_link: >-
    http://192.168.x.x:32400/web/index.html#!/server/afb6c664a192e78f7400b2e96919a15c92e78db2/details?key=%2Flibrary%2Fmetadata%2F69045

@XalaTheShepard
Copy link
Author

Dear Mkanet,

Please find below the requested information.

Kind regards,

Robin


data:

  • title_default: $title
    line1_default: $episode
    line2_default: $release
    line3_default: $number - $rating - $runtime
    line4_default: $genres
    icon: mdi:eye-off
  • airdate: "2024-05-17T20:04:21Z"
    aired: "2024-03-20"
    release: $day, $date $time
    flag: true
    title: "Ghostbusters: Frozen Empire"
    episode: "Ghostbusters: Frozen Empire"
    number: ""
    runtime: 116
    studio: Ghost Corps
    genres: ""
    rating: ""
    summary: >-
    De familie Spengler keert terug naar waar het allemaal begon – de
    iconische brandweerkazerne van New York City – om samen te werken met de
    originele Ghostbusters, die een uiterst geheim onderzoekslaboratorium
    hebben ontwikkeld om de opsporende geesten naar een hoger niveau te
    tillen. Maar wanneer de ontdekking van een oud artefact een kwade kracht
    ontketent, moeten nieuwe en oude Ghostbusters hun krachten bundelen om hun
    huis te beschermen en de wereld te redden van een tweede ijstijd.
    poster: /plex_plex_recently_added?path=/library/metadata/61865/thumb/1715994852
    fanart: /plex_plex_recently_added?path=/library/metadata/61865/art/1715994852
    deep_link: >-
    http://192.168.0.2:32400/web/index.html#!/server/75366a4f4f9692a06cae8e92d78c8c5c6a523080/details?key=%2Flibrary%2Fmetadata%2F61865
  • airdate: "2024-03-07T09:10:33Z"
    aired: "2023-11-22"
    release: $day, $date $time
    flag: true
    title: Napoleon
    episode: Napoleon
    number: ""
    runtime: 158
    studio: Apple Studios
    genres: ""
    rating: ""
    summary: >-
    Een intiem inkijkje in de oorsprong van de Franse militaire leider en zijn
    snelle opmars tot keizer. Centraal in het verhaal staat Napoleons
    meeslepende en grillige relatie met zijn vrouw en ware liefde, Josephine.
    poster: /plex_plex_recently_added?path=/library/metadata/61663/thumb/1715053885
    fanart: /plex_plex_recently_added?path=/library/metadata/61663/art/1715053885
    deep_link: >-
    http://192.168.0.2:32400/web/index.html#!/server/75366a4f4f9692a06cae8e92d78c8c5c6a523080/details?key=%2Flibrary%2Fmetadata%2F61663
  • airdate: "2023-12-29T21:20:27Z"
    aired: "2015-10-21"
    release: $day, $date $time
    flag: true
    title: The Last Witch Hunter
    episode: The Last Witch Hunter
    number: ""
    runtime: 106
    studio: NeoReel
    genres: ""
    rating: ""
    summary: >-
    De huidige, moderne wereld bezit vele geheimen. Het meest
    verbazingwekkende geheim is dat heksen nog steeds onder de mensen leven en
    van plan zijn een dodelijke plaag op de mensheid los te laten.
    poster: /plex_plex_recently_added?path=/library/metadata/61345/thumb/1715653995
    fanart: /plex_plex_recently_added?path=/library/metadata/61345/art/1715653995
    deep_link: >-
    http://192.168.0.2:32400/web/index.html#!/server/75366a4f4f9692a06cae8e92d78c8c5c6a523080/details?key=%2Flibrary%2Fmetadata%2F61345
  • airdate: "2023-12-29T19:02:57Z"
    aired: "2023-09-15"
    release: $day, $date $time
    flag: true
    title: Expend4bles
    episode: Expend4bles
    number: ""
    runtime: 103
    studio: Millennium Media
    genres: ""
    rating: ""
    summary: >-
    Op een vrachtschip worden er kernwapens gestolen door terroristen. Om een
    mogelijke Derde Wereldoorlog te voorkomen, worden Barney Ross, Lee
    Christmas en de andere leden van de Expendables ingeschakeld. Als 's
    werelds laatste verdedigingslinie trachten ze hier een stokje voor te
    steken met nieuwe teamleden die andere stijlen en tactieken toepassen.
    poster: /plex_plex_recently_added?path=/library/metadata/61340/thumb/1715653995
    fanart: /plex_plex_recently_added?path=/library/metadata/61340/art/1715653995
    deep_link: >-
    http://192.168.0.2:32400/web/index.html#!/server/75366a4f4f9692a06cae8e92d78c8c5c6a523080/details?key=%2Flibrary%2Fmetadata%2F61340
  • airdate: "2023-12-24T20:50:04Z"
    aired: "2023-10-04"
    release: $day, $date $time
    flag: true
    title: "The Exorcist: Believer"
    episode: "The Exorcist: Believer"
    number: ""
    runtime: 111
    studio: Universal Pictures
    genres: ""
    rating: ""
    summary: >-
    Sinds zijn zwangere vrouw twaalf jaar geleden omkwam bij een aardbeving in
    Haïti, moet Victor Fielding hun dochter Angela in zijn eentje zien groot
    te brengen. Maar als Angela en haar vriendinnetje Katherine in het bos
    vermist raken en pas na drie dagen weer opduiken zonder dat ze enig idee
    hebben wat er met hen gebeurd is, leidt dat tot een reeks gebeurtenissen
    die de wanhopige Victor ertoe dwingen om de confrontatie aan te gaan met
    het kwaad in zijn meest angstaanjagende gedaante. Daarom zoekt hij zijn
    toevlucht tot de enige nog levende persoon die ooit iets dergelijks heeft
    meegemaakt
    poster: /plex_plex_recently_added?path=/library/metadata/61301/thumb/1715653994
    fanart: /plex_plex_recently_added?path=/library/metadata/61301/art/1715653994
    deep_link: >-
    http://192.168.0.2:32400/web/index.html#!/server/75366a4f4f9692a06cae8e92d78c8c5c6a523080/details?key=%2Flibrary%2Fmetadata%2F61301
    friendly_name: Plex Plex Recently Added Movie

@mkanet
Copy link
Collaborator

mkanet commented May 23, 2024

Thanks, in all honesty, most of the testing we did was using SSL. As soon as I get time, I will test without SSL to see if I can reproduce what you're seeing.

I might need to involve @Makhuta, He is much more familiar with the latest changes.

@Makhuta
Copy link
Contributor

Makhuta commented May 23, 2024

I have absolutely no clue what the problem might be, I tried every possible combination of config but it worked for me every time.

Conbination tried

Plex Home Assistant
local address, no ssl local address
local address, no ssl domain
local address, ssl local address
local address, ssl domain
domain, no ssl local address
domain, ssl local address
domain, no ssl domain
domain, ssl domain

It worked every time.
Can you please show your setting when adding? (You can censore sensitive data like token ect.) Is there any errors/warnings in log related to the integration?

@XalaTheShepard
Copy link
Author

Dear Makhuta, have you each time performed a restart of HA?
I have switched the setup of Plex recently added from local IP for Plex to domain with SSL certificate.
This time, after a reboot, the thumbnails were shown.

@mkanet
Copy link
Collaborator

mkanet commented May 24, 2024

@Makhuta I was able to reproduce this same issue. However, I had to delete my web browser's cache first; otherwise, I would continue to see the old cached images in the respective cards.

If you don't reboot and delete the web browser cache, then add the integration through config_flow, your cards will most likely continue displaying your old images from before. You will need to do this every time you switch between SSL and no SSL configurations for this integration.

This is what I did to reproduce it.

  1. Delete existing device and respective sensors from the Integration
  2. Reboot
  3. Used the below configuration to add default sensors:
    image
  4. Immediately afterwards, I noticed all the fanart was STILL being displayed in my existing cards. I knew there was a chance I was looking at old cached images. After I deleted the web browser cache, immediately afterwards none of the images were being displayed anymore:
    image

Please note that debugging is enabled for the plex integration. However, the integration is not generating any errors. not even warnings; well except for: 2024-05-23 17:16:28.052 WARNING (MainThread) [custom_components.hacs] You have 'custom-components/sensor.plex_recently_added' installed with HACS this repository has been removed from HACS, please consider removing it. Removal reason (Repository is archived)

@Makhuta
Copy link
Contributor

Makhuta commented May 24, 2024

I most likely found the solution for this issue and already posted pull request here

PS. I was able to replicate the problem just like @mkanet said so the fix should work

Edit: Nevermind it is not gonna work I need to change it in a different way
Edit 2: Tried new thing hopefully it will work now. Now I tested it even outside my network. The reason that the previous one was wrong was because I forgot about security when using unknown certificate (in this situation none) now it should "redistribute" the response gotten from the plex (poster/fanart) as if it was natively on HA

@mkanet
Copy link
Collaborator

mkanet commented May 24, 2024

@XalaTheShepard @pbaart we just pushed version 0.4.4 which includes the fix for this. I just confirmed that it does resolve the issue on my setup. You should receive a HACS notification to tell you there is a new version.
Please let us know how it goes.

@XalaTheShepard
Copy link
Author

Dear Mkanet, I have just updated to the latest version and can confirm that it now works as expected. Many thanks and enjoy your weekend. Kind regards, Robin

@mkanet
Copy link
Collaborator

mkanet commented May 24, 2024

@XalaTheShepard we should thank you. If you hadn't reported this issue, this issue would remain broken.

@mkanet mkanet closed this as completed May 24, 2024
@loryanstrant
Copy link

Woohoo! Thank you!

@mkanet
Copy link
Collaborator

mkanet commented May 26, 2024

@Makhuta, I've been meaning to ask you... Can you tell me your email address? I wanted to ask you something unrelated to issue; however, related to this integration. Or you can send me a quick email so I can have yours too. Mine is: mkanet at yahoo dot com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants