Skip to content

Inline plugin: How to use track details in album field calculations? #5702

Answered by DjSlash
halloleo asked this question in Q&A
Discussion options

You must be logged in to vote

Looking at the documentation of inline plugin, I think it is possible.

Something in the likes of:

album_fields:
    albumcomposers: |
        # sets do not allow duplicates
        c_set = set()
        for item in items:
            c_set.update(item.composer.split("; "))
        return c_set
   multicomposer: 1 if len(albumcomposers) > 0 else 0

Note: I'm not fluent in python, be aware that you need to test this before unleashing it on your whole collection.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@halloleo
Comment options

@DjSlash
Comment options

@halloleo
Comment options

@DjSlash
Comment options

Answer selected by halloleo
@halloleo
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants