gboudreau/XBMCnfoMoviesImporter.bundle

Local actor thumbs directory

Opened this issue · 5 comments

Little bit of a niche situation but would like some clarification.

I currently run both Plex and Jellyfin, and Jellyfin can store info in NFO/local files, which I have selected.
The actor thumbs are stored in F:\Jellyfin\metadata\People and then a folder for each starting character (F:\Jellyfin\metadata\People\A, F:\Jellyfin\metadata\People,B, then a poster.jpg inside a folder
F:\Jellyfin\metadata\People\G\Gary Kemp\poster.jpg
The current NFO for actors is as follows:
<actor> <name>Jarneia Richard-Noel</name> <role>Catherine of Aragon</role> <type>Actor</type> <thumb>F:\Jellyfin\metadata\People\J\Jarneia Richard-Noel\poster.jpg</thumb> </actor>
but this doesn't show an image for the cast member

Plex with XMBCnfoMoviesImporter doesn't seem to recognise this when selected as the directory for "path to movie library or global actor folder"

  • what is the recommended folder structure for global actor folder? I have some things in my library which don't exist on IMDB/TMDB so I have to create local data for, I tried storing the thumbs as URLs to direct images in the NFO but jellyfin doesn't like those, and ideally local would be a better solution, if I can clone the Jellyfin People folder and rearrange so plex with xbmcnfomoviesimporter can see the images that would be ideal, but I can't see anything for this in how they should be sorted
SlrG commented

I think its all files with actor name in one folder.

Did you see this?

#110

If you have a global folder you can name it anything you want. The name of the jpgs inside must be like this though (unless you want to change the plugin code to accept something custom). Spaces aren't allowed in the naming of the jpgs, although they can be in the NFO files. Otherwise the names should match identically (not sure about capital versus lowercase though). Certainly no sub folders, for each letter (again, unless you fork the code and customize it yourself).

\MyActorFolder\first_last.jpg
or
\MyActorFolder\first_middle_last.jpg

I am also using Jellyfin and Plex and would like to have this somehow work. I am using Jellyfin to gather my actor thumbs but I am forced into their structure of the folder name being the actor name and poster.jpg file within.

I am using docker so I have an nginx container with Jellyfin actor folders mounted within.

    nginx:
        image: ghcr.io/linuxserver/nginx
        container_name: nginx
        environment:
            - PUID=1000
            - PGID=1000
            - TZ=Europe/London
        volumes:
            - ./nginx/appdata/config:/config
            - ./jellyfin/appdata/config/data/metadata/People:/config/www/config/data/metadata/People
        ports:
            - 80:80
            - 443:443
        restart: unless-stopped

Jellyfin saves the actor thumb path as an absolute path in the nfo.

  <actor>
    <name>Mark Wahlberg</name>
    <role>Daniel Lugo</role>
    <type>Actor</type>
    <sortorder>0</sortorder>
    <thumb>/config/data/metadata/People/M/Mark Wahlberg/poster.jpg</thumb>
  </actor>

What would make this work is if XBMCnfoMovieImporter used the path to movie library or global actor folder field with the Link option, that way I can add http://nginx as my path and the absolute path in the nfo will follow.

http://nginx/config/data/metadata/People/M/Mark Wahlberg/poster.jpg

It seems currently the path field is only used when Local or Global selection is chosen. When the Link option is chosen, this field is ignored. If it wasn't ignored, I would then be able to get this to work.

Is there anyone that would be able to help with letting me know what code I would need to adjust in order to get this is function in this way?

I got this working. Hope this helps others with the same setup. My post above mentions my docker configuration and nfo actor thumb paths.

I made a change to the __init__.py file:

Changed this section:

                    if athumbloc == 'link' or not newrole.photo:
                        try:
                            athumbpath = preferences['athumbpath'].rstrip ('/')
                            path = actor.xpath('thumb')[0].text
                            newrole.photo = athumbpath + path         
                            log.debug ('linked actor photo: ' + newrole.photo)
                        except:
                            log.debug ('failed setting linked actor photo!')
                            pass

Changed my actor thumb option to Link
Changed the path field to "http://nginx-ip-address"

I got this working. Hope this helps others with the same setup. My post above mentions my docker configuration and nfo actor thumb paths.

I made a change to the __init__.py file:

Changed this section:

                    if athumbloc == 'link' or not newrole.photo:
                        try:
                            athumbpath = preferences['athumbpath'].rstrip ('/')
                            path = actor.xpath('thumb')[0].text
                            newrole.photo = athumbpath + path         
                            log.debug ('linked actor photo: ' + newrole.photo)
                        except:
                            log.debug ('failed setting linked actor photo!')
                            pass

Changed my actor thumb option to Link Changed the path field to "http://nginx-ip-address"

Thanks, helped me a lot. And u can also do it this way:
1.Dont change __init__.py file.
2.Change (or add) the content of thumb tag in nfo file, into http://localhost/actor_name.jpg.
It also works, but ur sharing inspired me anyway.

My whole solution (docker-plex + docker-nginx)
1.nginx config as:

server {
    listen       80;
    server_name  localhost;

    location / {
        root   /var/www/html;
        index  index.php index.html index.htm;
    }
}

2.docker-compose.yml:

version: "2.1"
services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - VERSION=docker
      - PLEX_CLAIM= #optional
    volumes:
      - /path/to/library:/config
      - /path/to/tvseries:/tv
      - /path/to/movies:/movies
    restart: unless-stopped

  nginx:
    image: nginx:1.23.1
    volumes:
      - nginx_config_file_path:/etc/nginx/conf.d
      - actor_image_path:/var/www/html
    logging:
      driver: syslog
    restart: always

3.After docker-compose up -d , use docker inspect plex-nginx-1 | grep IPAddress to get nginx-container ip.
4.Add a line in .nfo file, looks like below:

  <actor>
    <name>actor_name</name>
    <type>Actor</type>
    <thumb>http://172.22.0.2/actor_name.jpg</thumb>
  </actor>

http://nginx/actor_name.jpg or http://plex-nginx-1/actor_name.jpg wont work.
5.Use XBMC to import.