Quote:
Originally Posted by jpkar
Hello everyone,
I use caliber to manage videos!
Now I would like to import the metadata from the videos into "Custom Columns" to be created accordingly with "Import List".
In a first step, I tried to create and import a separate column for the length of the video.
The metadata from the videos are available to me as a csv file.
Example:
"Name","Author","Length"
"Example title","TestAuthor","00:14:16"
Here is the actual question: How must the "Own Column": "length" of the video be formatted so that the Import works?
When trying to import I get the error message:
Column "
The following rows have invalid type for column #länge:
row (1) => 00:14:16
Vielen Dank
|
Calibre doesn't support duration as a column type. Using integer is the best solution. The input should be formatted as the number of seconds. For example,
00:14:16 ==> 14 minutes + 16 seconds ==> 856 seconds
You can use a column built from other columns to display the number of seconds however you wish. For example, this template displays the number of seconds (I used a constant instead of the correct column lookup name) as hh:mm:ss
Code:
program:
number_of_seconds = 856;
hours = floor(number_of_seconds/3600);
minutes = floor((number_of_seconds - (hours * 3600))/60);
seconds = mod(number_of_seconds, 60);
format_number(hours, '02d') & ':' & format_number(minutes, '02d') & ':' & format_number(seconds, '02d')
Note that you couldn't edit the value shown in the column built from other columns. You must edit the number_of_seconds column