CC-5868: Make the BPM field less strict

This commit is contained in:
Albert Santoni 2015-02-19 09:31:23 -05:00
parent 17f1d0e96d
commit 487ab9bd99
1 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,12 @@ class FileDataHelper {
// If the track number isn't numeric, this will return 0
$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"]);
}
}
}