CC-5868: Make the BPM field less strict
This commit is contained in:
parent
17f1d0e96d
commit
487ab9bd99
1 changed files with 6 additions and 0 deletions
|
@ -17,6 +17,12 @@ class FileDataHelper {
|
||||||
// If the track number isn't numeric, this will return 0
|
// If the track number isn't numeric, this will return 0
|
||||||
$data["year"] = intval($data["year"]);
|
$data["year"] = intval($data["year"]);
|
||||||
}
|
}
|
||||||
|
if (array_key_exists("bpm", $data)) {
|
||||||
|
//Some BPM tags are silly and include the word "BPM". Let's strip that...
|
||||||
|
$data["year"] = str_ireplace("BPM", "", $data["year"]);
|
||||||
|
// This will convert floats to ints too.
|
||||||
|
$data["year"] = intval($data["year"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue