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

Allow a User to Specify another URL for Actor Head-Shots besides IAFD #326

Open
fourstix opened this issue Dec 17, 2024 · 4 comments
Open
Labels
enhancement New feature or request

Comments

@fourstix
Copy link

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. IAFD and Cloudflare seem to change their logic often to deny repeated requests. This feature allows one to avoid IAFD when using the other agents.

Describe the solution you'd like
I would like to be able to supply the agent with a parameter for a URL that would be used to supply actor images instead of IAFD. Then one can set up their own web server on their home network and use the IP address or a dynamic hostname. The agent can then convert the actor name to an image file name using the same logic as the NFO agent, and obtain the head-shot without IAFD. For example if the actor name was Johnny Rapid, and I supplied the URL name http://myserver/nfo then the image request would go to http://myseverurl/nfo/Johnny_Rapid.jpg.

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.

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

@fourstix fourstix added the enhancement New feature or request label Dec 17, 2024
@JPH71
Copy link

JPH71 commented Dec 17, 2024 via email

@fourstix
Copy link
Author

I haven't ever figured out how to load the actors head shot images from the hard disk in a Plex Agent. If I knew how I would certainly share. I had thought the NFO agent allowed that, but I tried several things but I could never get it to work. I looked at the NFO code, but really couldn't figure out how it was done.

It isn't too hard to set up a web server using Apache. Qnap comes with it installed by default, so one just enables it, and then places the files in a sub-directory underneath the /Web directory. It would be fairly easy to write a generic how to guide.

The reading the image file from the local hard disk way would be the best solution, but a local web server is a good work around for Cloudflare.

@JPH71
Copy link

JPH71 commented Dec 17, 2024 via email

@fourstix
Copy link
Author

Hi,

This is where it gets a bit complicated. I am using Apache because it was pre-installed on Qnap. Windows has a different web server pre-installed called Internet Information Services or IIS. Both Apache and IIS are full-featured web servers, and we only need the features hat serves static content. As far as serving static content, all web servers are pretty much the same.

For IIS in Windows 10 or 11, one needs to go to the control panel, Click on Programs, the Click on Turn Windows Features On and Off, and then select the feature to enable it. I think one only needs the Internet Information Services Web Hosting Core feature. The other option is the one comes with everything.

image

One more thing, by searching the web, I found out that Python itself comes with it's own Web Server class that can also be used as a simple web server. https://stackoverflow.com/questions/5050851/best-lightweight-web-server-only-static-content-for-windows

The python command:

py -m http.server 8000

Starts a web server that serves files from the current directory over port 8000. On my Windows laptop I was able to access files like http://127.0.0.1:8000/Johnny_Rapid.jpg (for some reason, localhost isn't defined on my Windows laptop.) Here's the results from the Python Web Server class running in a directory with an image file named Johnny_Rapid.jpg

image

I'll send you a private note with some other options. You're welcome to use the web server and files on my Qnap NAS for testing and development. I have about 1000 actor images on my NAS used for the NFO agent already. I'm also happy to help develop and test this any way that I can

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

No branches or pull requests

2 participants