always set the playcount to some numeric value, 0 if we fail
This commit is contained in:
parent
b3a9d41910
commit
34f5beaaef
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue