tools/remove-recordings.pl: support more audio file extensions

This commit is contained in:
Milan
2023-05-31 20:29:05 +02:00
parent c95e3ac926
commit cdc0b1dd77

View File

@@ -25,7 +25,8 @@ my $entries = db::get($dbh, $query);
my %paths = map {normalize($_->{path}) => $_->{start}} @$entries;
my $dir = $config->{locations}->{local_audio_recordings_dir};
for my $file (sort glob("$dir/*m4a")) {
for my $file (sort glob("$dir/*")) {
next if $file !~ /\.(mp3|wav|flac|aac|ogg|m4a|aiff|aif|opus|aac)$/i;
next if -M $file < 14;
my $filename = normalize($file);
unless (exists $paths{$filename}) {