Download & Extend

Use BatchAPI for audio_import

Project:Audio
Version:6.x-1.x-dev
Component:audio_import
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

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

Comments

#1

Status:reviewed & tested by the community» fixed

#2

Title:Use batchapi for audio_import» Use BatchAPI for audio_import

#3

Status:fixed» closed (fixed)

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

#4

Status:closed (fixed)» 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

#5

anyone else having 403 errors with audio 6 when importing?

#6

found that this will happed if I try to import when there is more the 45 files in the import dir

nobody click here