Quote:
Originally Posted by Heyou
I store all my audiobooks in Calibre. I added a column for Narrator although I have to add the name manually because I don’t think any plugins pull that information from the file or the net.
My problem arose when I tried to add a column for the Length of the audiobook.
My preferred format is 12h23m and it works just fine in a text column except that it will not sort in order showing shortest to longest or vise versa. I had hoped that it would short in a numeric order starting with the hours, but it doesn’t. I have tried using the column as an integer instead of text and using the format of 12.23 which works for sorting.
Any ideas on how to short correctly in my preferred format?
Thanks.
|
Your problem is because it is a Text field and Text always uses Alpha Numeric sort rules
100h59m (biggest)
pad leading 0's to ALL to allow the largest number of Hours you foresee. Minutes must be 00-59 and it should sort

000h09m
Note: you should be able to use the S&R (a couple of passes in REGEX mode) to regularize your entries
NOT TESTED
^(\d)h(\d)m ;matches both with single digit from start of line
0\1h0\2m