Jellyfin Forum
How does the library.db understand relationships between actors and movies? - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Development (https://forum.jellyfin.org/f-development)
+--- Forum: Server Development (https://forum.jellyfin.org/f-server-development)
+--- Thread: How does the library.db understand relationships between actors and movies? (/t-how-does-the-library-db-understand-relationships-between-actors-and-movies)



How does the library.db understand relationships between actors and movies? - Kevin Blansit - 2023-12-23

Hi,
As I understand it, the library.db is the primary repository for the meta-data associated with Jellyfin content. I am trying to write a simple python script (with a connection to the SQlite database) to automatically add genre tags associated with certain people (based off of a YAML file I am making for myself).

For a simple example, I can see Les Misérables as a concert movie row in my SQLite database in the table TypedBaseItems. I also for example see Victor Hugo as another row a person (again in the same table). When I have the Jellyfin server running and I navigate to Victor Hugo, I can see Les Misérables is associated content with this person. I would perhaps want all media content (i.e. Movies/Tv Shows/ Etc) associated with Victor Hugo to append the genre list with the tag 'French'. I can see that I can modify the Genres tag where it appears each genre is separated by a '|' character. My question is how do I determine what content is associated with Victor Hugo? I cannot see any mention of the guid I have associated with Victor Hugo in the database. Is this information contained somehow in the 'data' column?

Thank you for your help!

Best,
KB