Open grossir opened 5 months ago
Delightful. I wonder what happened in late 2019? Maybe a new version of eyed3? Hm. I'm not sure I really care about this being wrong, because it doesn't really affect much, but it would be nice if it were more accurate.
I am copying this graph from freelawproject/courtlistener#440 which shows that for the same duration, we get different file sizes when querying the actual bucket (and checking the length of the downloaded bytes)
Another more colorful graph that takes the year from the date_created shows that the problem is from late 2019 to the present
Examples of wrong and correct durations:
one created in 2023 with duration 3028 (3028/60=50.46), but lasts 58:46 on the audio player
a correct one created in 2014 with duration 3029 that lasts 50:25 on the audio player (which roughly matches 3029/60 = 50.48)
one created in 2023 with duration 2000 (2000/60=33.33) but lasts 38:49 on the audio player.
a correct one created in 2014 with duration 2001 that lasts 33:18 minutes in the audio player
Code that needs correcting: https://github.com/freelawproject/doctor/blob/4009f00f08c5c98dcc797da69320e4dc635b3372/doctor/views.py#L354