--- audio.module.sav 2008-09-21 11:14:50.000000000 -0600 +++ audio.module 2008-09-21 21:26:42.000000000 -0600 @@ -434,10 +434,16 @@ // TODO: should these links be by vid? $ret['url_play'] = url('audio/play/'. $node->nid, NULL, NULL, TRUE); if ($ret['audio_file']['downloadable']) { - // iTunes and other podcasting programs check the url to determine the - // file type. we'll add the original file name on to the end. see issues - // #35398 and #68716 for more info. - $url = 'audio/download/'. $node->nid .'/'. $fields['file_name']; + + // Allowing Direct Download of the audio files instead of passing through audio/download module + if (variable_get('audio_direct_download', 1)) { + $url = $fields['file_path']; + } else { + // iTunes and other podcasting programs check the url to determine the + // file type. we'll add the original file name on to the end. see issues + // #35398 and #68716 for more info. + $url = 'audio/download/'. $node->nid .'/'. $fields['file_name']; + } $ret['url_download'] = url($url , NULL, NULL, TRUE); } } @@ -976,6 +982,12 @@ '#default_value' => variable_get('audio_default_downloadable', 1), '#description' => t('Check this to make downloadable the default setting for new audio nodes. You should be aware that even when audio is not marked as downloadable, clever users can still download it, this just makes the work harder. '), ); + $form['audio_direct_download'] = array( + '#type' => 'checkbox', + '#title' => t("Download direct from audio file instead of default method"), + '#default_value' => variable_get('audio_direct_download', 0), + '#description' => t('Check this to have the download link point directly to the audio file. The default method is to pass the audio file through the audio/download module. This does not work when drupal page caching is turned on. And this method should take less CPU on the server. Download stats will not be able to be tracked by drupal. '), + ); return system_settings_form($form); }