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 |
Jump to:
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.
| Attachment | Size |
|---|---|
| audio_import_batchapi.patch | 10.7 KB |

#1
#2
#3
Automatically closed -- issue fixed for two weeks with no activity.
#4
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