Needs work
Project:
Audio
Version:
5.x-1.x-dev
Component:
contrib
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Jan 2006 at 04:25 UTC
Updated:
12 Dec 2006 at 12:25 UTC
Jump to comment: Most recent file
Comments
Comment #1
drewish commentedI think this might work better as a separate module. We could put in into a contrib directory so that it's distributed with the audio module but it could be enabled separately. Thoughts?
Comment #2
drewish commentedthis is probably a better title...
Comment #3
leoburd commentedI don't know if I agree... why not just add a new permission to audio.module such as "xmlrpc calls allowed" and let the administrator decide without having specially install yet another module?
Comment #4
leoburd commentedSo, I guess I see what you mean.... that would make it easier por people to maintain the XMLRPC-specific part of the functionality. But and what about the more basic audio api functions that have been created to support the XMLRPC calls, but allow other modules to create and query audio nodes... shouldn't they remain part of the main audio.module?
Best,
Leo
Comment #5
drewish commentedi think audio_get_node_list() should stay in the audio module, it looks pretty useful. the rest of it could sit pretty nicely in a contrib module.
personally, i don't like the current create/delete api functions. something like yours would probably be an improvement.
also, i noticed that you had a few calls to watchdog() in your patch. i'm guessing these are leftover from testing.
Comment #6
drewish commentedleoburd, are you interested in updating this now that a 4.7 version has been committed? i think it'd be pretty cool.
Comment #7
drewish commentedanyone want to pick this up?
Comment #8
leoburd commentedI'll be happy to do that. Just give me a couple of days...
Best,
.L.
Comment #9
leoburd commentedHello there,
Here's my patch (or rather a zip file with the new versions of the files that I've changed). I've added functionality to audio.module and included an audio_xmlrpc.module to take care of XML-RPC calls. Please let me know what you think.
BTW, as far as I know, this patch also fixes the bug identified in http://drupal.org/node/56589 .
Best,
Leo
Comment #10
drewish commentedI pulled out your unrelated fixes and committed them, thanks for those. I've reposted an updated version of your patch.
Comment #11
drewish commentedI like what you've done with audio_api_get_node_list() but for the time being, I think it should probably live in your audio_xmlrpc module. I'd rather not commit the audio module to a query API at this point. That way we can give some of the other audio based modules a chance to weigh in on what'd be useful for them.
I'm not really sure I like the re-addition of the audio_api_create_item() and audio_api_delete() functions. I know that you were updating your code from the 4.6 version but I think you should refactor it a bit:
* Push the code from audio_api_delete() into _audio_xmlrpc_delete_entry() which can call node_delete().
* Push the code from audio_api_create_item() into _audio_xmlrpc_create_entry() and have it call audio_api_insert() instead.
* It looks like in _audio_xmlrpc_value_from_node() you're being backwards compatible with the 4.6 version. The downside of this is that you'll be missing out on any additional metadata tags that the admin may enable. Perhaps you could try to adjust your structure to be more like that of the current audio module?
I'm not sure quite what to make of the message:
Could I get you to open up a separate issue for that? It seems like if it is the case that we ought to be always use the MIME type returned by getID3...
On the whole this is looking very promising.
Comment #12
leoburd commentedHello there,
Thanks for your comments. I'll try to incorporate them in the next couple of days.
As for the filemime problem, I've filed an issue at http://drupal.org/node/56629 . Please let me know what you think.
Best,
.L.
Comment #13
leoburd commentedHello drewish,
I would like to merge my audio_api_create_item() with audio_api_insert(), however the latter does not allow parameters such as "body" or "node_options". Is it possible to change the audio_api_insert() API to something for useful and/or closer to the one of audio_api_create_item()? Please advise.
.L.
Comment #14
drewish commentedI use audio_api_insert() in my station archive module: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/station/archi...
Look at the _station_archive_add_file() function:
The trick is to call it, then add any additional properties, and the call node_save again.
Comment #15
drewish commentedif you're going to work on this, i'd recommend that you build it against the audio module living in my sandbox: http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/drewish/audio/
Comment #16
drewish commentedI pushed all the code into the attached module. I'm not sure it works at this point but I keep thinking I'll have some time to work on this.
Comment #17
leoburd commentedHey Drewish,
Here's my latest version for the audio_xmlrpc.module. It's been working well with audio.module 1.59 It would be great to get people to review the code and help me make it compatible with the latest changes implemented to audio.module.
Let me know if you have any questions, ok?
Best,
Leo
Comment #18
leoburd commentedPlease disregard my previous note... I've uploaded the wrong file by mistake!!!
Here's goes the correct one...
Best,
Leo
Comment #19
exigent99 commentedThank you for posting this code. I had planned to try to learn how to implement this myself. I am having some trouble trying to get the code to work though. I am planning to use a perl client and it complains that the return is not valid xml. Do you have any examples of client code that will work with this module?
Thanks in advance.
Comment #20
drewish commentedexigent99, i'm not very familiar with the module but i'd recommend that you try simulating input and capturing the xml output then opening it with firefox or some other program that will help you determine what's invalid.
one minor thing to check, be sure you're not using the devel module's page timer. that was messing up some xml output for me with another module.
Comment #21
drewish commentedComment #22
exigent99 commenteddrewish, thanks for suggestions although I am not sure of your meaning on the "page devel timer"? also what is "component code contrib"?
also I think I have figured out why my xmlrpc client in perl is complaining. I am using the Frontier::Client lib and it looks like it is stopping because drupal puts in a carriage return in the return document before the <?xml ?> tag. Haven't figured out how to stop it yet though.
Comment #23
drewish commentedwas me updating the category on this issue.
if you don't know what the devel module is then you're not using it and don't have to worry.
Comment #24
leoburd commentedHello everyone,
Here's my latest version of audio_xmlrpc.module. Please let me know what you think, ok? I'd love to be able to commit this module some day in the near future!!
Notes:
Cheers,
Leo
Comment #25
leoburd commentedHello there,
Here's the latest version of audio_xmlrpc.module.
As far as I know, this module seems to be working fine. However, there are a couple of things to pay attention to:
* In some systems, base64_encode() seems to hang. I couldn't figure out when or why.
* There are still a few watchdogs and todo comments that need to be removed and/or solved
* This code has only been tested in Drupal 4.7 systems
* I'm considering submitting this module to the Drupal repository soon. Any comments and/or improvements suggested would be greatly appreciated
Thanks in advance,
Leo