DRNU.bundle.zip (19 KB)
Despite being an absolute amateur, I’ve been tring to code a small plugin for the Danish public TV station, DR. They have a nice VOD service complete with an entire API (www.dr.dk/NU/api)
I’ve managed to do a semi-working plugin, but I’m stuck when it comes to getting the videos to play.
I’ll appreciate it if someone could take a look at the attached bundle.
Basically, I end up with a list of episodes for each TV program in a series of programs. For each episode the API returns a json formatted list of different videos for the same episode (different qualities). As a start, I just would like to pick the video with the best quality and play it (rtmp).
This is an example of the list of videos:
{<br />
"resourceId": 862927,<br />
"name": "21 SØNDAG",<br />
"mediaType": "Video",<br />
"restrictedToDenmark": false,<br />
"downloadable": false,<br />
"geofilterId": 0,<br />
"publish": null,<br />
"expire": "2011-03-01T20:00:00",<br />
"links": [<br />
{<br />
"qualityId": 1975961,<br />
"uri": "rtmp:\/\/vod.dr.dk\/cms\/mp4:CMS\/Resources\/dr.dk\/NETTV\/DR1\/2011\/01\/48f34ed3-a8f6-439f-9585-0b6053ade7ed\/2af19f43ed5b429f8285153f90a7533a_1000.mp4?ID=862927",<br />
"linkType": "Streaming",<br />
"fileType": "mp4",<br />
"bitrateKbps": 1935,<br />
"width": 640,<br />
"height": 360<br />
},<br />
{<br />
"qualityId": 1975962,<br />
"uri": "mms:\/\/wms.dr.dk\/storage\/auto\/cms\/Resources\/dr.dk\/NETTV\/DR1\/2011\/01\/48f34ed3-a8f6-439f-9585-0b6053ade7ed\/2af19f43ed5b429f8285153f90a7533a_3wmv.wmv?ID=862927",<br />
"linkType": "Streaming",<br />
"fileType": "wmv",<br />
"bitrateKbps": 840,<br />
"width": 512,<br />
"height": 288<br />
},<br />
{<br />
"qualityId": 1975963,<br />
"uri": "rtmp:\/\/vod.dr.dk\/cms\/mp4:CMS\/Resources\/dr.dk\/NETTV\/DR1\/2011\/01\/48f34ed3-a8f6-439f-9585-0b6053ade7ed\/2af19f43ed5b429f8285153f90a7533a_500.mp4?ID=862927",<br />
"linkType": "Streaming",<br />
"fileType": "mp4",<br />
"bitrateKbps": 1310,<br />
"width": 640,<br />
"height": 360<br />
},<br />
{<br />
"qualityId": 1975964,<br />
"uri": "rtmp:\/\/vod.dr.dk\/cms\/mp4:CMS\/Resources\/dr.dk\/NETTV\/DR1\/2011\/01\/48f34ed3-a8f6-439f-9585-0b6053ade7ed\/2af19f43ed5b429f8285153f90a7533a_250.mp4?ID=862927",<br />
"linkType": "Streaming",<br />
"fileType": "mp4",<br />
"bitrateKbps": 1186,<br />
"width": 320,<br />
"height": 180<br />
}<br />
],<br />
"chapters": [<br />
<br />
]<br />
}
Any help is appreciated! Thanks! :)

(I guess that this has noting to do with Plex per se but with Python skills, which I’m also lacking).
