always set the playcount to some numeric value, 0 if we fail

This commit is contained in:
https://id.koumbit.net/anarcat 2014-08-10 23:48:06 +00:00 committed by admin
parent b3a9d41910
commit 34f5beaaef

View file

@ -7,6 +7,10 @@ my @lines = `echo 'SELECT playCount, path.strPath, files.strFileName FROM movie
for (@lines) {
my ($count, $dir, $file) = split /\|/;
chomp $file;
# empty or non-numeric count is zero
if ($count !~ /[0-9]/) {
$count = 0;
}
$dir =~ s/$prefix//;
if ($file =~ s#stack://##) {
for (split /,/, $file) {