A precursor to #2067517: Can we remove all the XML APIs, Media: YouTube is the only module which uses the XML APIs in the Media module and, even then, it only calls one of the API functions once (in media_youtube_video_search()).

The Media XML APIs are too specific to be useful: both Media: YouTube and Media: Vimeo actually specifically mention that they can't use them for more circumstances (see MediaInternetYouTubeHandler and MediaInternetVimeoHandler) because of limitations of the functions. Also the APIs only work with XML which limits their applications.

Media: YouTube should remove its sole call to the media_retrieve_xml() to allow the APIs to be removed from Media.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Devin Carlson’s picture

Status: Active » Needs review
FileSize
1.25 KB

A patch to replace the call to media_retrieve_xml() with some code that Media: YouTube already uses. I don't think that it's necessary to do all of the caching that media_retrieve_xml() did since I doubt that users will be performing the same searches over and over.

That said, it would be easy to simply move all of the XML code from Media to Media: YouTube if it's found to be necessary.

aaron’s picture

Status: Needs review » Reviewed & tested by the community

This looks fine to me.

Devin Carlson’s picture

Status: Reviewed & tested by the community » Fixed

Retested #1 and committed it to Media YouTube now that #2067517: Can we remove all the XML APIs is in.

Devin Carlson’s picture

Retested #1 and committed it to Media YouTube now that #2067517: Can we remove all the XML APIs is in.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.