Different duration formats. Issue #315 fixed

Please, check if is correct. 
Reuse the `duration` variable instead of calling `GetDuration (..)` again?