Merge branch 'master' into toys
This commit is contained in:
commit
59dc0b1a54
2
atom
2
atom
@ -616,7 +616,7 @@ do
|
||||
rest=${line#*::AtOM:SQL:Sep::}
|
||||
filename=${rest%%::AtOM:SQL:Sep::*}
|
||||
oldfilename=${rest#*::AtOM:SQL:Sep::}
|
||||
if [[ $oldfilename != $filename ]] && [ -f "$oldfilename" ]
|
||||
if [[ $oldfilename != "$filename" ]] && [ -f "$oldfilename" ]
|
||||
then
|
||||
rm -f "$oldfilename"
|
||||
fi
|
||||
|
||||
@ -51,7 +51,12 @@ encodeFile::mp3() {
|
||||
$(
|
||||
for key in ${!lameopts[@]}
|
||||
do
|
||||
echo "cmd_arg$key ${lameopts[key]}"
|
||||
cleanedopts="${lameopts[key]//\&/\\\&}"
|
||||
cleanedopts="${cleanedopts//\[/\\[}"
|
||||
cleanedopts="${cleanedopts//\]/\\]}"
|
||||
cleanedopts="${cleanedopts//\{/\\{}"
|
||||
cleanedopts="${cleanedopts//\}/\\\}}"
|
||||
echo "cmd_arg$key $cleanedopts"
|
||||
done
|
||||
)
|
||||
cleanup $tempdir/$tmpfile.wav
|
||||
|
||||
@ -26,7 +26,12 @@ encodeFile::opus() {
|
||||
$(
|
||||
for key in ${!opusencopts[@]}
|
||||
do
|
||||
echo "cmd_arg$key ${opusencopts[key]}"
|
||||
cleanedopts="${opusencopts[key]//\&/\\\&}"
|
||||
cleanedopts="${cleanedopts//\[/\\[}"
|
||||
cleanedopts="${cleanedopts//\]/\\]}"
|
||||
cleanedopts="${cleanedopts//\{/\\{}"
|
||||
cleanedopts="${cleanedopts//\}/\\\}}"
|
||||
echo "cmd_arg$key $cleanedopts"
|
||||
done
|
||||
)
|
||||
cleanup $tempdir/$tmpfile.wav
|
||||
|
||||
@ -22,6 +22,11 @@ encodeFile::vorbis() {
|
||||
$(
|
||||
for key in ${!oggencopts[@]}
|
||||
do
|
||||
cleanedopts="${oggencopts[key]//\&/\\\&}"
|
||||
cleanedopts="${cleanedopts//\[/\\[}"
|
||||
cleanedopts="${cleanedopts//\]/\\]}"
|
||||
cleanedopts="${cleanedopts//\{/\\{}"
|
||||
cleanedopts="${cleanedopts//\}/\\\}}"
|
||||
echo "cmd_arg$key ${oggencopts[key]}"
|
||||
done
|
||||
)
|
||||
|
||||
@ -19,7 +19,7 @@ getFiles() {
|
||||
mimetype=$(file -b --mime-type "$sourcepath/$filename")
|
||||
if [[ $mimetype == application/ogg ]]
|
||||
then
|
||||
case "$(head -n1 "$sourcepath/$filename")" in
|
||||
case "$(head -n5 "$sourcepath/$filename")" in
|
||||
*'vorbis'*)
|
||||
mimetype+=' vorbis'
|
||||
;;
|
||||
|
||||
@ -27,12 +27,5 @@ sanitizeFile() {
|
||||
string=${string/%+(.)/}
|
||||
fi
|
||||
fi
|
||||
# Not exactly filename sanitity, but these will make the script fail in
|
||||
# a decorative way..
|
||||
string="${string//&/\\&}"
|
||||
strint="${string//;/\\;}"
|
||||
# And these would exhibit strange behaviors
|
||||
string="${string//\[/\\\[}"
|
||||
string="${string//\]/\\\]}"
|
||||
echo "$string"
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
getInfosOgg_version='Ogg-1'
|
||||
getInfosOgg_version='Ogg-2'
|
||||
tagreaders+=( "$getInfosOgg_version" )
|
||||
getInfos::Ogg() {
|
||||
tagreader="$getInfosOgg_version"
|
||||
@ -22,9 +22,9 @@ getInfos::Ogg() {
|
||||
tracknum="$tracknum/$tracktotal"
|
||||
fi
|
||||
year=$(gettag date)
|
||||
infos="${infos/: /=}"
|
||||
infos="${infos//: /=}"
|
||||
rate=$(gettag rate|head -n1)
|
||||
channels=$(gettag channels|head -n1)
|
||||
bitrate=$(gettag 'nominal bitrate')
|
||||
bitrate=$(gettag 'average bitrate')
|
||||
bitrate=${bitrate%%,*}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
getInfosOpus_version='Opus-1'
|
||||
getInfosOpus_version='Opus-2'
|
||||
tagreaders+=( "$getInfosOpus_version" )
|
||||
getInfos::Opus() {
|
||||
tagreader="$getInfosOpus_version"
|
||||
@ -22,7 +22,7 @@ getInfos::Opus() {
|
||||
tracknum="$tracknum/$tracktotal"
|
||||
fi
|
||||
year=$(gettag date)
|
||||
infos="${infos/: /=}"
|
||||
infos="${infos//: /=}"
|
||||
rate=$(gettag 'original sample rate'|head -n1)
|
||||
channels=$(gettag channels|head -n1)
|
||||
bitrate=$(gettag 'average bitrate')
|
||||
|
||||
34
toys/README
34
toys/README
@ -1,3 +1,37 @@
|
||||
createindex
|
||||
===========
|
||||
Creates a nice index of your collection, similar to what oidua
|
||||
(http://oidua.suxbad.com/) does, but much faster, as it is using AtOM's DB
|
||||
instead of rescanning your whole collection.
|
||||
|
||||
Options define what will be shown and may optionnally be followed by the column
|
||||
width (default: 50).
|
||||
|
||||
Options:
|
||||
-f: Path
|
||||
-b: Average bitrate
|
||||
-C: Channels
|
||||
-s: Sample rate
|
||||
-m: Mofification time
|
||||
-M: Format
|
||||
|
||||
-A: Album artist
|
||||
-l: Album
|
||||
-a: Artist
|
||||
-c: Composer
|
||||
-d: Disc
|
||||
-g: Genre
|
||||
-p: Performer
|
||||
-t: Title
|
||||
-y: Year
|
||||
|
||||
-T <format>: date-time format (see 'man date' for possible values)
|
||||
-o -|<file>: output file (path relative to Source) - mandatory - must
|
||||
appear last.
|
||||
|
||||
-u: update database first
|
||||
-D: debug
|
||||
|
||||
checkextensions
|
||||
===============
|
||||
Reports files whose extension does not match the (detected) mime-type.
|
||||
|
||||
@ -82,7 +82,8 @@ done
|
||||
-b Average bitrate
|
||||
-C Channels
|
||||
-s Sample rate
|
||||
-T Mofification time
|
||||
-m Mofification time
|
||||
-M Format
|
||||
|
||||
-A Album artist
|
||||
-l Album
|
||||
@ -94,7 +95,7 @@ done
|
||||
-t Title
|
||||
-y Year
|
||||
|
||||
-d <format>: date-time format (see 'man date' for possible values)
|
||||
-T <format>: date-time format (see 'man date' for possible values)
|
||||
-o <file> : output file (path relative to Source)
|
||||
|
||||
-u : update database first
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user