CodyBerenson / PGMA-Modernized

An updated approach for Plex Gay Media Adult Agents for both Full Feature Films and Scenes
MIT License
124 stars 46 forks source link

[Feature Request}: Allow agents to use a local source for actor headshot images #269

Open fourstix opened 1 year ago

fourstix commented 1 year ago

Is your feature request related to a problem? Please describe. The IAFD website has recently been refusing head-shot image requests with http response code 403 "Forbidden". Other times IAFD doesn't have an actor's head-shot or sometimes it has the wrong actors head shot. The result is several actors no longer have head-shots when a film is scraped. This is the result of the source website denying requests and not the fault of a particular agent.

Describe the solution you'd like I would like to have a location (like a sub-directory) defined somewhere where one could load actor head shot images. When the Plex agent goes to associate a head shot with an actor in the movies cast, the agent would first check this location for an image. If it is found, the agent would use that image, instead of requesting an image from IAFD.

A nice to have would be to store the images received from IAFD in this location so that future requests would not need to go to IAFD. This should reduce the web traffic that is causing IAFD to deny image requests.

Describe alternatives you've considered Here's an example of how the Gay Adult NFO Importer agent does this. The Gay Adult NFO Importer agent allows one to provide a URL to search for actor head-shots. By setting up a local web server and setting this agent to use http://localhost/nfo as the URL. The Gay Adult NFO agent will load actor head-shots from images named Firstname_Lastname.jpg for example if the actor is listed as "Johnny Rapid" in the cast list in the nfo file for a film then the URL for the actor image is http://localhost/nfo/Johnny_Rapid.jpg.

However since not everyone can set up a local web server and there already is a lot of work done to read files in directories under the _PGMA directory. I think it would probably be best to create a directory under _PGMA and allow one to put head shot images there under some kind of naming scheme, like the NFO naming scheme.

Additional context I'll be happy to help test or contribute to this feature any way I can.

JPH71 commented 1 year ago

Ooh thanks for pointing this out...

I didn't realise that there was code for that in that plugin as I did not develop it and have never used it...

Cody has mentioned it to me yesterday to try and get it's iafd functionality sorted...

If it is possible I will try and get all the agents to be able to load alternative cast pictures...

Cheers

On Thu, 3 Aug 2023, 22:02 fourstix, @.***> wrote:

Is your feature request related to a problem? Please describe. The IAFD website has recently been refusing head-shot image requests with http response code 403 "Forbidden". Other times IAFD doesn't have an actor's head-shot or sometimes it has the wrong actors head shot. The result is several actors no longer have head-shots when a film is scraped. This is the result of the source website denying requests and not the fault of a particular agent.

Describe the solution you'd like I would like to have a location (like a sub-directory) defined somewhere where one could load actor head shot images. When the Plex agent goes to associate a head shot with an actor in the movies cast, the agent would first check this location for an image. If it is found, the agent would use that image, instead of requesting an image from IAFD.

A nice to have would be to store the images received from IAFD in this location so that future requests would not need to go to IAFD. This should reduce the web traffic that is causing IAFD to deny image requests.

Describe alternatives you've considered Here's an example of how the Gay Adult NFO Importer agent does this. The Gay Adult NFO Importer agent allows one to provide a URL to search for actor head-shots. By setting up a local web server and setting this agent to use http://localhost/nfo as the URL. The Gay Adult NFO agent will load actor head-shots from images named Firstname_Lastname.jpg for example if the actor is listed as "Johnny Rapid" in the cast list in the nfo file for a film then the URL for the actor image is http://localhost/nfo/Johnny_Rapid.jpg.

However since not everyone can set up a local web server and there already is a lot of work done to read files in directories under the _PGMA directory. I think it would probably be best to create a directory under _PGMA and allow one to put head shot images there under some kind of naming scheme, like the NFO naming scheme.

Additional context I'll be happy to help test or contribute to this feature any way I can.

— Reply to this email directly, view it on GitHub https://github.com/CodyBerenson/PGMA-Modernized/issues/269, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI3AKM3TJFGEV4MKEM2PR3XTP7WLANCNFSM6AAAAAA3DILUWM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

fourstix commented 1 year ago

If I remember correctly, the Gay Adult NFO agent tries to load it from the URL supplied, then it looks for local files stored in the folder that the nfo file is in. Then finally, it tries IAFD. I think Cloudflare broke this agent's IAFD logic the same way that it broke the other agents. So the logic added to the other agents for Cloudflare, probably needs to be added to this agent.

JPH71 commented 1 year ago

My thoughts exactly... the cloudflare library is no longer working...

Can you send me the list of the undonables? That you mentioned...

On Thu, 3 Aug 2023, 23:38 fourstix, @.***> wrote:

If I remember correctly, the Gay Adult NFO agent tries to load it from the URL supplied, then it looks for local files stored in the folder that the nfo file is in. Then finally, it tries IAFD. I think Cloudflare broke this agent's IAFD logic the same way that it broke the other agents. So the logic added to probably needs to be added to this agent.

