diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-05-07 15:16:29 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-05-07 16:21:21 -0400 |
commit | 6bb6c20479c81036496501ec98ce1404202c60f6 (patch) | |
tree | 26ede94da6b7e8c21d52a57929ef4e35c34e5fbd | |
parent | 64e4f81ffc7173bfbbf83bb4485a29ede67a4824 (diff) | |
download | rockbox-6bb6c20479.tar.gz rockbox-6bb6c20479.zip |
voice: Don't generate talkclips for directories with 'talkclip.ignore'
Add one of these to the .rockbox directory
Change-Id: Ibc9733ba31d1b2c49b69ab833d284faa84f5cedd
-rwxr-xr-x | tools/buildzip.pl | 5 | ||||
-rwxr-xr-x | tools/voice.pl | 12 |
2 files changed, 10 insertions, 7 deletions
diff --git a/tools/buildzip.pl b/tools/buildzip.pl index 59c32d3e3d..65aca59e13 100755 --- a/tools/buildzip.pl +++ b/tools/buildzip.pl @@ -388,9 +388,12 @@ sub buildzip { } } - # create the file so the database does not try indexing a folder + # create the file so the database indexer skips this folder open(IGNORE, ">$temp_dir/database.ignore") || die "can't open database.ignore"; close(IGNORE); + # create the file so the talkclip generation skips this folder + open(IGNORE, ">$temp_dir/talkclips.ignore") || die "can't open talkclips.ignore"; + close(IGNORE); # the samsung ypr0 has a loader script that's needed in the zip if ($modelname =~ /samsungypr[01]/) { diff --git a/tools/voice.pl b/tools/voice.pl index 2c966cb0df..9efc844c10 100755 --- a/tools/voice.pl +++ b/tools/voice.pl @@ -582,13 +582,13 @@ sub gentalkclips { if ($file eq '.' || $file eq '..' || $file =~ /\.talk$/) { next; } - # Element is a dir - if ( -d $path) { + + if ( -d $path) { # Element is a dir $enc = sprintf("%s/_dirname.talk", $path); - gentalkclips($path, $tts_object, $encoder, $encoder_opts, $tts_engine_opts, $i); - } - # Element is a file - else { + if (! -e "$path/talkclips.ignore") { # Skip directories containing "talkclips.ignore" + gentalkclips($path, $tts_object, $encoder, $encoder_opts, $tts_engine_opts, $i); + } + } else { # Element is a file $enc = sprintf("%s.talk", $path); $voice =~ s/\.[^\.]*$//; # Trim extension } |