Media object filename property.

Hi,
 
I investigate how metadata agent works to be able to update or create some new one.
 
The search function of my agent (not a primary agent) is called with theses items :
 
 

 Searching for matches for {'guid': 'com.plexapp.agents.themoviedb://111111?lang=fr', 'force': True, 'primary_agent': 'com.plexapp.agents.themoviedb'}

 

In the API documentation, it is wrote that the media object have many properties including "filename"
 
In my case, this property does not exists :
 
 

Log ("media.filename : " + media.filename)
TypeError: cannot concatenate 'str' and 'NoneType' objects

 
I think the only properties I have available in my case are "guid", "force" and "primary_agent"
 
I want to get the full path to the media file.
 
How to do that ?
 
The Metadata Model Classes (from primary_metadata) does not give me access to the filename.
 
I tried with media.items[0].parts[0].file but it failed too.
 

 
 
When I set my metadata agent as a primary agent, the "filename" property is filled. But I want my agent to be able to work in both case (primary and not primary agent)

 

Thanks for your help. 
 
 

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.