# Poll: What's your expected behavior of set\_fields and --set?

**URL:** <https://discourse.beets.io/t/poll-whats-your-expected-behavior-of-set-fields-and-set/1764>\
**Category:** Development\
**Created:** [May 8, 2021, 6:52am UTC](https://discourse.beets.io/t/poll-whats-your-expected-behavior-of-set-fields-and-set/1764 "2021-05-08T06:52:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bebe](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@bebe](https://discourse.beets.io/u/bebe)\
**Post date:** [May 8, 2021, 6:52am UTC](https://discourse.beets.io/t/poll-whats-your-expected-behavior-of-set-fields-and-set/1764/1 "2021-05-08T06:52:13Z")

</div>

Hi everybody,

we are discussing the expected behavior of the [set\_fields configuration](https://beets.readthedocs.io/en/stable/reference/config.html?highlight=set_fields#set-fields), which uses the `set_fields` configuration file block and the `--set` command line option.

_Question: Should fields be set on the imported album **only** , or also on each individual track?_

In the current implementation, fields are set on the imported _album only_. Hence `beet list` won’t let you filter for those fields unless you provide the `-a` flag. With `-a`, however, you will see a list of albums instead of individual tracks.

There are some discussions on the board (e.g. [here](https://discourse.beets.io/t/plugin-auto-set-comment-on-import/1762) or [here](https://discourse.beets.io/t/set-track-field-on-import/1235/5) or [here](https://discourse.beets.io/t/set-field-to-url/418/7)) and on the internet (e.g. [here](https://github.com/beetbox/beets/issues/2800)) where people expect that fields are also set _on each individual track_. In particular, this would imply that the fields are also written to the metadata of the track files instead of only beets’ database.

_Main question: Would changing the implementation from **album in database only** to **write each individual track file** break your setup?_

Please share your thoughts.  
Thank you!

PS: Also posted on [github](https://github.com/beetbox/beets/discussions/3932).

---

<div class="post-metadata">

**Author:** ![pwr](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/pwr/32/245_2.png) [@pwr](https://discourse.beets.io/u/pwr)\
**Post date:** [May 11, 2021, 1:41pm UTC](https://discourse.beets.io/t/poll-whats-your-expected-behavior-of-set-fields-and-set/1764/2 "2021-05-11T13:41:05Z")

</div>

I assumed it tried to set the values on each individual track and when it didn’t seem to work I always just thought this was a bug.

---

<div class="post-metadata">

**Author:** ![ctrueden](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/ctrueden/32/475_2.png) [@ctrueden](https://discourse.beets.io/u/ctrueden)\
**Post date:** [May 18, 2021, 3:14pm UTC](https://discourse.beets.io/t/poll-whats-your-expected-behavior-of-set-fields-and-set/1764/3 "2021-05-18T15:14:38Z")

</div>

> [@bebe](#):
>
> Hence `beet list` won’t let you filter for those fields unless you provide the `-a` flag.

With the merge of [https://github.com/beetbox/beets/pull/2988](https://github.com/beetbox/beets/pull/2988), that’s no longer true.

However, it is still true that e.g. `beet info` on a track won’t list the track’s album attributes.

Still, my vote is to keep the current behavior. As a programmer, I am highly resistant to duplicate data structures, since they introduce a chance for “data skew” and make maintainability (of both code and music libraries) more complex. Keeping fields on the album only reduces duplication. You can always add them to all the tracks after import, if that’s what you want.

That said, I doubt you will get any consensus from the community. Even if more people reply here, opinion will probably be split. 😄 So maybe a new command line flag to introduce the new behavior would be best? That would keep backwards compatibility, while making it easy for people to tell beets otherwise if desired. And then maybe make the documentation print some message about it during import, so that people are aware of which choice they made?

---

<div class="post-metadata">

**Author:** ![bebe](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@bebe](https://discourse.beets.io/u/bebe)\
**Post date:** [May 19, 2021, 6:00am UTC](https://discourse.beets.io/t/poll-whats-your-expected-behavior-of-set-fields-and-set/1764/4 "2021-05-19T06:00:57Z")

</div>

Hi,

thanks. Yes, we have discussed different options to solve the issue. From discussions throughout recent years and from the issue, we have concluded that setting fields on tracks is the expected behavior for most people and hence the change is acceptable.

Let’s see if there will be more opinions and what they are.

Cheers

---

<div class="post-metadata">

**Author:** ![ctrueden](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/ctrueden/32/475_2.png) [@ctrueden](https://discourse.beets.io/u/ctrueden)\
**Post date:** [May 19, 2021, 4:05pm UTC](https://discourse.beets.io/t/poll-whats-your-expected-behavior-of-set-fields-and-set/1764/5 "2021-05-19T16:05:19Z")

</div>

> [@bebe](#):
>
> we have concluded that setting fields on tracks is the expected behavior for most people and hence the change is acceptable.

How would a user then set fields on the album only during import?

I think it would be a mistake to break backwards compatibility with current behavior, while also making that behavior more difficult to achieve.

---

<div class="post-metadata">

**Author:** ![martin](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/martin/32/414_2.png) [@martin](https://discourse.beets.io/u/martin)\
**Post date:** [May 20, 2021, 6:17pm UTC](https://discourse.beets.io/t/poll-whats-your-expected-behavior-of-set-fields-and-set/1764/6 "2021-05-20T18:17:40Z")

</div>

Hello,  
What would happen to singletons imports ?

How about keeping `set_fields` and `--set` as they are, and add `set_fields_track` and `--set-track` ?

---

<div class="post-metadata">

**Author:** ![bebe](https://avatars.discourse-cdn.com/v4/letter/b/d07c76/32.png) [@bebe](https://discourse.beets.io/u/bebe)\
**Post date:** [May 22, 2021, 5:50am UTC](https://discourse.beets.io/t/poll-whats-your-expected-behavior-of-set-fields-and-set/1764/7 "2021-05-22T05:50:22Z")

</div>

The Singleton import is unchanged. It still writes fields to the track, as it did before the change.

`--set-track` was one of the options discussed that was not implements in the end.

Regards.
