Am i missing something here? I can't seem to get the aspect_ratio and video_frame_rate to show up in Plex Media Center. I've added both of these kwargs to the MediaObject container but neither shows up correctly in PMC. Oddly enough, it does add a gap where you'd expect to see these items. They just don't show up. Is my code correct? Here is the code:
From what I can tell it looks like you're doing it right but I suspect that the docs are a bit wrong at least on the aspect ratio. The ratio would be 1.78 (or so), but a python int() is strict so int(1.78) == 1 ... I suspect it should instead be a float. I'd try aspect_ratio = 1.78 and see what happens (don't force type on it).
As for the framerate ... no idea, but again you might try just passing the value without forcing int() on it and see what happens.
Let use know if it works, if it doesn't I'll see if I can ping someone about it being a potential bug.
Can you check the XML on one of those shows and paste it here? Another dev pointed out that it might actually be a skin issue as this sort of thing has happened in the past.
Can you check the XML on one of those shows and paste it here? Another dev pointed out that it might actually be a skin issue as this sort of thing has happened in the past.
It looks like the skin issue might be the problem with the video_frame_rate. It is passing 24 as it should. However your suspicion about the aspect_ratio looks to be correct. It is passing a 1 instead of 1.78. I did try just passing a 1.78 without an int() around it but just got the following error:
CRITICAL (core:561) - Exception setting attribute 'aspect_ratio' of object to 1.78 (type: ) (most recent call last):
File "C:\Users\Matt\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\objects.py", line 71, in _set_attribute
el.set(convert_name(name), value)
File "lxml.etree.pyx", line 699, in lxml.etree._Element.set (src\lxml\lxml.etree.c:34531)
File "apihelpers.pxi", line 563, in lxml.etree._setAttributeValue (src\lxml\lxml.etree.c:15781)
File "apihelpers.pxi", line 1364, in lxml.etree._utf8 (src\lxml\lxml.etree.c:22190)
TypeError: Argument must be bytes or unicode, got 'float'
Also, i created a bug report here on the plexapp.lighthouseapp.com site for tracking this issue.
This issue was resolved. Take a look at the bug report on Plex's LightHosueApp site I posted above for more details. James informed me that both the video_frame_rate and aspect_ratio kwargs should be strings rather than integers as the documentation states. I changed both to strings and it worked like a charm. I suggested that they they update the documentation to reflect this so as to avoid future confusion.