Closed (fixed)
Project:
Audio
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Dec 2005 at 17:12 UTC
Updated:
5 Mar 2009 at 14:24 UTC
Jump to comment: Most recent file
Hi I've added the ability to reffer to a file whcih resides in files/audio instead of uploading it.
Podcaster and other media buffs deal with large files and sometimes preffer third party ftp (or ssh) client to upload the files.
This lets the user associate an existing file to the audio node he's creating and I integrated it so it would act just like the upload button (with teh cool id3 fillup).
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | audio_import_2.module | 5.07 KB | drewish |
| #14 | audio_import_1.module | 4.68 KB | drewish |
| #10 | audio_import_0.module | 4.24 KB | drewish |
| #9 | audio_import.module | 3.84 KB | drewish |
| #2 | audio.module.modified | 39.85 KB | liorkesos |
Comments
Comment #1
liorkesos commentedI'm attaching the patch containing the code..
I'm a drupal newbie so beware ! :)
Comment #2
liorkesos commentedI'm attaching the audio.module in whole because I'm not sure if I created the patch correctly.
regards
Lior
Comment #3
Colin Brumelle commentedI just spoke with liorkesos, and this seems quite cool. We'll work on getting this integrated pretty soon.
Comment #4
Scott commentedI am upgrading my site to 4.7 and REALLY need this functionality ASAP. Is anyone planning to code this feature for audio.module for 4.7? I'd do it myself if I could. I will contribute to a bounty if that's what's needed.
This really should be a critical feature IMO because uploading large files via browsers can be a real pain. I have over 200MB of audio content on my site so far, about 100 files that I couldn't upload via the browser because of timeout problems. I had to create, tag, and upload a small "dummy" MP3 file for every real one, just to "register" the files and metadata, then I FTP'd the real files and manually altered the database tables with the correct filesize and duration data. Too bad I didn't know about this patch when I was on 4.6! :)
Comment #5
drewish commentedscott, what would the best way to import these files be? if it could be admin only, it'd be pretty easy to write a contrib module that has it's own directory that the user ftp's files into. the admin would go to admin/audio/import (or something like that) and select the files to import via check boxes, the files would be added as audio nodes and moved to the audio module's directory.
i don't know how many other people would be interested in this but with some kind of bounty i'd be willing to do the work.
Comment #6
zirafa commentedI'd be interested in seeing this happen, and would pitch in some work too. I think one important option would be to import all files within a directory, so that the admin wouldn't have to import one at a time.
Comment #7
drewish commentedoh, yeah, it'd definitely be a batch process. the nice thing about reading in metadata is that you don't ususally have to do to much editing. at the end you just spit out a list of links to the new nodes.
Comment #8
drewz commentedHey, i'd be willing to pitch in some code, and a bit into the bounty as well. This would be a big plus for my site.
Comment #9
drewish commentedokay well it was easier than i thought. so i hope that anyone who was thinking about kicking in to a bounty can throw a few bucks toward's civic space's installer: http://civicspacelabs.com/drupal-install
please give this a try. it's a bit rough and only lists mp3s right now (you can change that on line 36).
you'll need to:
* create a directory for uploads and set that in http://example.com/admin/settings/audio_import
* put some mp3s in there and then hit up http://example.com/admin/audio_import
* you'll get a list of files, check the check boxes
* click import
* wait until it finishes grinding away (it moves the file and drupal's move is implemented as a copy/delete)
and you'll have a bunch of new audio nodes.
Comment #10
drewish commentedthis one has a little bit better error checking...
Comment #11
Scott commentedThanks, Drewish. Turns out that Lior is not available to implement his patch for 4.7, so I'm grateful you came up with something. (But I'm still crossing my fingers that Colin will upgrade and commit Lior's patch...)
I had two problems...
1. Under settings >> audio import, if you set the import path to the files/audio directory (which is also the destination directory), the module will list the files there, but when you attempt to import them, you get an error and the files get deleted! My MP3s were already in files/audio where I FTP'd them. Being relatively ignorant of the inner workings of the modules, it didn't occur to me not to put them there. :)
2. When I went to import audio, the list of available MP3s was not in any order I could discern. With over 100 files, that made it hard to find the one I wanted to import. I'm guessing it would only take a single line of code (somewhere around line 60?) to sort the array before creating the form.
Thanks again... I will make a donation to CivicSpace as you've requested.
Comment #12
drewz commentedThanks Drewish. That was quick. I made a small contribution to CivicSpace like you requested. We appreciate all the work. Now time to try this out :)
Cheers
Comment #13
drewish commentedscott, thanks for the feedback. i'll add a test to make sure that it doesn't allow the audio modules directory as an import dir, and sort the list by file name. regarding the original patch, i think colin has been pretty busy, and the entire module has been rewritten for 4.7. feel free to cross your fingers, but i wouldn't hold my breath ;)
drewz, glad to hear it. looking forward to your feedback.
Comment #14
drewish commentedthis adds features to correct the two problems Scott encountered. this should also work better with wacky filenames.
Comment #15
drewish commentedadded a setting to specify the allowed file types.
Comment #16
drewish commentedsee also: http://drupal.org/node/48094
Comment #17
zirafa commentedJust tested it out and works as expected. Didn't encounter any problems from my run through. Nice feature! I vote to keep this as a module in audio/contrib rather than patch the audio module. +1
Comment #18
pancapangrawit commentedHi drewish,
thank's a lot, a lovely extension! I ran into one little problem: the uploaded audio-files cannot be played back with the cute little play-butten (flash-player) you have has a standard in the audio-module. I get a link "Play this file" instead, and the playback will start on a new page with the quicktime-plugin. Is this specific to my workspace or do all get this? Can I do anything?
Thanks again
Rainer
Comment #19
drewish commentedRainer, please be sparing when changing an issues status. were you importing non-mp3 files? the flash player only plays mp3s.
Comment #20
drewish commentedAlright, this has been committed to the 4.7 branch. Feel free to open new issues for feature requests.
Comment #21
pancapangrawit commentedsorry, drewish, that status switch wasn't on purpose - I'm still very new to all this, I wasn't knowing what I was doing.
Yes, they are mp3-files. The flash-player still doesn't show up for "mass-uploaded files" in my setting, while it does for files uploaded through the audio-module-page. Reediting the node doesn't change this. It's the same in Firefox and IE.
Best
Rainer
Comment #22
drewish commentedsounds like a problem with the mime types...
Comment #23
(not verified) commentedComment #24
RichGarner commentedI'm sorry if this has been covered somewhere else or if I'm just being stupid, but I cannot get the audio_import2.module to work. I'm new to Drupal so I'm probably missing somethuing obvious, but when I install the module, it shows up in the module list, but then it does NOT show up under the adminster list OR the admin/settings list. I can hard code the url (hamptonroadschurch.org/admin/settings/audio_import) in my browser and get to the settings, but it does not accept any folder but /tmp/audio. Even when I create the folder /tmp/audio and put mp3s in there, the audio import field does not show up anywhere. Nor does it show when I try to hard code the url (hamptonroadschurch.org/admin/audio_import).
I have a site for a local church but our audio sermons have an international audience. I recently moved the site over to Drupal after too many problems with e107. We upload an audio sermon each week and they are usually about 7-9Mb. So if there is any other way of getting them uploaded easily, please let me know.
Comment #25
kevinbroome commentedhow to i add this patch to my audio.module?
sorry for being ignorant.. i've installed a few modules, but never a patch!!
Comment #26
pavlos.g commentedCan someone verify if the embedded player works or not ?