Can you access template functions from python with the `inline` plugin?

#1

I’m wondering if it’s possible to use template functions like %aunique from inline python (inline plugin) in a path format. Thanks!

-kergoth

#2

Not directly, unfortunately! But you might be able to invoke the underlying Python functions:

#3

I don’t think that’s a viable option, since tmpl_aunique isn’t a staticmethod, so requires the item and lib to construct the object, which I doubt you can do from inside an inline python block. Is that correct, or is there a way to get to the library object from album_fields?

#4

Indeed—it’s certainly not easily done, but perhaps with enough hacking you can construct your own Library object, linked to the appropriate database, to obtain the object you need.