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

Fanart/poster change #77

Closed
wants to merge 2 commits into from
Closed

Conversation

Makhuta
Copy link
Contributor

@Makhuta Makhuta commented May 26, 2024

  • logging all used/possible images for fanart/poster

Makhuta added 2 commits May 26, 2024 12:12
- logging all used/possible images for fanart/poster
@mkanet
Copy link
Collaborator

mkanet commented May 26, 2024

Thank you! I'll test it as soon as I'm home.

@mkanet
Copy link
Collaborator

mkanet commented May 27, 2024

I'm having a very hard time identifying the correct path to use for posters in the version you just provided. There are so many listed in the log (which I have to check one by one to see what each one looks like). I unfortunately, don't have that much time to go through them all. I think it would be easier to look at the original sensor.py code (before config_flow version of this integration) to see how it determined the correct TV show poster paths in its attributes and compare it to how it's done in the current config_flow version of this Integration. I can do this in the next week or so when I have more time.

@Makhuta
Copy link
Contributor Author

Makhuta commented May 27, 2024

Ok, I will look into it when I got the time.

@mkanet
Copy link
Collaborator

mkanet commented May 27, 2024

I was able to match the old behavior (after looking at the old version of this integration before the config_flow rewrite)

I replaced the 2 lines below in parser.py

thumb = item.get("thumb", item.get("parentThumb", item.get("grandparentThumb", None)))
art = item.get("art", item.get("grandparentArt", None))

with...

if item['type'] == 'movie':
    thumb = item.get("thumb", "")
    art = item.get("art", "")
elif item['type'] == 'episode':
    thumb = item.get("grandparentThumb", "")
    art = item.get("grandparentArt", "")
else:
    thumb = item.get("thumb", item.get("parentThumb", item.get("grandparentThumb", None)))
    art = item.get("art", item.get("grandparentArt", None))

It is now displaying correct poster images. At least, it should display the same posters and fanart as before. Ill test it more before pushing the fix...

@mkanet
Copy link
Collaborator

mkanet commented May 28, 2024

821091f

@mkanet
Copy link
Collaborator

mkanet commented May 28, 2024

@Makhuta sorry to bug you again. I know you are busy just like I am.

Unrelated to the above issue (which I already fixed), a user is reporting that the new "Verify SSL" config_flow feature doesn't seem to do anything:
#78 (comment)

I looked at the config_flow code related to "Verify SSL", it "seems" to be correct. However, I wasn't able to actually verify that it does what its supposed to. When I generate an invalid SSL certificate (for my NGINX server to use for Plex) the invalid certificate causes my entire NGINX server to hang.

When you have time, could you please confirm that this feature actually works as intended in the real world? Maybe you have better luck testing it than me. In a worst case, if you can't do this (or don't have any time), maybe we should just remove this feature completely since it wasn't even in the previous version without config_flow.

@Makhuta
Copy link
Contributor Author

Makhuta commented May 28, 2024

If I remember correctly the verify ssl is for the request header because when I tried the sceneario with ssl enabled and verify ssl enabled but the certificate was not valid/was unknown the HA logged warning so it was intended for this purpose, it could be removed the integration will work just fine without it but there is posibility of warnings

@mkanet
Copy link
Collaborator

mkanet commented May 28, 2024

Can you please let me know for sure when you have time?

@mkanet mkanet closed this May 29, 2024
@mkanet
Copy link
Collaborator

mkanet commented May 29, 2024

I went ahead and removed the setting completely from config_flow in release 0.4.6. It seems to be working just fine without any errors when using HTTP or HTTPS.

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

Successfully merging this pull request may close these issues.

2 participants