Use BatchAPI for audio_import

drewish - September 30, 2008 - 04:41
Project:Audio
Version:6.x-1.x-dev
Component:audio_import
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Pretty much a re-write of audio_import to use the batch api to import audio. Also lets you specify the title and body.

AttachmentSize
audio_import_batchapi.patch10.7 KB

#1

drewish - September 30, 2008 - 04:43
Status:reviewed & tested by the community» fixed

#2

drewish - September 30, 2008 - 04:44
Title:Use batchapi for audio_import» Use BatchAPI for audio_import

#3

Anonymous (not verified) - October 14, 2008 - 04:51
Status:fixed» closed

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

#4

scuttleclun - August 6, 2009 - 09:46
Status:closed» needs review

Hi
I cannot get this to work properly.
I've set audio import directory to /tmp/audio
I place an mp3 file or files in that directory and then run the audio_import tool
The progress bar appears and the files are imported, the nodes are created and an import report is printed saying that the import was successful. However, the files are not transferred to the sites/sitename/files/audio directory. They are however deleted from /tmp/audio.
If I look in the 'files' table, then all the filepaths point to /tmp/audio/name_of_file.mp3. They should point to sites/sitename/files/audio/name_of_file.mp3 ?
I've checked all permissions/ownership of dirs etc. and looked at the code in audio_import_pages.inc and the audio_import_batch_op function and it doesn't look right to me:

// Create the node object.
if ($node = audio_api_insert($args['filepath'], $args['title'], $args['taxonomy'], $args['body'])) {
// Remove the original image now that the import has completed.
file_delete($args['filepath']);
...

At what point does it copy the file before deleting it?

kind regards
Simon

 
 

Drupal is a registered trademark of Dries Buytaert.