# Album fields in path

**URL:** <https://discourse.beets.io/t/album-fields-in-path/1450>\
**Category:** Help\
**Created:** [August 3, 2020, 10:28pm UTC](https://discourse.beets.io/t/album-fields-in-path/1450 "2020-08-03T22:28:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidGA](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/davidga/32/457_2.png) [@DavidGA](https://discourse.beets.io/u/DavidGA)\
**Post date:** [August 3, 2020, 10:28pm UTC](https://discourse.beets.io/t/album-fields-in-path/1450/1 "2020-08-03T22:28:39Z")

</div>

I’m pretty sure the answer to this is “no” but I figured I’ll ask anyway…

Can you use album-level fields in a path format?

I have an album-level “rating” field that it would be nice to use to organize on the disk, but I don’t think I can do that. Paths can only use item-level fields, right?

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [August 3, 2020, 11:28pm UTC](https://discourse.beets.io/t/album-fields-in-path/1450/2 "2020-08-03T23:28:49Z")

</div>

Hello! That should actually work—templates (in `paths` but not elsewhere) try the album first and fall back to item-level data if that’s empty. Here is where it happens in the code:

> <https://github.com/beetbox/beets/blob/78d8e31eeb56bfbe0ee4031d0c86d49b2634fd52/beets/library.py#L374>

However, queries are a different story: [https://github.com/beetbox/beets/pull/2988](https://github.com/beetbox/beets/pull/2988)

---

<div class="post-metadata">

**Author:** ![DavidGA](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/davidga/32/457_2.png) [@DavidGA](https://discourse.beets.io/u/DavidGA)\
**Post date:** [August 4, 2020, 12:25am UTC](https://discourse.beets.io/t/album-fields-in-path/1450/3 "2020-08-04T00:25:20Z")

</div>

Hm. Well I have this on my config but it doesn’t work:

```
paths:
    rating:-1: blah/path/here/etc

```

Maybe you can only use album fields in the actual path itself, and not in the query part?

---

<div class="post-metadata">

**Author:** ![adrian](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/adrian/32/4_2.png) [@adrian](https://discourse.beets.io/u/adrian)\
**Post date:** [August 4, 2020, 2:00am UTC](https://discourse.beets.io/t/album-fields-in-path/1450/4 "2020-08-04T02:00:13Z")

</div>

Yes indeed, that’s exactly it. The PR above is a (very tricky!) attempt to solve that problem with queries.

---

<div class="post-metadata">

**Author:** ![DavidGA](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.beets.io/davidga/32/457_2.png) [@DavidGA](https://discourse.beets.io/u/DavidGA)\
**Post date:** [August 4, 2020, 10:59pm UTC](https://discourse.beets.io/t/album-fields-in-path/1450/5 "2020-08-04T22:59:30Z")

</div>

I “solved” the problem by moving my album ratings into the item metadata. They’re duplicated across every track, but I set them using a script that can batch set them all at once, so it’s not a huge problem in the end.
