Musish: xray script
parent
c3d680b349
commit
0a90b09a0f
|
@ -9,6 +9,9 @@ library_ext="/media/backup2/Musics"
|
||||||
use_colors=true
|
use_colors=true
|
||||||
use_formatting=true
|
use_formatting=true
|
||||||
|
|
||||||
|
## Replace chars
|
||||||
|
tagsed="s/[’´]/'/g; s/]/)/g; s/\[/(/g; s| *[/|\\:] *| - |g"
|
||||||
|
|
||||||
## French
|
## French
|
||||||
constants="$constants un une de du le la les et mais pour ni ou à a où contre entre chez dans sur que qui "
|
constants="$constants un une de du le la les et mais pour ni ou à a où contre entre chez dans sur que qui "
|
||||||
## German
|
## German
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
## X-Ray Dog.
|
||||||
|
|
||||||
|
## Albums actually have years, but is it relevent since they have a code?
|
||||||
|
date=""
|
||||||
|
## Genre could be Soundtrack, or Trailer Music. We choose "" for now.
|
||||||
|
genre=""
|
||||||
|
|
||||||
|
## Extract album code, assuming parent folder is "XRCD## - $album".
|
||||||
|
XRCD="${FILENAME%/*}"
|
||||||
|
XRCD="${XRCD##*/}"
|
||||||
|
XRCD="${XRCD%% - *}"
|
||||||
|
|
||||||
|
## Append the album code to the constants array, other it will be capitalized.
|
||||||
|
constants="$constants $XRCD "
|
||||||
|
|
||||||
|
if [ -z "${album%%XRCD *}" ]; then
|
||||||
|
## Change "XRCD - ## - ..." -> "XRCD## - "
|
||||||
|
album="${album#XRCD}"
|
||||||
|
album="${album##*[0-9] }"
|
||||||
|
album="${album#-}"
|
||||||
|
album="$XRCD - $album"
|
||||||
|
elif [ -n "${album%%XRCD*}" ]; then
|
||||||
|
album="$XRCD - $album"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${title}" ]; then
|
||||||
|
title="${FILENAME##*/}"
|
||||||
|
title="${title%.*}"
|
||||||
|
# title="$(echo "$title" | sed 's/X-Ray Dog//')"
|
||||||
|
title="$(echo "$title" | sed 's/X-Ray Dog\( \?- \?\)\?//')"
|
||||||
|
fi
|
||||||
|
if [ -z "${track}" ]; then
|
||||||
|
track="${title% *}"
|
||||||
|
title="${title#* }"
|
||||||
|
fi
|
||||||
|
|
||||||
|
subscript="$(findscript vorbis)"
|
||||||
|
if [ ! -f "$subscript" ]; then
|
||||||
|
_error "Subscript '$subscript' not found."
|
||||||
|
else
|
||||||
|
. "$subscript"
|
||||||
|
fi
|
Loading…
Reference in New Issue