move decoding task creation to decodeFile()
This commit is contained in:
parent
7d622bde13
commit
712201a97f
80
atom
80
atom
@ -974,9 +974,42 @@ decodeMpcdec() {
|
|||||||
commandline="mpcdec \"$sourcepath/$filename\" \"$tempdir/$tmpfile.wav\""
|
commandline="mpcdec \"$sourcepath/$filename\" \"$tempdir/$tmpfile.wav\""
|
||||||
}
|
}
|
||||||
|
|
||||||
encodeFile::MP3() {
|
decodeFile() {
|
||||||
#lame
|
if ! decodetaskid=$(
|
||||||
:
|
Select tasks id <<<"key = $tmpfile"
|
||||||
|
)
|
||||||
|
then
|
||||||
|
decodetaskid=$(
|
||||||
|
Insert tasks <<-EOInsert
|
||||||
|
key $tmpfile
|
||||||
|
source_file $fileid
|
||||||
|
command_line $commandline
|
||||||
|
status 0
|
||||||
|
cleanup $tempdir/$tmpfile.wav
|
||||||
|
EOInsert
|
||||||
|
)
|
||||||
|
progressSpin
|
||||||
|
fi
|
||||||
|
if (( sox_needed ))
|
||||||
|
then
|
||||||
|
decodeSox "$tempdir/$tmpfile.wav"
|
||||||
|
if ! soxtaskid=$(
|
||||||
|
Select tasks id <<<"key = $tmpfile"
|
||||||
|
)
|
||||||
|
then
|
||||||
|
soxtaskid=$(
|
||||||
|
Insert tasks <<-EOInsert
|
||||||
|
key $tmpfile
|
||||||
|
source_file $fileid
|
||||||
|
command_line $commandline
|
||||||
|
requires $decodetaskid
|
||||||
|
status 0
|
||||||
|
cleanup $tempdir/$tmpfile.wav
|
||||||
|
EOInsert
|
||||||
|
)
|
||||||
|
progressSpin
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
copyFile() {
|
copyFile() {
|
||||||
@ -997,11 +1030,6 @@ copyFile() {
|
|||||||
progressSpin
|
progressSpin
|
||||||
}
|
}
|
||||||
|
|
||||||
encodeFile::Ogg() {
|
|
||||||
#oggenc
|
|
||||||
:
|
|
||||||
}
|
|
||||||
|
|
||||||
transcodeFile() {
|
transcodeFile() {
|
||||||
#sox -> wav
|
#sox -> wav
|
||||||
for format in $targets["format"]
|
for format in $targets["format"]
|
||||||
@ -1376,36 +1404,17 @@ do
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if ! decodetaskid=$(
|
if ! (( copied ))
|
||||||
Select tasks id <<<"key = $tmpfile"
|
|
||||||
)
|
|
||||||
then
|
then
|
||||||
decodetaskid=$(
|
decodeFile
|
||||||
Insert tasks <<-EOInsert
|
|
||||||
key $tmpfile
|
|
||||||
command_line $commandline
|
|
||||||
status 0
|
|
||||||
EOInsert
|
|
||||||
)
|
|
||||||
progressSpin
|
|
||||||
fi
|
fi
|
||||||
if (( sox_needed ))
|
getDestDir
|
||||||
|
getDestFile
|
||||||
|
if (( copied ))
|
||||||
then
|
then
|
||||||
decodeSox "$tempdir/$tmpfile.wav"
|
copyFile
|
||||||
if ! soxtaskid=$(
|
else
|
||||||
Select tasks id <<<"key = $tmpfile"
|
encodeFile::${destinationformat[$destination]}
|
||||||
)
|
|
||||||
then
|
|
||||||
soxtaskid=$(
|
|
||||||
Insert tasks <<-EOInsert
|
|
||||||
key $tmpfile
|
|
||||||
command_line $commandline
|
|
||||||
requires $decodetaskid
|
|
||||||
status 0
|
|
||||||
EOInsert
|
|
||||||
)
|
|
||||||
progressSpin
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
unset \
|
unset \
|
||||||
album \
|
album \
|
||||||
@ -1415,6 +1424,7 @@ do
|
|||||||
channels \
|
channels \
|
||||||
commandline \
|
commandline \
|
||||||
composer \
|
composer \
|
||||||
|
copied \
|
||||||
decodetaskid \
|
decodetaskid \
|
||||||
destfileid \
|
destfileid \
|
||||||
destination \
|
destination \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user