Switch to an array
This commit is contained in:
parent
1a75cd4764
commit
a0cb1bae1b
@ -58,9 +58,9 @@ Sections:
|
||||
%{title},
|
||||
%{track},
|
||||
%{year}.
|
||||
* tag-guessing-triggers <list>: String. List of tags, separated by commas.
|
||||
If any of the tgs in this list cannot be fetched by tag readers, guessing
|
||||
will be attempted.
|
||||
* tag-guessing-trigger <tag>: String. Specify multiple times for multiple
|
||||
tags.
|
||||
If <tag> cannot be fetched by tag readers, guessing will be attempted.
|
||||
|
||||
[<some arbitrary string>]
|
||||
Each section not named 'general' or 'source' will define a new destination.
|
||||
|
||||
@ -62,10 +62,18 @@ skip /zzz-atrier
|
||||
# %{title},
|
||||
# %{track} (2 digits),
|
||||
# %{year}.
|
||||
#tag-guessing %{genre}/%{albumartist}/%{year}-%{album}-%{releasecountry}/%{disk}%{track}--%{artist}-%{title}
|
||||
#tag-guessing %{genre}/%{albumartist}/%{year}-%{album}-%{releasecountry}/%{disc}%{track}--%{artist}-%{title}
|
||||
|
||||
# Guess tags on missing infos:
|
||||
#tag-missing-triggers artist,albumartist,title,track,year,genre
|
||||
#tag-guessing-trigger artist
|
||||
#tag-guessing-trigger albumartist
|
||||
#tag-guessing-trigger album
|
||||
#tag-guessing-trigger releasecountry
|
||||
#tag-guessing-trigger disc
|
||||
#tag-guessing-trigger title
|
||||
#tag-guessing-trigger track
|
||||
#tag-guessing-trigger year
|
||||
#tag-guessing-trigger genre
|
||||
|
||||
|
||||
[Vorbis]
|
||||
|
||||
@ -10,8 +10,8 @@ getConfigSource() {
|
||||
'tag-guessing')
|
||||
tagguessing="$value"
|
||||
;;
|
||||
'tag-guessing-triggers')
|
||||
tagguessingtriggers="$value"
|
||||
'tag-guessing-trigger')
|
||||
tagguessingtriggers+=( "$value" )
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@ -22,7 +22,14 @@ printConfig() {
|
||||
done
|
||||
unset printed
|
||||
echo " |Tag guessing expression|$tagguessing"
|
||||
echo " |Tag guessing triggers|$tagguessingtriggers"
|
||||
for trigger in "${tagguessingtriggers[@]}"
|
||||
do
|
||||
(( printed )) \
|
||||
&& echo -n ' | |' \
|
||||
|| echo -n ' |Tag guessing triggers|'
|
||||
echo "$trigger"
|
||||
printed=1
|
||||
done
|
||||
|
||||
for destination in ${destinations[@]}
|
||||
do
|
||||
|
||||
@ -64,10 +64,17 @@ path $sourcepath
|
||||
# %{title},
|
||||
# %{track} (2 digits),
|
||||
# %{year}.
|
||||
#tag-guessing %{genre}/%{albumartist}/%{year}-%{album}-%{releasecountry}/%{disk}%{track}--%{artist}-%{title}
|
||||
#tag-guessing %{genre}/%{albumartist}/%{year}-%{album}-%{releasecountry}/%{disc}%{track}--%{artist}-%{title}
|
||||
tag-guessing $tagguessing
|
||||
|
||||
# Guess tags on missing infos:
|
||||
#tag-missing-triggers artist,albumartist,title,track,year,genre
|
||||
#tag-guessing-trigger artist
|
||||
#tag-guessing-trigger albumartist
|
||||
EOCfg
|
||||
for trigger in "${tagguessingtriggers[@]}"
|
||||
do
|
||||
echo $'tag-guessing-trigger\t'"$trigger"
|
||||
done
|
||||
|
||||
|
||||
EOCfg
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user