# Help with Albumartist\_country tag by inline

**URL:** <https://discourse.beets.io/t/help-with-albumartist-country-tag-by-inline/1689>\
**Category:** Help\
**Created:** [February 11, 2021, 8:23am UTC](https://discourse.beets.io/t/help-with-albumartist-country-tag-by-inline/1689 "2021-02-11T08:23:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bogpatin](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@bogpatin](https://discourse.beets.io/u/bogpatin)\
**Post date:** [February 11, 2021, 8:23am UTC](https://discourse.beets.io/t/help-with-albumartist-country-tag-by-inline/1689/1 "2021-02-11T08:23:33Z")

</div>

I’m doing a country based structure of the music.  
There are some albums that have a main album artist but then some track have another artist (not being a Various Artist case), so when the folder is created, get some tracks splited in different folders.  
So, what I’m trying to achieve is an Albumartist\_country tag.  
But I’m not sure how this could work.  
Doing an inline with a album\_fields (like the bitrate one), where if there are 9 tracks with artist\_country x and three with different ones, then albumartist\_country = x  
Or it’s possible to ask somehow to make artist\_country plugin search for the albumartist value as the artist to search in the database? Its possible to do this by the inline plugin?  
Its possible to use a field from a plugin (as artist\_country) inside other plugin as the inline?  
Any help of how should be the way of action would be very much appreciated.

this far I made with my zero python but is not working:

album\_fields:  
albartctry: |  
yes = 0  
nop = 0  
if albumartist = artist  
yes = yes + 1  
else :  
nop = nop + 1  
if yes \> nop albartctry = 1 else 0

default: %if{$albartctry,%lower{$artist\_country},%lower{$country}}/%the{$albumartist}_($original\_year)_%title{$album%aunique{}}[$genre]/$discntrack-$title
