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

Square Author Images #76

Merged
merged 2 commits into from
Jan 25, 2023
Merged

Conversation

csandman
Copy link
Contributor

@csandman csandman commented Jan 25, 2023

This is my PR for laxamentumtech/audnexus#530

Like I mentioned in this comment, The centering actually has nothing to do with any sort of facial recognition, it just turned out that the photos in portrait layout look better when they're cropped to the top. So instead of making a new custom option, I just set things up to crop each portrait image to a square centered at the top, and crop each landscape image at the horizontal center.

There is no real need for cropping the horizontal images, as Plex will do the same thing automatically, but I added it anyway in case you'd prefer images to be consistently coming back as square. If you don't want them cropped, I (or you) can just remove L328-L336.

Let me know your thoughts!


Here is what my Authors looked like after running this new agent:

image

Compared to what they looked like before this change:

image

@djdembeck
Copy link
Owner

Incredible work! SO glad you found a way around just white-cropped images in some instances too.

@csandman
Copy link
Contributor Author

Incredible work! SO glad you found a way around just white-cropped images in some instances too.

Same haha, I'm a little disappointed that I was wrong about the intelligent facial centering, but I do think this looks a lot better than before!

@djdembeck djdembeck merged commit 6c857ad into djdembeck:develop Jan 25, 2023
@csandman
Copy link
Contributor Author

I had one more thought about this, by the way, and I'm not sure if you have a good solution. This is kind of related to this issue: #58 (comment)

When I update one of my existing instances of this agent (I keep setting up copies to test fresh library creations) to use this change, the new artist images are added, but not selected as default. Do you know if there's a way to make these new images automatically replace the existing ones?

@djdembeck
Copy link
Owner

Yeah, I need to spend more time with that. I looked at some other agents' code, but they are movie agents, so we can only do some things they do. Essentially, we'd have to clear images for the artist and reload them in the correct order. It didn't work for me in my previous testing for albums, but I never investigated further.

@djdembeck djdembeck mentioned this pull request Jan 26, 2023
@csandman
Copy link
Contributor Author

Is the part you're talking about the helper.metadata.posters.validate_keys([helper.thumb]) in the compile_metadata function for the AudiobookAlbum agent? Because I can't seem to find any info on that being a built-in function anywhere, haha. Relying on docs from 2011 is a bit rough though.

@csandman csandman deleted the square-artist-images branch January 31, 2023 04:31
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.

None yet

2 participants