Index: convert.conf =================================================================== --- convert.conf (revision 12838) +++ convert.conf (working copy) @@ -56,8 +56,7 @@ aif mp3 * * [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ $FILE$ - -shn mp3 * * - [shorten] -x $FILE$ - | [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ - - +--abr $BITRATE$ - - flc mp3 * * [flac] -dcs --skip=$START$ --until=$END$ -- $FILE$ | [lame] --resample 44100 --silent -q $QUALITY$ --abr $BITRATE$ - - @@ -81,9 +80,6 @@ wav wav * * - -shn wav * * - [shorten] -x $FILE$ - - flc wav * * [flac] -dcs --force-raw-format --endian=little --sign=signed --skip=$START$ --until=$END$ -- $FILE$ @@ -129,9 +125,6 @@ wav flc * * [flac] -cs --totally-silent --compression-level-0 --skip=$START$ --until=$END$ -- $FILE$ -shn flc * * - [shorten] -x $FILE$ - | [flac] -cs --totally-silent --compression-level-0 --endian little --sign signed --channels 2 --bps 16 --sample-rate 44100 - - ogg flc * * [sox] -t ogg $FILE$ -t raw -r 44100 -c 2 -w -s $-x$ - | [flac] -cs --compression-level-0 --totally-silent --endian big --channel 2 --bps 16 --sample-rate 44100 --sign signed - Index: types.conf =================================================================== --- types.conf (revision 12838) +++ types.conf (working copy) @@ -38,7 +38,6 @@ pls pls audio/scpls,audio/x-scpls playlist pod - application/rss+xml playlist png png image/png - -shn shn audio/x-shorten audio swf swf application/x-shockwave-flash - txt txt text/plain - wav wav,wave audio/x-wav audio Index: Slim/Formats/Shorten.pm =================================================================== --- Slim/Formats/Shorten.pm (revision 12838) +++ Slim/Formats/Shorten.pm (working copy) @@ -1,93 +0,0 @@ -package Slim::Formats::Shorten; - -# $Id$ - -############################################################################### -# FILE: Slim::Formats::Shorten.pm -# -# DESCRIPTION: -# Extract tag information from a Shorten file and store in a hash -# for easy retrieval. Requires the external command line "shorten" -# decoder and uses the Audio::Wav module. -# -# NOTES: -# This code has only been tested on Linux. -############################################################################### - -use strict; -use base qw(Slim::Formats); - -use Audio::Wav; -use MP3::Info; - -use Slim::Utils::Log; - -# Given a file, return a hash of name value pairs, where each name is -# a tag name. -sub getTag { - my $class = shift; - my $file = shift || return {}; - - # Extract the file and read from the pipe; redirect stderr to - # /dev/null since we will be closing the pipe before the - # entire file has been extracted and we don't want to see - # shorten's error message "failed to write decompressed - # stream". Note that this requires a slightly modified - # Audio/Wav.pm - my $shorten = Slim::Utils::Misc::findbin('shorten') || return undef; - - if (Slim::Utils::OSDetect::OS() eq 'win') { - $file = $shorten . " -x \"$file\" - 2>nul|"; - } else { - $file = $shorten . " -x \Q$file\E - 2>/dev/null|"; - } - - my $log = logger('formats.audio'); - - $log->debug("Reading WAV information from $file"); - - # This hash will map the keys in the tag to their values. - # Don't use MP3::Info since we can't seek around the stream - # and don't want to open it multiple times - my $tags = {}; - - # bogus files are considered empty - $tags->{'SIZE'} ||= 0; - $tags->{'SECS'} ||= 0; - - my $bail = undef; - my $wav = Audio::Wav->new(); - - $wav->set_error_handler(sub { - - my %parameters = @_; - - if ($parameters{'warning'} or - # When reading from a pipeline, the seek done in - # Audio::Wav::move_to will fail, but we don't really care about that - ($parameters{'filename'} =~ /\|$/ and - $parameters{'message'} =~ /^can\'t move to position/)) { - - # This is a non-critical warning - $log->warn("Warning: $parameters{'filename'}: $parameters{'message'}"); - - } else { - - # Critical error! - $bail = 1; - logError("$parameters{'filename'}: $parameters{'message'}"); - } - }); - - my $read = $wav->read($file); - - if (!$bail) { - $tags->{'OFFSET'} = $read->position(); - $tags->{'SIZE'} = $read->length(); - $tags->{'SECS'} = $read->length_seconds(); - } - - return $tags; -} - -1;