Summary of Telvue's API Improvements

Events happening in the community are now at Drupal community events on www.drupal.org.
kreynen's picture

For the last 2 years, we've worked closely with Telvue's developers to identify issues in their existing API and lobby for features that we'd like to see in future releases. The recent 3.7 release includes several fixes as well as improvements that make programmatic scheduling much easier. If anyone is considering using the Open Media modules with a Princeton, I really recommend upgrading to 3.7 first. These are just some of the improvements made to the API while I've been working on this...

GUID in the RSS

I'm not sure exactly when it was added and most people still need to do some remapping of the RSS to treat the GUID as the globally unique identifier vs. the filename.mpg. I wrote about the remapping in more detail in the Data In / Data Out post.

Fixed Multiple Period in Filenames

http://cms.telvue.com/support/product-documentation/princeton-server-api...

This bug was a real pain. I know it was fixed in one of the 3.6 updates, but since I just ran into it again I thought it was worth mentioning. The issue was that the get-content-metadata-by-filename call failed to return the status of the file if there were multiple periods in the filename. This issue was compounded if a server was configured to use audio normalization since Princeton changed the name of the MPEG from original.mpg to original.normalized_-12dBFS.mpg.

get-content-metadata-by-filename returns TBD records

Another improvement that makes it easier to keep Drupal and Princeton synchronized. Before 3.7, shows that were still waiting for their MPEG were not available using get-content-metadata-by-filename, but attempting to insert it again via SOAP returned an error.

Increasing Schedule RSS range

http://cms.telvue.com/support/product-documentation/princeton-server-api...

I think this was actually added in 3.6, but until the API documentation I didn't know it was possible. Before leveraging this, we were limited to autoscheduling 7 days out because beyond that, we didn't know what times had already been filled in the Princeton by producers who self scheduled or by staff manually scheduling.

Delete Date

http://cms.telvue.com/support/product-documentation/princeton-server-api...

We've had the option of including a Delete Date on SOAP inserts since 3.6, but the file was never actually deleted. This meant that someone needed to monitor the media disk status and manually delete shows that weren't scheduled to air on a regular basis. I think this is finally working in 3.7.

Version and Health of Princeton

http://cms.telvue.com/support/product-documentation/princeton-server-api...
http://cms.telvue.com/support/product-documentation/princeton-server-api...

This may not seem like a big deal, but it is a huge improvements over what I was doing in 3.6 just to check the status of the Media Disk. I really needed this status to stop users from self scheduling first airings when the Media Disk was getting full so I wrote a hack to log into the Princeton, scrape the status page, parse that page with regular expressions to find the one nugget of data I really needed. With 3.7, I have access to all the health variables in a way that isn't dependent on specific HTML tags being present on the page in every version or configuration.

Being able to easily get the Princeton version number allows me to write code that is version specific. As Telvue adds new features, I can check the version of the server before leveraging those features. At this point, om_timeslot_princeton assumes that any version that isn't > 3.7 is 3.6.4. There is no easy way for me to tell the difference between 3.6.1, 3.6.3, 3.6.5... etc.

This means when when 3.7.1 is released with the missing-file-report, I'll be able to add support for that without breaking functions for users still running 3.7.

Comments

Return custom fields and SOAP help ( I dropped it)?

jpiazzo's picture

I added a custom meta data field to our Telvue Princeton content entry but have been having trouble getting its value included in any return RSS request. I wanted to try and use a custom field to attach an specific overlay file names to specific programs and then have jquery check what script to load when the overlay page loads depending on the program playing. I don't know if this is clear...I am pretty new to this and it is stretching my PHP and Javascript knowledge (which is a good thing I guess).

I also tried to experiment with a Drupal form and soap to insert content - with little result. Can anyone post some working scripts that I can study?

Joe

Custom Metadata Fields and SOAP

jwinter_telvue's picture

Custom metadata fields aren't supported in TelVue's RSS feeds right now, but it is on our list.

Telvue's API site has some sample code for adding records via SOAP in PHP. If you scroll down, it's the second example on that page. Feel free to post comments there if any of that code is unclear.

Hope this helps,
Joe Winter (TelVue Programmer)

@jpiazzo I'm not sure I

kreynen's picture

@jpiazzo I'm not sure I understand how SOAP plays into this since it sounds like the overlay is already on the Princeton. SOAP can be used to insert metadata, but scheduling information is still imported as a .csv.

If you are looking more info that what's in the RSS, you could also alter the cron hook in om_broadcast_sync to not only match om_airings back to their node based on MPEG filename, but look up the additional fields using get-content-metadata-by-filename and save additional information to a CCK field.

Everything you need to add nodes from Drupal to Princeton is in om_show and om_timeslot_scheduler.

Even if you aren't using Timeslot Scheduler for scheduling, it gives you the option of transferring files and inserting records via SOAP into any Princeton registered as an om_timeslot_server node. Once om_timeslot_scheduler is installed, you will see a Status tab on om_show nodes.

Only local images are allowed.

Once the show is transferred the check will be green.

Only local images are allowed.

Some of this code was updated to take advantage of the new 3.7 API, but one improvement I have yet to leverage is the ability to "see" the status of TBD records waiting for an MPEG. Keep an eye on the dev snapshot of om_timeslot_scheduler. That update will likely be in the next commit.

Take a look at what those modules do. If they don't get you where you want, they should at least give you a framework to start hacking at. Remember, if you have an itch... someone else probably has it too.

Open Media Project

Group categories

Audience

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: