<entry>file.link</entry>\r
<entry>if the file is a symbolic link, shows the path of the source file</entry>\r
</row>\r
+ <row>\r
+ <entry>file.page_no</entry>\r
+ <entry>if the file is a multi-page file, e.g. .tiff, the current page number and page total is displayed (e.g. [2/10])</entry>\r
+ </row>\r
<row>\r
<entry>lua.<lua script></entry>\r
<entry>\r
{"file.group", N_("File group"), NULL},
{"file.link", N_("File link"), NULL},
{"file.class", N_("File class"), NULL},
+ {"file.page_no", N_("Page no."), NULL},
{ NULL, NULL, NULL }
};
gchar *metadata_file_info(FileData *fd, const gchar *key, MetadataFormat format)
{
+ gchar *page_n_of_m;
+
if (strcmp(key, "file.size") == 0)
{
return g_strdup_printf("%ld", (long)fd->size);
{
return g_strdup(fd->sym_link);
}
+ if (strcmp(key, "file.page_no") == 0)
+ {
+ if (fd->page_total > 1)
+ {
+ page_n_of_m = g_strdup_printf("[%d/%d]", fd->page_num + 1, fd->page_total);
+ return page_n_of_m;
+ }
+ else
+ {
+ return NULL;
+ }
+ }
return g_strdup("");
}
{"%file.group%", N_("File group")},
{"%file.link%", N_("File link")},
{"%file.class%", N_("File class")},
+ {"%file.page_no%", N_("File page no.")},
{"%formatted.DateTime%", N_("Image date")},
{"%formatted.DateTimeDigitized%", N_("Date digitized")},
{"%formatted.ShutterSpeed%", N_("ShutterSpeed")},