— Reply to this email directly, view it on GitHub https://github.com/CodyBerenson/PGMA-Modernized/issues/269#issuecomment-1664678303, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI3AKJKT6GORIUUBNKPRIDXTQK5XANCNFSM6AAAAAA3DILUWM . You are receiving this because you commented.Message ID: @.***>

fourstix commented 1 year ago

I don't have any list. The only one I'm aware is the GAnfoMoviesImporter.bundle agent.

In the /Contents/Code/init.py module, the function getIAFDActorImage() probably needs to be updated.

fourstix commented 1 year ago

Oh, the underscores in the module file name around "init" turned into "Bold" highlighting.

JPH71 commented 1 year ago

Cheers... I will lok at this code... It was not created by me but hopefully should have it sorted very soon

On Fri, 4 Aug 2023, 00:07 fourstix, @.***> wrote:

Oh, the underscores in the module file name around "init" turned into "Bold" highlighting.

— Reply to this email directly, view it on GitHub https://github.com/CodyBerenson/PGMA-Modernized/issues/269#issuecomment-1664703467, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI3AKK3XFXURJ5SQCIOPG3XTQOKBANCNFSM6AAAAAA3DILUWM . You are receiving this because you commented.Message ID: @.***>

fourstix commented 1 year ago

@JPH71 Kudos to you, Jason. You've done such an amazing job fixing the 403 errors that I'm not sure if this feature is needed anymore. It's probably more of a nice to have at this point.

I can use the Gay Adult NFO agent with a local web server for the few films that can't be found by the GEVI, AEBN, GayHotMovies and GayEmpire agents.

JPH71 commented 1 year ago

If it makes life easier... it will get done.. I am still struggling with 403 errors when it comes to collection posters...

Jason x

On Tue, 8 Aug 2023, 16:16 fourstix, @.***> wrote:

@JPH71 https://github.com/JPH71 Kudos to you, Jason. You've done such an amazing job fixing the 403 errors that I'm not sure if this feature is needed anymore. It's probably more of a nice to have at this point.

I can use the Gay Adult NFO agent with a local web server for the few films that can't be found by the GEVI, AEBN, GayHotMovies and GayEmpire agents.

— Reply to this email directly, view it on GitHub https://github.com/CodyBerenson/PGMA-Modernized/issues/269#issuecomment-1669706395, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI3AKK7IYBP5CAT5MXFG6DXUJC2JANCNFSM6AAAAAA3DILUWM . You are receiving this because you were mentioned.Message ID: @.***>

fourstix commented 1 month ago

Bumping this request, since Cloudflare is blocking requests again.

It would be nice if /_PGMA/Cast/Face directory was searched before IAFD.

ms52538 commented 1 month ago

It would be beneficial to have instructions in how to place an actor’s headshot image into the …/Face directory and the naming convention to be used for the file? Unless this exists and I have missed it. Seems to be a viable solution to bypass Cloudflare provided the …[actor name 1,actor name2] formatting is used in a movie/scene/clip file name.

On Sun, Jul 28, 2024 at 1:33 PM fourstix @.***> wrote:

Bumping this request, since Cloudflare is blocking requests again.

It would be nice if /_PGMA/Cast/Face directory was searched before IAFD.

— Reply to this email directly, view it on GitHub https://github.com/CodyBerenson/PGMA-Modernized/issues/269#issuecomment-2254589715, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE5IYZBBL7IUNKQVUZREROTZOUTORAVCNFSM6AAAAABLS7FIHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGU4DSNZRGU . You are receiving this because you are subscribed to this thread.Message ID: @.***>

JPH71 commented 1 month ago

I may have mentioned this before, I was awaiting code from a plex expert on getting the code to allow plex to draw images from the local hard disk... As soon as I find an alternative way to do this - this will be implemented.

Jason

On Sun, 28 Jul 2024 at 18:48, Marcus @.***> wrote:

It would be beneficial to have instructions in how to place an actor’s headshot image into the …/Face directory and the naming convention to be used for the file? Unless this exists and I have missed it. Seems to be a viable solution to bypass Cloudflare provided the …[actor name 1,actor name2] formatting is used in a movie/scene/clip file name.

On Sun, Jul 28, 2024 at 1:33 PM fourstix @.***> wrote:

Bumping this request, since Cloudflare is blocking requests again.

It would be nice if /_PGMA/Cast/Face directory was searched before IAFD.

— Reply to this email directly, view it on GitHub < https://github.com/CodyBerenson/PGMA-Modernized/issues/269#issuecomment-2254589715>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AE5IYZBBL7IUNKQVUZREROTZOUTORAVCNFSM6AAAAABLS7FIHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGU4DSNZRGU>

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/CodyBerenson/PGMA-Modernized/issues/269#issuecomment-2254593330, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKI3AKNGAFV4K25N2IV7TG3ZOUVHFAVCNFSM6AAAAABLS7FIHSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGU4TGMZTGA . You are receiving this because you were mentioned.Message ID: @.***>