When i needed to do something similar i used the admin_print_scripts-media-upload-popup
hook
to add my own js/Jquery code to insert a button and handled it’s click event with ajax.
something like this:
add_action('admin_print_scripts-media-upload-popup','add_my_media_button');
function add_my_media_button(){
?>
<script>
jQuery(document).ready(function() {
//loop over all attachments
jQuery(".savesend").each(function(i,v){
if (jQuery(this).next().attr('id') != ""){
//get attachment id
var att_id = jQuery(this).next().attr('id');
att_id = att_id.replace("send[", "");
att_id = att_id.replace("]", "");
//insert button
jQuery(this).append('<a href="#" class="button add_to_album" rel="'+ att_id +'" id="add_to_album['+att_id+']" name="add_to_album['+att_id+']">add to album</a>');
}
});
//add handler for click
jQuery(".add_to_album").live("click", function(){
//do your thing here
alert("add to album click");
)};
)};
</script>
<?php
}