mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
voice: Don't generate talkclips for directories with 'talkclip.ignore'
Add one of these to the .rockbox directory Change-Id: Ibc9733ba31d1b2c49b69ab833d284faa84f5cedd
This commit is contained in:
parent
64e4f81ffc
commit
6bb6c20479
2 changed files with 10 additions and 7 deletions
|
|
@ -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";
|
open(IGNORE, ">$temp_dir/database.ignore") || die "can't open database.ignore";
|
||||||
close(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
|
# the samsung ypr0 has a loader script that's needed in the zip
|
||||||
if ($modelname =~ /samsungypr[01]/) {
|
if ($modelname =~ /samsungypr[01]/) {
|
||||||
|
|
|
||||||
|
|
@ -582,13 +582,13 @@ sub gentalkclips {
|
||||||
if ($file eq '.' || $file eq '..' || $file =~ /\.talk$/) {
|
if ($file eq '.' || $file eq '..' || $file =~ /\.talk$/) {
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
# Element is a dir
|
|
||||||
if ( -d $path) {
|
if ( -d $path) { # Element is a dir
|
||||||
$enc = sprintf("%s/_dirname.talk", $path);
|
$enc = sprintf("%s/_dirname.talk", $path);
|
||||||
gentalkclips($path, $tts_object, $encoder, $encoder_opts, $tts_engine_opts, $i);
|
if (! -e "$path/talkclips.ignore") { # Skip directories containing "talkclips.ignore"
|
||||||
}
|
gentalkclips($path, $tts_object, $encoder, $encoder_opts, $tts_engine_opts, $i);
|
||||||
# Element is a file
|
}
|
||||||
else {
|
} else { # Element is a file
|
||||||
$enc = sprintf("%s.talk", $path);
|
$enc = sprintf("%s.talk", $path);
|
||||||
$voice =~ s/\.[^\.]*$//; # Trim extension
|
$voice =~ s/\.[^\.]*$//; # Trim extension
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue