aleph icon indicating copy to clipboard operation
aleph copied to clipboard

BUG: Length of audio files displayed in a non-human-friendly way

Open jlstro opened this issue 2 years ago • 3 comments

Describe the bug The metadata section of audio files displays the length of a recording in seconds with 3 decimal points in accuracy. While this is correct information, it's not very readable and might create confusion.

To Reproduce Steps to reproduce the behavior:

  1. Upload an adio recording, for example an mp3 file
  2. Wait until the file is processed
  3. Look at metadata section

Expected behavior It would be easier to understand if the length was displayed in hh:mm:ss or a similar format.

Aleph version 3.15.1rc1

Screenshots image

jlstro avatar Aug 14 '23 19:08 jlstro

Just a note here...

I agree that the duration should be human readable, but we need to be mindful of the duration and how this impacts what should be displayed to the user. Thus:

  • if the duration in less than 1 second we should display as ms
  • from 1 second to 59 seconds display should be seconds + milliseconds
  • from 1 minute to 1 hour display should be minutes + seconds
  • from 1 hour to 1 day display should be hour + minutes

It's unlikely that we'll have audio/video that is greater in length that 24hrs or less than 1 second. But we should adjust the display appropriately.

Rosencrantz avatar Aug 29 '23 08:08 Rosencrantz

Just some notes for future reference: To implement this in a generic way we’d probably need to introduce a new FtM property type for durations. Right now, properties like Audio:duration use the number property type. This would then allow us to customize how properties of this type are rendered in the Aleph UI.

tillprochaska avatar Sep 26 '23 07:09 tillprochaska

Related: This is what the search facet for number (and unless otherwise implemented for new duration) properties looks like. Might make sense to tackle that at the same time and implement a range slider or something like that.

Screen Shot 2023-09-26 at 09 50 26

tillprochaska avatar Sep 26 '23 07:09 tillprochaska