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.
Comment | File | Size | Author |
---|---|---|---|
#1 | use-own-xml-functions-2068017-1.patch | 1.25 KB | Devin Carlson |
Comments
Comment #1
Devin Carlson CreditAttribution: Devin Carlson commentedA 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 thatmedia_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.
Comment #2
aaron CreditAttribution: aaron commentedThis looks fine to me.
Comment #3
Devin Carlson CreditAttribution: Devin Carlson commentedRetested #1 and committed it to Media YouTube now that #2067517: Can we remove all the XML APIs is in.
Comment #4
Devin Carlson CreditAttribution: Devin Carlson commentedRetested #1 and committed it to Media YouTube now that #2067517: Can we remove all the XML APIs is in.